26 require_once NOALYSS_INCLUDE.
'/database/class_default_menu_sql.php';
27 require_once NOALYSS_INCLUDE.
'/lib/class_itext.php';
50 $idx = $tmenu->getp(
'md_code');
51 $this->a_menu_def[
$idx] = $tmenu->getp(
'me_code');
53 $this->code = explode(
',',
'code_follow,code_invoice');
58 $code_invoice =
new IText(
'code_invoice', $this->a_menu_def[
'code_invoice']);
59 $code_follow =
new IText(
'code_follow', $this->a_menu_def[
'code_follow']);
60 echo
'<p>' . _(
'Code pour création facture depuis gestion') . $code_invoice->input() .
'</p>';
61 echo
'<p>' . _(
'Code pour appel gestion') . $code_follow->input() .
'</p>';
67 $count = $cn->get_value(
'select count(*) from v_menu_description_favori where '
68 .
'code = $1', array($p_string));
71 throw new Exception(
'code_inexistant');
77 foreach ($this->code as
$code)
83 function set($p_string, $p_value)
85 if (in_array($p_string, $this->code) ==
false)
87 throw new Exception(
"code_invalid");
89 $this->a_menu_def[$p_string] = $p_value;
91 function get ($p_string)
93 return $this->a_menu_def[$p_string];
104 $cn->exec_sql(
'update menu_default set me_code=$1 where
107 }
catch (Exception
$e)
109 error_log($e->getTraceAsString());
110 echo $e->getMessage();
119 echo
h2(
'Constructor',
'');
121 echo $g_succeed .
'constructor';
122 if (count(
$a->a_menu_def) != 2)
126 echo
h2(
"input_value",
"");
131 echo
h2(
'Verify must failed');
132 $a->set(
'code_follow',
'MEMNU/MEMEM/');
134 }
catch (Exception
$e) {
135 echo $g_succeed.
" OK ";
137 echo
h2(
'Verify must succeed');
139 $a->set(
'code_follow',
'GESTION/FOLLOW');
141 echo $g_succeed.
" OK ";
142 }
catch (Exception $e)
144 echo $g_failed.
"NOK";
149 echo ( assert(
$a->get(
'code_follow')==
'GESTION/FOLLOW') )?$g_succeed.$a->get(
'code_follow'):$g_failed.$a->get(
'code_follow');
150 echo ( assert(
$a->get(
'code_invoice')==
'COMPTA/VENMENU/VEN') )?$g_succeed.$a->get(
'code_invoice'):$g_failed.$a->get(
'code_invoice');
151 echo
$a->get(
'code_invoice');
static num_row($ret)
wrapper for the function pg_NumRows
h2($p_string, $p_class="", $raw="")
global $g_user
Find the default module or the first one.