die('Unknown user'); } $requete_param = "SELECT * FROM users WHERE userid='{$id}' LIMIT 1 "; $res_param = pmb_mysql_query($requete_param, $dbh); $field_values = pmb_mysql_fetch_row($res_param); $param_user = "******" . $msg["1500"] . "</b></div>\n"; $deflt_user = "******" . $msg["1501"] . "</b></div>\n"; $acquisition_user_param = ""; $i = 0; while ($i < pmb_mysql_num_fields($res_param)) { $field = pmb_mysql_field_name($res_param, $i); $field_deb = substr($field, 0, 6); switch ($field_deb) { case "deflt_": if ($field == "deflt_styles") { $deflt_user_style = "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='colonne_suite'>" . make_user_style_combo($field_values[$i]) . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n"; } elseif ($field == "deflt_docs_location") { //visibilité des exemplaires if ($pmb_droits_explr_localises && $usr->explr_visible_mod) { $where_clause_explr = "idlocation in (" . $usr->explr_visible_mod . ") and"; } else { $where_clause_explr = ""; } $selector = gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where {$where_clause_explr} num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "account_calcule_section(this);", $field_values[$i], "", "", "", "", 0); $deflt_user .= "\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n"; //localisation de l'utilisateur pour le calcul de la section $location_user_section = $field_values[$i]; } elseif ($field == "deflt_collstate_location") { $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", $field_values[$i], "", "", "0", $msg["all_location"], 0); $deflt_user .= "\n\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n\n\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n"; } elseif ($field == "deflt_resas_location") {
break; default: break; } $i++; } $param_default = "\n\t\t<div class='row'><hr /></div>\n\t\t\t{$param_user}\n\t\t<div class='row'><hr /></div>\n\t\t\t" . str_replace("!!param_allloc!!", $param_user_allloc, $deflt_user) . "\n\t\t<br />\n\t\t<div class='row'><hr /></div>\n\t\t\t{$value_user}"; if ($speci_user || $deflt3user) { $param_default .= "<div class='row'><hr /></div>"; $param_default .= $deflt3user; $param_default .= $speci_user; $param_default .= "<div class='row'></div>"; } $account_form = str_replace('!!all_user_param!!', $param_default, $account_form); // fin gestion des paramètres personalisés du user $account_form = str_replace('!!combo_user_style!!', make_user_style_combo($stylesheet), $account_form); $account_form = str_replace('!!combo_user_lang!!', make_user_lang_combo($user_params->user_lang), $account_form); $account_form = str_replace('!!nb_per_page_search!!', $user_params->nb_per_page_search, $account_form); $account_form = str_replace('!!nb_per_page_select!!', $user_params->nb_per_page_select, $account_form); $account_form = str_replace('!!nb_per_page_gestion!!', $user_params->nb_per_page_gestion, $account_form); print $account_form; } else { // code de mise à jour // constitution des variables MySQL // mise à jour de la date d'update $names[] = 'last_updated_dt'; $values[] = "'" . today() . "'"; $names[] = 'user_lang'; $values[] = "'{$user_lang}'"; if ($form_pwd) { $names[] = 'pwd';
protected function get_user_param_form($field) { global $msg, $dbh, $charset; global ${$field}; global $location_user_section; $field_deb = substr($field, 0, 6); // $html=" // <script type='text/javascript'> // function dashboard_save_params(name,value){ // var req= new http_request(); // req.request('./ajax.php?module=".$this->module."&categ=dashboard&sub=save_quick_params',1,'".$field."='+value,1,dashboard_params_saved); // } // </script>"; $html = ""; switch ($field_deb) { case "deflt_": if ($field == "deflt_styles") { $html_style = "\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class='colonne_suite'>" . make_user_style_combo(${$field}) . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n"; } elseif ($field == "deflt_docs_location") { //visibilité des exemplaires if ($pmb_droits_explr_localises && $usr->explr_visible_mod) { $where_clause_explr = "idlocation in (" . $usr->explr_visible_mod . ") and"; } else { $where_clause_explr = ""; } $selector = gen_liste("select distinct idlocation, location_libelle from docs_location, docsloc_section where {$where_clause_explr} num_location=idlocation order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "dashboard_calcule_section(this);", ${$field}, "", "", "", "", 0); $html .= "\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n"; //localisation de l'utilisateur pour le calcul de la section $location_user_section = ${$field}; } elseif ($field == "deflt_collstate_location") { $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", ${$field}, "", "", "0", $msg["all_location"], 0); $html .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n"; } elseif ($field == "deflt_resas_location") { $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", ${$field}, "", "", "0", $msg["all_location"], 0); $html .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n"; } elseif ($field == "deflt_docs_section") { // calcul des sections $selector = ""; if (!$location_user_section) { $location_user_section = $deflt_docs_location; } if ($pmb_droits_explr_localises && $usr->explr_visible_mod) { $where_clause_explr = "where idlocation in (" . $usr->explr_visible_mod . ")"; } else { $where_clause_explr = ""; } $rqtloc = "SELECT idlocation FROM docs_location {$where_clause_explr} order by location_libelle"; $resloc = mysql_query($rqtloc, $dbh); while ($loc = mysql_fetch_object($resloc)) { $requete = "SELECT idsection, section_libelle FROM docs_section, docsloc_section where idsection=num_section and num_location='{$loc->idlocation}' order by section_libelle"; $result = mysql_query($requete, $dbh); $nbr_lignes = mysql_num_rows($result); if ($nbr_lignes) { if ($loc->idlocation == $location_user_section) { $selector .= "<div id=\"dashboard_docloc_section" . $loc->idlocation . "\" style=\"display:block\">\r\n"; } else { $selector .= "<div id=\"dashboard_docloc_section" . $loc->idlocation . "\" style=\"display:none\">\r\n"; } $selector .= "<select name='f_ex_section" . $loc->idlocation . "' id='f_ex_section" . $loc->idlocation . "'>\r\n"; while ($line = mysql_fetch_row($result)) { $selector .= "<option value='{$line['0']}' "; $selector .= $line[0] == ${$field} ? "selected='selected' >" : '>'; $selector .= htmlentities($line[1], ENT_QUOTES, $charset) . '</option>\\r\\n'; } $selector .= '</select></div>'; } } $html .= "\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n"; } elseif ($field == "deflt_upload_repertoire") { $selector = ""; $requpload = "select repertoire_id, repertoire_nom from upload_repertoire"; $resupload = mysql_query($requpload, $dbh); $selector .= "<div id='upload_section'>"; $selector .= "<select name='form_deflt_upload_repertoire'>"; $selector .= "<option value='0'>" . $msg[upload_repertoire_sql] . "</option>"; while ($repupload = mysql_fetch_object($resupload)) { $selector .= "<option value='" . $repupload->repertoire_id . "' "; if (${$field} == $repupload->repertoire_id) { $selector .= "selected='selected' "; } $selector .= ">"; $selector .= htmlentities($repupload->repertoire_nom, ENT_QUOTES, $charset) . "</option>"; } $selector .= "</select></div>"; $html .= "\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class='colonne_suite'>" . $selector . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>"; } elseif ($field == "deflt_import_thesaurus") { $requete = "select * from thesaurus order by 2"; $resultat_liste = mysql_query($requete, $dbh); $nb_liste = mysql_num_rows($resultat_liste); if ($nb_liste == 0) { $html .= ""; } else { $html .= "\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t\t\t<select class='saisie-30em' name=\"form_" . $field . "\">"; $j = 0; while ($j < $nb_liste) { $liste_values = mysql_fetch_row($resultat_liste); $html .= "<option value=\"" . $liste_values[0] . "\" "; if (${$field} == $liste_values[0]) { $html .= "selected='selected' "; } $html .= ">" . $liste_values[1] . "</option>\n"; $j++; } $html .= "</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n"; } } elseif ($field == "deflt_short_loan_activate") { $html .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\n\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t<input type='checkbox' class='checkbox'"; if (${$field} == 1) { $html .= " checked"; } $html .= " value='1' name='form_{$field}'></div></div>\n"; } elseif ($field == "deflt_cashdesk") { $requete = "select * from cashdesk order by cashdesk_name"; $resultat_liste = mysql_query($requete, $dbh); $nb_liste = mysql_num_rows($resultat_liste); if ($nb_liste == 0) { $html .= ""; } else { // $html.=" // <div class='row'> // <div class='colonne60'>".$msg[$field]." : // </div>\n // <div class='colonne_suite'> // <select class='saisie-30em' name=\"form_".$field."\" onchange='dashboard_save_params(this.name,this.value)'>"; $html .= "\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t\t\t<select class='saisie-30em' name=\"form_" . $field . "\">"; $j = 0; while ($j < $nb_liste) { $liste_values = mysql_fetch_object($resultat_liste); $html .= "<option value=\"" . $liste_values->cashdesk_id . "\" "; if (${$field} == $liste_values->cashdesk_id) { $html .= "selected"; } $html .= ">" . htmlentities($liste_values->cashdesk_name, ENT_QUOTES, $charset) . "</option>\n"; $j++; } $html .= "</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n"; } } else { $deflt_table = substr($field, 6); if ($deflt_table == "integration_notice_statut") { $deflt_table = "notice_statut"; } switch ($field) { case "deflt_entites": $requete = "select id_entite, raison_sociale from " . $deflt_table . " where type_entite='1' order by 2 "; break; case "deflt_exercices": $requete = "select id_exercice, libelle from " . $deflt_table . " order by 2 "; break; case "deflt_rubriques": $requete = "select id_rubrique, concat(budgets.libelle,':', rubriques.libelle) from " . $deflt_table . " join budgets on num_budget=id_budget order by 2 "; break; default: $requete = "select * from " . $deflt_table . " order by 2"; break; } $resultat_liste = mysql_query($requete, $dbh); $nb_liste = mysql_num_rows($resultat_liste); if ($nb_liste == 0) { $html .= ""; } else { $html .= "\n\t\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t\t\t<div class='colonne60'>" . $msg[$field] . " : \n\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t\t\t<select class='saisie-30em' name=\"form_" . $field . "\">"; $j = 0; while ($j < $nb_liste) { $liste_values = mysql_fetch_row($resultat_liste); $html .= "<option value=\"" . $liste_values[0] . "\" "; if (${$field} == $liste_values[0]) { $html .= "selected='selected' "; } $html .= ">" . $liste_values[1] . "</option>\n"; $j++; } $html .= "</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n"; } } break; case "param_": if ($field == "param_allloc") { $html = "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t<input type='checkbox' class='checkbox'"; if (${$field} == 1) { $html .= " checked"; } $html .= " value='1' name='form_{$field}'></div></div>\n"; } else { $html .= "<div class='row'>"; //if (strpos($msg[$field],'<br />')) $param_user .= "<br />"; $html .= "<input type='checkbox' class='checkbox'"; if (${$field} == 1) { $html .= " checked"; } $html .= " value='1' name='form_{$field}'>\n\n\t\t\t\t\t\t{$msg[$field]}\n\t\t\t\t\t\t</div>\n"; } break; case "value_": switch ($field) { case "value_deflt_fonction": $flist = new marc_list('function'); $f = $flist->table[${$field}]; $html .= "<div class='row'><div class='colonne60'>\n\t\t\t\t\t\t{$msg[$field]} : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t<input type='text' class='saisie-30emr' id='form_value_deflt_fonction_libelle' name='form_value_deflt_fonction_libelle' value='" . htmlentities($f, ENT_QUOTES, $charset) . "' />\n\t\t\t\t\t\t<input type='button' class='bouton_small' value='" . $msg['parcourir'] . "' onclick=\"openPopUp('./select.php?what=function&caller=userform&p1=form_value_deflt_fonction&p2=form_value_deflt_fonction_libelle', 'select_func0', 400, 400, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" />\n\t\t\t\t\t\t<input type='button' class='bouton_small' value='X' onclick=\"this.form.elements['form_value_deflt_fonction'].value='';this.form.elements['form_value_deflt_fonction_libelle'].value='';return false;\" />\n\t\t\t\t\t\t<input type='hidden' name='form_value_deflt_fonction' id='form_value_deflt_fonction' value=\"\${$field}\" />\n\t\t\t\t\t\t</div></div><br />"; break; case "value_deflt_lang": $llist = new marc_list('lang'); $l = $llist->table[${$field}]; $html .= "<div class='row'><div class='colonne60'>\n\t\t\t\t\t\t{$msg[$field]} : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t<input type='text' class='saisie-30emr' id='form_value_deflt_lang_libelle' name='form_value_deflt_lang_libelle' value='" . htmlentities($l, ENT_QUOTES, $charset) . "' />\n\t\t\t\t\t\t<input type='button' class='bouton_small' value='" . $msg['parcourir'] . "' onclick=\"openPopUp('./select.php?what=lang&caller=userform&p1=form_value_deflt_lang&p2=form_value_deflt_lang_libelle', 'select_lang', 400, 400, -2, -2, 'scrollbars=yes, toolbar=no, dependent=yes, resizable=yes')\" />\n\t\t\t\t\t\t<input type='button' class='bouton_small' value='X' onclick=\"this.form.elements['form_value_deflt_lang'].value='';this.form.elements['form_value_deflt_lang_libelle'].value='';return false;\" />\n\t\t\t\t\t\t<input type='hidden' name='form_value_deflt_lang' id='form_value_deflt_lang' value=\"\${$field}\" />\n\t\t\t\t\t\t</div></div><br />"; break; case "value_deflt_relation": case "value_deflt_relation_serial": case "value_deflt_relation_bulletin": case "value_deflt_relation_analysis": $html .= "<div class='row'><div class='colonne60'>\n\t\t\t\t\t\t{$msg[$field]} : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>"; $liste_type_relation_down = new marc_list("relationtypedown"); $liste_type_relation_up = new marc_list("relationtypeup"); $liste_type_relation_both = array(); foreach ($liste_type_relation_up->table as $key_up => $val_up) { foreach ($liste_type_relation_down->table as $key_down => $val_down) { if ($val_up == $val_down) { $liste_type_relation_both[$key_down] = $val_down; unset($liste_type_relation_down->table[$key_down]); unset($liste_type_relation_up->table[$key_up]); } } } $html .= "<select onchange='' name='form_" . $field . "' size='1'>\n\t\t\t\t\t\t<optgroup class='erreur' label='{$msg['notice_lien_montant']}'>"; foreach ($liste_type_relation_up->table as $key => $val) { if ($key . '-up' == ${$field}) { $html .= '<option style="color:#000000" value="' . $key . '-up" selected="selected">' . $val . '</option>'; } else { $html .= '<option style="color:#000000" value="' . $key . '-up">' . $val . '</option>'; } } $html .= "</optgroup>\n\t\t\t\t\t\t<optgroup class='erreur' label='{$msg['notice_lien_descendant']}'>"; foreach ($liste_type_relation_down->table as $key => $val) { if ($key . '-down' == ${$field}) { $html .= '<option style="color:#000000" value="' . $key . '-down" selected="selected" >' . $val . '</option>'; } else { $html .= '<option style="color:#000000" value="' . $key . '-down">' . $val . '</option>'; } } $html .= "</optgroup>\n\t\t\t\t\t\t<optgroup class='erreur' label='{$msg['notice_lien_symetrique']}'>"; foreach ($liste_type_relation_both as $key => $val) { if ($key . '-down' == ${$field}) { $html .= '<option style="color:#000000" value="' . $key . '-down" selected="selected" >' . $val . '</option>'; } else { $html .= '<option style="color:#000000" value="' . $key . '-down">' . $val . '</option>'; } } $html .= "</optgroup>\n\t\t\t\t\t\t</select>"; $html .= "</div></div><br />"; break; default: $html .= "<div class='row'><div class='colonne60'>\n\t\t\t\t\t\t{$msg[$field]} : </div>\n\n\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t<input type='text' class='saisie-20em' name='form_{$field}' value='" . htmlentities(${$field}, ENT_QUOTES, $charset) . "' />\n\t\t\t\t\t\t</div></div><br />"; break; } break; case "deflt2": if ($field == "deflt2docs_location") { // localisation des lecteurs $deflt_table = substr($field, 6); $requete = "select * from " . $deflt_table . " order by 2"; $resultat_liste = mysql_query($requete, $dbh); $nb_liste = mysql_num_rows($resultat_liste); if ($nb_liste == 0) { $html .= ""; } else { $html .= "\n\t\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t<select class='saisie-30em' name=\"form_" . $field . "\">"; $j = 0; while ($j < $nb_liste) { $liste_values = mysql_fetch_row($resultat_liste); $html .= "<option value=\"" . $liste_values[0] . "\" "; if (${$field} == $liste_values[0]) { $html .= "selected='selected' "; } $html .= ">" . $liste_values[1] . "</option>\n"; $j++; } $html .= "</select></div></div>!!param_allloc!!<br />\n"; } } else { $deflt_table = substr($field, 6); $requete = "select * from " . $deflt_table . " order by 2 "; $resultat_liste = mysql_query($requete, $dbh); $nb_liste = mysql_numrows($resultat_liste); if ($nb_liste == 0) { $html .= ""; } else { $html .= "\n\t\t\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t\t\t<div class='colonne_suite'>\n\t\t\t\t\t\t\t\t\t<select class='saisie-30em' name=\"form_" . $field . "\">"; $j = 0; while ($j < $nb_liste) { $liste_values = mysql_fetch_row($resultat_liste); $html .= "<option value=\"" . $liste_values[0] . "\" "; if (${$field} == $liste_values[0]) { $html .= "selected='selected' "; } $html .= ">" . $liste_values[1] . "</option>\n"; $j++; } $html .= "</select></div></div>\n"; } } break; case "xmlta_": switch ($field) { case "xmlta_indexation_lang": $langues = new XMLlist("{$include_path}/messages/languages.xml"); $langues->analyser(); $clang = $langues->table; $combo = "<select name='form_" . $field . "' id='form_" . $field . "' class='saisie-20em' >"; if (!${$field}) { $combo .= "<option value='' selected>--</option>"; } else { $combo .= "<option value='' >--</option>"; } while (list($cle, $value) = each($clang)) { // arabe seulement si on est en utf-8 if ($charset != 'utf-8' and $user_lang != 'ar' or $charset == 'utf-8') { if (strcmp($cle, ${$field}) != 0) { $combo .= "<option value='{$cle}'>{$value} ({$cle})</option>"; } else { $combo .= "<option value='{$cle}' selected>{$value} ({$cle})</option>"; } } } $combo .= "</select>"; $html .= "\n\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t<div class='colonne_suite'>{$combo}</div></div>\n"; break; case "xmlta_doctype_serial": $html .= "\n\t\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t\t<div class='colonne_suite'>"; $select_doc = new marc_select("doctype", "form_" . $field, ${$field}, ""); $html .= $select_doc->display; $html .= "</div></div>\n"; break; case "xmlta_doctype_bulletin": case "xmlta_doctype_analysis": $html .= "\n\t\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t\t<div class='colonne_suite'>"; $select_doc = new marc_select("doctype", "form_" . $field, ${$field}, "", "0", $msg[$field . "_parent"]); $html .= $select_doc->display; $html .= "</div></div>\n"; break; default: $deflt_table = substr($field, 6); $html .= "\n\t\t\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "\n\t\t\t\t\t\t\t<div class='colonne_suite'>"; $select_doc = new marc_select("{$deflt_table}", "form_" . $field, ${$field}, ""); $html .= $select_doc->display; $html .= "</div></div>\n"; break; } case "deflt3": $q = ''; $t = array(); switch ($field) { case "deflt3bibli": $q = "select 0,'" . addslashes($msg['deflt3none']) . "' union "; $q .= "select id_entite, raison_sociale from entites where type_entite='1' order by 2 "; break; case "deflt3exercice": $q = "select 0,'" . addslashes($msg['deflt3none']) . "' union "; $q .= "select id_exercice, libelle from exercices order by 2 "; break; case "deflt3rubrique": $q = "select 0,'" . addslashes($msg['deflt3none']) . "' union "; $q .= "select id_rubrique, concat(budgets.libelle,':', rubriques.libelle) from rubriques join budgets on num_budget=id_budget order by 2 "; break; case "deflt3dev_statut": $t = actes::getStatelist(TYP_ACT_DEV); break; case "deflt3cde_statut": $t = actes::getStatelist(TYP_ACT_CDE); break; case "deflt3liv_statut": $t = actes::getStatelist(TYP_ACT_LIV); break; case "deflt3fac_statut": $t = actes::getStatelist(TYP_ACT_FAC); break; case "deflt3sug_statut": $m = new suggestions_map(); $t = $m->getStateList(); break; case 'deflt3lgstatcde': case 'deflt3lgstatdev': $q = lgstat::getList('QUERY'); break; case 'deflt3receptsugstat': $m = new suggestions_map(); $t = $m->getStateList('ORDERED', TRUE); break; } if ($q) { $r = mysql_query($q, $dbh); $nb = mysql_num_rows($r); while ($row = mysql_fetch_row($r)) { $t[$row[0]] = $row[1]; } } if (count($t)) { $html .= "<div class='row'><div class='colonne60'>" . $msg[$field] . " : </div>\n"; $html .= "<div class='colonne_suite'><select class='saisie-30em' name=\"form_" . $field . "\">"; foreach ($t as $k => $v) { $html .= "<option value=\"" . $k . "\" "; if (${$field} == $k) { $html .= "selected='selected' "; } $html .= ">" . htmlentities($v, ENT_QUOTES, $charset) . "</option>\n"; } $html .= "</select></div></div><br />\n"; } break; case "speci_": $speci_func = substr($field, 6); eval('$speci_user.= get_' . $speci_func . '($id, $$field, $i, \'userform\');'); break; case "explr_": ${$field} = ${$field}; break; default: break; } switch ($field) { case "deflt2docs_location": $html = str_replace("!!param_allloc!!", self::get_user_param_form("param_allloc"), $html); break; } return $html; }