本文整理汇总了PHP中parametres_perso::show_search_fields方法的典型用法代码示例。如果您正苦于以下问题:PHP parametres_perso::show_search_fields方法的具体用法?PHP parametres_perso::show_search_fields怎么用?PHP parametres_perso::show_search_fields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parametres_perso
的用法示例。
在下文中一共展示了parametres_perso::show_search_fields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlentities
function show_list_form()
{
global $form_filtre_demande, $form_liste_demande;
global $dbh, $charset, $msg;
global $idetat, $iduser, $idempr, $user_input;
global $date_debut, $date_fin, $id_type, $id_theme, $dmde_loc;
//Formulaire des filtres
$date_deb = "\n\t\t\t<input type='hidden' id='date_debut' name='date_debut' value='!!date_debut!!' />\n\t\t\t<input type='button' class='bouton' id='date_debut_btn' name='date_debut_btn' value='!!date_debut_btn!!' onClick=\"openPopUp('./select.php?what=calendrier&caller=search&date_caller=!!date_debut!!¶m1=date_debut¶m2=date_debut_btn&auto_submit=NO&date_anterieure=YES', 'date_debut', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"/>\n\t\t";
$date_but = "\n\t\t\t<input type='hidden' id='date_fin' name='date_fin' value='!!date_fin!!' />\n\t\t\t<input type='button' class='bouton' id='date_fin_btn' name='date_fin_btn' value='!!date_fin_btn!!' onClick=\"openPopUp('./select.php?what=calendrier&caller=search&date_caller=!!date_fin!!¶m1=date_fin¶m2=date_fin_btn&auto_submit=NO&date_anterieure=YES', 'date_fin', 250, 300, -2, -2, 'toolbar=no, dependent=yes, resizable=yes')\"/>\n\t\t";
//Affichage de l'état en entete de page (si séléctioné)
if ($idetat) {
$form_filtre_demande = str_replace('!!etat_demandes!!', htmlentities(stripslashes($this->liste_etat[$idetat]['comment']), ENT_QUOTES, $charset), $form_filtre_demande);
} else {
$form_filtre_demande = str_replace('!!etat_demandes!!', "", $form_filtre_demande);
}
if ($date_debut && $date_fin) {
$date_deb = str_replace('!!date_debut_btn!!', formatdate($date_debut), $date_deb);
$date_but = str_replace('!!date_fin_btn!!', formatdate($date_fin), $date_but);
$date_deb = str_replace('!!date_debut!!', $date_debut, $date_deb);
$date_but = str_replace('!!date_fin!!', $date_fin, $date_but);
} else {
$date_lib = formatdate(today());
$date_sql = date("Y-m-d", time());
$date_deb = str_replace('!!date_debut_btn!!', $date_lib, $date_deb);
$date_but = str_replace('!!date_fin_btn!!', $date_lib, $date_but);
$date_deb = str_replace('!!date_debut!!', $date_sql, $date_deb);
$date_but = str_replace('!!date_fin!!', $date_sql, $date_but);
}
if ($idempr) {
$form_filtre_demande = str_replace('!!idempr!!', $idempr, $form_filtre_demande);
$carac_empr = $this->getCaracEmpr($idempr);
$nom = $carac_empr['nom'];
$form_filtre_demande = str_replace('!!empr_txt!!', $nom, $form_filtre_demande);
} else {
$form_filtre_demande = str_replace('!!idempr!!', '', $form_filtre_demande);
$form_filtre_demande = str_replace('!!empr_txt!!', '', $form_filtre_demande);
}
$form_filtre_demande = str_replace('!!user_input!!', htmlentities(stripslashes($user_input), ENT_QUOTES, $charset), $form_filtre_demande);
$form_filtre_demande = str_replace('!!periode!!', sprintf($msg['demandes_filtre_periode_lib'], $date_deb, $date_but), $form_filtre_demande);
$onchange = "onchange='this.form.act.value=\"search\";submit()'";
$form_filtre_demande = str_replace('!!affectation!!', $this->getUsersSelector($onchange, true, false, true), $form_filtre_demande);
$form_filtre_demande = str_replace('!!state!!', $this->getStateSelector($idetat, $onchange, true), $form_filtre_demande);
$themes = new demandes_themes('demandes_theme', 'id_theme', 'libelle_theme', $id_type);
$types = new demandes_types('demandes_type', 'id_type', 'libelle_type', $id_theme);
$form_filtre_demande = str_replace('!!theme!!', $themes->getListSelector($id_theme, $onchange, true), $form_filtre_demande);
$form_filtre_demande = str_replace('!!type!!', $types->getListSelector($id_type, $onchange, true), $form_filtre_demande);
$req_loc = "select idlocation, location_libelle from docs_location";
$res_loc = pmb_mysql_query($req_loc, $dbh);
$sel_loc = "<select id='dmde_loc' name='dmde_loc' onchange='this.form.act.value=\"search\";submit()' >";
$sel_loc .= "<option value='0' " . (!$dmde_loc ? 'selected' : '') . ">" . htmlentities($msg['demandes_localisation_all'], ENT_QUOTES, $charset) . "</option>";
while ($loc = pmb_mysql_fetch_object($res_loc)) {
$sel_loc .= "<option value='" . $loc->idlocation . "' " . ($dmde_loc == $loc->idlocation ? 'selected' : '') . ">" . htmlentities($loc->location_libelle, ENT_QUOTES, $charset) . "</option>";
}
$sel_loc .= "</select>";
$form_filtre_demande = str_replace('!!localisation!!', $sel_loc, $form_filtre_demande);
$p_perso = new parametres_perso("demandes");
if (!$p_perso->no_special_fields) {
$c = 0;
$perso_ = $p_perso->show_search_fields();
for ($i = 0; $i < count($perso_["FIELDS"]); $i++) {
$p = $perso_["FIELDS"][$i];
if ($c == 0) {
$perso .= "<div class='row'>";
}
$perso .= "<div class='colonne3'><label for='" . $p["NAME"] . "' class='etiquette'>" . $p["TITRE"] . "</label><div class='row'>" . $p["AFF"] . "</div></div>";
$c++;
if ($c == 3) {
$perso .= "</div>";
$c = 0;
}
}
if ($c == 1) {
$perso .= "<div class='colonne2'> </div><div class='colonne2'> </div></div>";
} elseif ($c == 2) {
$perso .= "<div class='colonne2'> </div></div>";
}
}
$form_filtre_demande = str_replace("!!champs_perso!!", $perso, $form_filtre_demande);
print $form_filtre_demande;
$header_champs_perso = "";
reset($p_perso->t_fields);
$nb_cp_column = 0;
while (list($key, $val) = each($p_perso->t_fields)) {
$header_champs_perso .= "<th>" . htmlentities($val["TITRE"], ENT_QUOTES, $charset) . "</th>";
$nb_cp_column++;
}
//Formulaire de la liste
$req = self::getQueryFilter($idetat, $iduser, $idempr, $user_input, $date_debut, $date_fin, $id_theme, $id_type, $dmde_loc);
$res = pmb_mysql_query($req, $dbh);
$liste = "";
if (pmb_mysql_num_rows($res)) {
$parity = 1;
while ($dmde = pmb_mysql_fetch_object($res)) {
$dmde = new demandes($dmde->id_demande);
if ($parity % 2) {
$pair_impair = "even";
} else {
$pair_impair = "odd";
}
$parity += 1;
//.........这里部分代码省略.........