本文整理汇总了PHP中error_message_history函数的典型用法代码示例。如果您正苦于以下问题:PHP error_message_history函数的具体用法?PHP error_message_history怎么用?PHP error_message_history使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了error_message_history函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_maj_environnement
function get_maj_environnement($source_id)
{
global $outputtype, $import_type, $import_file;
global $base_path, $charset;
$envt = array();
//Copie du fichier dans le répertoire temporaire
$origine = str_replace(" ", "", microtime());
$origine = str_replace("0.", "", $origine);
if ($_FILES['import_file']['name']) {
if (!@copy($_FILES['import_file']['tmp_name'], "{$base_path}/temp/" . $origine . $_FILES['import_file']['name'])) {
error_message_history($msg["ie_tranfert_error"], $msg["ie_transfert_error_detail"], 1);
exit;
} else {
$file_in = $origine . $_FILES['import_file']['name'];
}
}
$envt["file_in"] = $file_in;
if (!$import_type) {
$envt["outputtype"] = $outputtype;
}
$envt["import_type"] = $import_type;
$envt["origine"] = $origine;
return $envt;
}
示例2: preg_replace
// regarde si le champ est déjà dans la liste des champs à trier et le remplace si besoin
$new_s = preg_replace("/{$sortfield}, /", "", $s);
$new_s = preg_replace("/{$sortfield}/", "", $new_s);
// ajoute la clause order by correcte
$new_s = preg_replace("/order\\s+by\\s+/i", "order by {$tri}", $new_s);
// replace l'ancienne chaîne par la nouvelle
$valeur = str_replace($s, $new_s, $valeur);
} else {
$valeur .= " order by {$tri}";
}
}
print pmb_bidi("<strong>{$msg['procs_ligne']} {$cle} </strong>: {$valeur}<br /><br />");
if (pmb_strtolower(pmb_substr($valeur, 0, 6)) == "select" || pmb_strtolower(pmb_substr($valeur, 0, 6)) == "create") {
} else {
echo "rqt=" . $valeur . "=<br />";
error_message_history("Requête invalide", "Vous ne pouvez tester que des requêtes de sélection", 1);
exit;
}
if (!explain_requete($valeur)) {
die("<br /><br />" . $valeur . "<br /><br />" . $msg["proc_param_explain_failed"] . "<br /><br />" . $erreur_explain_rqt);
}
$res = @pmb_mysql_query($valeur, $dbh);
$nbr_lignes = @pmb_mysql_num_rows($res);
$nbr_champs = @pmb_mysql_num_fields($res);
if ($nbr_lignes) {
echo "<table >";
for ($i = 0; $i < $nbr_champs; $i++) {
// ajout de liens pour trier les pages
$fieldname = pmb_mysql_field_name($res, $i);
$sortasc = "<a href='{$urlbase}&sortfield=" . ($i + 1) . "&desc=0'>asc</a>";
$sortdesc = "<a href='{$urlbase}&sortfield=" . ($i + 1) . "&desc=1'>desc</a>";
示例3: die
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: expl_update.inc.php,v 1.28 2015-04-16 11:39:22 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
require_once $class_path . "/notice.class.php";
// Pour l'indexation des concepts
require_once $class_path . "/index_concept.class.php";
$expl_id = "";
//Vérification des champs personalisés
$p_perso = new parametres_perso("expl");
$nberrors = $p_perso->check_submited_fields();
if ($nberrors) {
error_message_history($msg["notice_champs_perso"], $p_perso->error_message, 1);
exit;
}
switch ($sub) {
case 'create':
$requete = "SELECT count(1) FROM exemplaires WHERE expl_cb='{$f_ex_cb}' ";
$res = pmb_mysql_query($requete, $dbh);
$nbr_lignes = pmb_mysql_result($res, 0, 0);
$nbr_lignes ? $valid_requete = FALSE : ($valid_requete = TRUE);
$requete = "INSERT INTO exemplaires SET create_date=sysdate(), ";
$limiter = "";
$libelle = $msg[4007];
break;
case 'update':
// ceci teste si l'exemplaire cible existe bien
$requete = "SELECT expl_id FROM exemplaires WHERE expl_cb='{$org_cb}' ";
示例4: explode
$base_nobody = 1;
$base_nosession = 0;
require $base_path . "/includes/init.inc.php";
//Supression du fichier transmis
@unlink("{$base_path}/temp/{$file_in}");
//Fichier converti
$f = explode(".", $file_in);
if (count($f) > 1) {
unset($f[count($f) - 1]);
}
$file_out = implode(".", $f) . "." . $suffix . "~";
//Téléchargement
if (!file_exists("{$base_path}/temp/{$file_out}")) {
print $std_header;
print "<body>";
error_message_history($msg['admin_convert_erreur_destination'], $msg['admin_convert_fichier_existe'], 0);
exit;
}
if ($deliver == 3) {
if (!$mimetype) {
header("Content-Type: application/download");
} else {
header("Content-Type: " . $mimetype);
}
header("Content-Length: " . filesize("{$base_path}/temp/{$file_out}"));
header("Content-Disposition: attachment; filename=" . implode(".", $f) . ".{$suffix}");
@readfile("{$base_path}/temp/{$file_out}");
@unlink("{$base_path}/temp/{$file_out}");
} else {
//@copy("$base_path/temp/$file_out","$base_path/admin/import/unimarc.fic");
@copy("{$base_path}/temp/{$file_out}", "{$base_path}/admin/import/unimarc" . (defined("LOCATION") ? "_" . constant("LOCATION") : "") . ".fic");
示例5: print_results
function print_results($sc, $table, $url, $url_to_search_form, $hidden_form = true, $search_target = "")
{
global $dbh;
global $begin_result_liste;
global $nb_per_page_search;
global $page;
global $charset;
global $search;
global $msg;
global $pmb_nb_max_tri;
global $affich_tris_result_liste;
global $pmb_allow_external_search;
global $show_results_data;
global $option_show_expl, $option_show_notice_fille;
global $gestion_acces_active, $gestion_acces_user_notice;
global $PMBuserid;
global $explr_invisible, $pmb_droits_explr_localises;
//droits d'acces lecture notice
if ($gestion_acces_active == 1 && $gestion_acces_user_notice == 1) {
$ac = new acces();
$dom_1 = $ac->setDomain(1);
$usr_prf = $dom_1->getUserProfile($PMBuserid);
$requete = "delete from {$table} using {$table}, exemplaires, acces_res_1 ";
$requete .= "where ";
$requete .= "{$table}.expl_id=exemplaires.expl_id ";
$requete .= "and expl_bulletin=0 ";
$requete .= "and expl_notice = res_num ";
$requete .= "and usr_prf_num=" . $usr_prf . " and (((res_rights ^ res_mask) & 4)=0) ";
pmb_mysql_query($requete, $dbh);
$requete = "delete from {$table} using {$table}, exemplaires, bulletins, acces_res_1 ";
$requete .= "where ";
$requete .= "{$table}.expl_id=exemplaires.expl_id ";
$requete .= "and expl_notice=0 ";
$requete .= "and expl_bulletin=bulletin_id ";
$requete .= "and bulletin_notice=res_num ";
$requete .= "and usr_prf_num=" . $usr_prf . " and (((res_rights ^ res_mask) & 4)=0) ";
pmb_mysql_query($requete, $dbh);
}
//visibilité des exemplaires
if ($pmb_droits_explr_localises && $explr_invisible) {
$requete = "delete from {$table} using {$table}, exemplaires ";
$requete .= "where ";
$requete .= "{$table}.expl_id=exemplaires.expl_id ";
$requete .= "and expl_location in ({$explr_invisible})";
pmb_mysql_query($requete, $dbh);
}
$start_page = $nb_per_page_search * $page;
$requete = "select count(1) from {$table}";
$res = pmb_mysql_query($requete);
if ($res) {
$nb_results = pmb_mysql_result(pmb_mysql_query($requete), 0, 0);
} else {
$nb_results = 0;
}
$requete = "select {$table}.* from " . $table . ", exemplaires where exemplaires.expl_id={$table}.expl_id";
if ($nb_results > $sc->nb_per_page) {
$requete .= " limit " . $start_page . ", " . $nb_per_page_search;
}
//Y-a-t-il une erreur lors de la recherche ?
if ($sc->error_message) {
error_message_history("", $sc->error_message, 1);
exit;
}
if ($hidden_form) {
print $sc->make_hidden_search_form($url);
}
$resultat = pmb_mysql_query($requete, $dbh);
$human_requete = $sc->make_human_query();
print "<strong>" . $msg["search_search_exemplaire"] . "</strong> : " . $human_requete;
if ($nb_results) {
print " => " . $nb_results . " " . $msg["search_expl_nb_result"] . "<br />\n";
print $begin_result_liste;
if ($sc->rec_history) {
//Affichage des liens paniers et impression
$current = $_SESSION["CURRENT"];
if ($current !== false) {
print " <a href='#' onClick=\"openPopUp('./print_cart.php?current_print={$current}&action=print_prepare','print',600,700,-2,-2,'scrollbars=yes,menubar=0,resizable=yes'); return false;\"><img src='./images/basket_small_20x20.gif' border='0' align='center' alt=\"" . $msg["histo_add_to_cart"] . "\" title=\"" . $msg["histo_add_to_cart"] . "\"></a> ";
// if ($nb_results<=$pmb_nb_max_tri) print $affich_tris_result_liste;
}
}
} else {
print "<br />" . $msg["1915"] . " ";
}
print "<input type='button' class='bouton' onClick=\"document.search_form.action='{$url_to_search_form}'; document.search_form.target='{$search_target}'; document.search_form.submit(); return false;\" value=\"" . $msg["search_back"] . "\"/>";
// transformation de la recherche en multicritères: on reposte tout avec mode=6
print " <input type='button' class='bouton' onClick='document.search_transform.submit(); return false;' value=\"" . $msg["search_expl_to_notice_transformation"] . "\"/>";
print "<form name='search_transform' action='./catalog.php?categ=search&mode=6&sub=launch' method='post' style='display:none;'>";
foreach ($_POST as $key => $val) {
if ($val) {
if (is_array($val)) {
foreach ($val as $cle => $val_array) {
if (is_array($val_array)) {
foreach ($val_array as $valeur) {
print "<input type='hidden' name=\"" . $key . "[" . $cle . "][]\" value='" . htmlentities($valeur, ENT_QUOTES, $charset) . "'/>";
}
} else {
print "<input type='hidden' name='" . $key . "[]' value='" . htmlentities($val_array, ENT_QUOTES, $charset) . "'/>";
}
}
} else {
//.........这里部分代码省略.........
示例6: pmb_mysql_query
exit;
}
// controle sur le nouveau code barre si applicable :
if ($org_cb != $f_ex_cb) {
// si le nouveau code-barre est deja utilise, on reste sur l'ancien
$requete = "SELECT expl_id FROM exemplaires WHERE expl_cb='{$f_ex_cb}'";
$myQuery = pmb_mysql_query($requete, $dbh);
if (!($result = pmb_mysql_result($myQuery, 0, 0))) {
$expl_cb = $f_ex_cb;
} else {
// Verif si expl_id est celui poste
if ($expl_id == $result[0]) {
$expl_cb = $org_cb;
} else {
//Erreur: code barre deja existant
error_message_history($msg[301], $msg[303], 1);
exit;
}
}
} else {
$expl_cb = $f_ex_cb;
}
// on prepare la date de creation ou modification
$expl_date = today();
// on recupere les valeurs
$formlocid = "f_ex_section" . $expl_location;
$expl_section = ${$formlocid};
if (!is_numeric($f_ex_nbparts) || !$f_ex_nbparts) {
$f_ex_nbparts = 1;
}
$transfert_origine = "";
示例7: elt_list
function elt_list()
{
global $msg, $charset;
global $elt_query;
global $results_show_all;
$research .= '<b>' . htmlentities($msg['selector_lib_abt'], ENT_QUOTES, $charset) . '</b> ' . htmlentities(stripslashes($elt_query), ENT_QUOTES, $charset);
$this->show_form();
if ($this->nbresults) {
$research .= " => " . sprintf($msg["searcher_results"], $this->nbresults);
if (!$results_show_all && $this->nbepage != 1) {
$research .= " <input type='button' class='bouton_small' onclick='results_show_all();' name='searcher_results_show_all' value='" . htmlentities($msg['searcher_results_show_all'], ENT_QUOTES, $charset) . "'>";
}
$this->elt_b_list = str_replace('!!research!!', $research, $this->elt_b_list);
print $this->elt_b_list;
//Boutons check/uncheck/add selection
print "<div class='row'>\n\t\t\t\t\t\t<input type='button' class='bouton_small' onclick='check_uncheck(1);' id='searcher_results_check_all' name='searcher_results_check_all' value='" . htmlentities($msg['searcher_results_check_all'], ENT_QUOTES, $charset) . "'>\n\t\t\t\t\t\t \n\t\t\t\t\t\t<input type='button' class='bouton_small' onclick='add_selection();' id='searcher_results_add_selection' name='searcher_results_add_selection' value='" . htmlentities($msg['searcher_results_add_selection'], ENT_QUOTES, $charset) . "'>\n\t\t\t\t\t</div>";
print "<form name='searcher_results_check_form'>";
// on lance la requête
while ($nz = pmb_mysql_fetch_object($this->t_query)) {
// abonnement
$abt = new sel_abt_display($nz->abt_id, $this->base_url, 'sel_searcher_select_');
$abt->action = $this->action;
$abt->action_values = $this->action_values;
$abt->doForm();
$list .= $this->elt_r_list;
if (count($this->elt_r_list_values)) {
foreach ($this->elt_r_list_values as $v) {
$list = str_replace("!!{$v}!!", $abt->{$v}, $list);
}
}
}
print $list;
// fin de liste
print "</form>";
print $this->elt_e_liste;
print $this->back_script;
print $this->back_script_show_all;
} else {
error_message_history($msg[357], $msg[1915], 1);
}
}
示例8: error_message_history
exit;
}
}
if ($qt->quota_type["MAX"] && $default_value > $max_value && $max_value * 1 != 0) {
error_message_history($msg["quotas_error"], $msg["quotas_error_default_gt_max"], 1);
exit;
}
if ($qt->quota_type["MIN"] && $default_value < $min_value && $min_value * 1 != 0) {
error_message_history($msg["quotas_error"], $msg["quotas_error_default_lt_min"], 1);
exit;
}
$already = array();
for ($i = 0; $i < count($elements); $i++) {
$as = array_search($conflict_list[$i], $already);
if ($as !== NULL && $as !== FALSE) {
error_message_history($msg["quotas_error_order"], sprintf($msg["quotas_error_order_detail"], count($elements)), 1);
exit;
} else {
$already[] = $conflict_list[$i];
}
}
}
//Enregistrement des éléments dans la base
$recorded = "";
if ($first == 1) {
//Nettoyage
$requete = "delete from " . $qt->table . " where quota_type=" . $qt->quota_type["ID"] . " and constraint_type in ('MIN','MAX','DEFAULT','CONFLICT','PRIORITY','FORCE_LEND','MAX_QUOTA')";
mysql_query($requete);
//Max
$requete = "insert into " . $qt->table . " (quota_type,constraint_type,elements,value) values(" . $qt->quota_type["ID"] . ",'MAX',0,'" . $max_value . "')";
mysql_query($requete);
示例9: save
static function save(&$demande)
{
global $dbh, $pmb_type_audit;
if ($demande->id_demande) {
//MODIFICATION
$query = "UPDATE demandes SET\n\t\t\tsujet_demande='" . $demande->sujet_demande . "',\r\n\t\t\tnum_demandeur='" . $demande->num_demandeur . "',\r\n\t\t\tdate_demande='" . $demande->date_demande . "',\r\n\t\t\tdeadline_demande='" . $demande->deadline_demande . "',\r\n\t\t\tdate_prevue='" . $demande->date_prevue . "',\r\n\t\t\tprogression='" . $demande->progression . "',\r\n\t\t\ttitre_demande='" . $demande->titre_demande . "',\r\n\t\t\ttype_demande='" . $demande->type_demande . "',\r\n\t\t\ttheme_demande='" . $demande->theme_demande . "',\n\t\t\tnum_user_cloture='" . $demande->num_user_cloture . "',\n\t\t\tnum_linked_notice = '" . $demande->get_num_linked_notice() . "'\r\n\t\t\tWHERE id_demande='" . $demande->id_demande . "'";
pmb_mysql_query($query, $dbh);
if ($pmb_type_audit) {
audit::insert_modif(AUDIT_DEMANDE, $demande->id_demande);
}
} else {
//On ajoute une notice ?
self::save_notice($demande);
//CREATION de la demande
$query = "INSERT INTO demandes SET\n\t\t\tsujet_demande='" . $demande->sujet_demande . "',\r\n\t\t\tetat_demande='" . $demande->etat_demande . "',\r\n\t\t\tnum_demandeur='" . $demande->num_demandeur . "',\r\n\t\t\tdate_demande='" . $demande->date_demande . "',\r\n\t\t\tdate_prevue='" . $demande->date_prevue . "',\r\n\t\t\tdeadline_demande='" . $demande->deadline_demande . "',\r\n\t\t\tprogression='" . $demande->progression . "',\r\n\t\t\ttitre_demande='" . $demande->titre_demande . "',\r\n\t\t\ttype_demande='" . $demande->type_demande . "',\r\n\t\t\ttheme_demande='" . $demande->theme_demande . "',\r\n\t\t\tnum_notice='" . $demande->num_notice . "',\n\t\t\tdmde_read_opac='1',\n\t\t\tnum_linked_notice = '" . $demande->get_num_linked_notice() . "'";
pmb_mysql_query($query, $dbh);
$demande->id_demande = pmb_mysql_insert_id($dbh);
if ($pmb_type_audit) {
audit::insert_creation(AUDIT_DEMANDE, $demande->id_demande);
}
}
//Vérification des champs personalisés
$p_perso = new parametres_perso("demandes");
$nberrors = $p_perso->check_submited_fields();
if ($nberrors) {
error_message_history("", $p_perso->error_message, 1);
} else {
//Insertion des champs personalisés
$p_perso->rec_fields_perso($demande->id_demande);
}
//MAJ des users de la demande
self::save_demandes_users($demande);
}
示例10: z3950_notice
}
} else {
$integrate = false;
}
if ($integrate == false || $force == 1) {
$z = new z3950_notice("unimarc", $infos['notice'], $infos['source_id']);
$z->libelle_form = isset($notice_id) ? $msg[notice_connecteur_remplace_catal] : '';
if ($z->bibliographic_level == "a" && $z->hierarchic_level == "2") {
$form = $z->get_form("catalog.php?categ=search&mode=7&sub=integre&action=record" . $notice_id_info . "&item={$item}", 0, 'button', true);
} else {
$form = $z->get_form("catalog.php?categ=search&mode=7&sub=integre&action=record" . $notice_id_info . "&item={$item}", 0, 'button');
}
if (isset($notice_id)) {
$form = str_replace("<!--!!form_title!!-->", "<h3>" . sprintf($msg["notice_replace_external_action"], $notice_id, $item) . "</h3>", $form);
} else {
$form = str_replace("<!--!!form_title!!-->", "<h3>" . sprintf($msg["connecteurs_integrate"], $item) . "</h3>", $form);
}
$form = str_replace("<!--form_suite-->", "<input type='hidden' name='serialized_search' value='" . htmlentities($sc->serialize_search(), ENT_QUOTES, $charset) . "'/><input type='hidden' name='page' value='" . htmlentities($page, ENT_QUOTES, $charset) . "'/>", $form);
print $form;
} else {
$tab = new stdClass();
$tab->POST = $_POST;
$tab->GET = $_GET;
$force_url = htmlentities(serialize($tab), ENT_QUOTES, $charset);
print "<br /><br />\n\t\t\t\t<div class='erreur'>{$msg['540']}</div>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<div class='colonne10'>\n\t\t\t\t\t\t\t<img src='./images/error.gif' align='left'>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class='colonne80'>\n\t\t\t\t\t\t\t<strong>" . $msg['external_notice_already_integrate'] . "</strong>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='row'>{$notice_display}</div>\n\t\t\t\t\t<script src='{$javascript_path}/tablist.js'></script>\n\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t<form class='form-{$current_module}' name='dummy' method='post' action='./catalog.php?categ=search&mode=7&sub=integre&item={$item}&force=1'>\n\t\t\t\t\t\t\t<input type='hidden' name='serialized_search' value='" . htmlentities($sc->serialize_search(), ENT_QUOTES, $charset) . "'/>\n\t\t\t\t\t\t\t<input type='button' name='ok' class='bouton' value=\" " . $msg['external_integrate_back'] . " \" onClick='history.go(-1);'>\n\t\t\t\t\t\t\t<input type='submit' name='force_button' class='bouton' value=\" " . $msg['external_force_integration'] . " \">\n\t\t\t\t\t\t</form>\n\t\t\t\t\t\t<script type='text/javascript'>document.forms['dummy'].elements['ok'].focus();</script>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
}
} else {
error_message_history($msg["connecteurs_unable_to_convert_title"], $msg["connecteurs_unable_to_convert"], 1);
}
break;
}
示例11: count
if (!$page) {
$page = 1;
}
$debut = ($page - 1) * $nb_per_page;
$requete = "select count(1) from {$table}";
$res = mysql_query($requete);
if ($res) {
$nbr_lignes = mysql_result($res, 0, 0);
} else {
$nbr_lignes = 0;
}
if ($nbr_lignes) {
$requete = "select {$table}.* from " . $table . ", empr where empr.id_empr={$table}.id_empr";
//Y-a-t-il une erreur lors de la recherche ?
if ($sc->error_message) {
error_message_history("", $sc->error_message, 1);
exit;
}
print $sc->make_hidden_search_form($url, "form_filters");
$res = mysql_query($requete, $dbh);
$human_requete = $sc->make_human_query();
print "<strong>" . $msg["search_search_emprunteur"] . "</strong> : " . $human_requete;
if ($nbr_lignes) {
print " => " . $nbr_lignes . " " . $msg["search_empr_nb_result"] . "<br />\n";
$tab_id_empr = array();
while ($row = mysql_fetch_object($res)) {
$tab_id_empr[] = $row->id_empr;
}
$clause = "WHERE id_empr in('" . implode("','", $tab_id_empr) . "')";
} else {
print "<br />" . $msg["1915"] . " ";
示例12: mysql_query
case 'update':
if ($retard_periodicite >= $seuil_periodicite || $retard_periodicite == 0) {
if ($id) {
$requete = "UPDATE abts_periodicites SET libelle='{$libelle}',duree='{$duree}',unite='{$unite}', seuil_periodicite='{$seuil_periodicite}', retard_periodicite='{$retard_periodicite}', retard_periodicite='{$retard_periodicite}' , consultation_duration='{$consultation_duration}' WHERE periodicite_id='{$id}' ";
$res = mysql_query($requete, $dbh);
show_statut($dbh);
} else {
$requete1 = mysql_query("SELECT count(*) FROM abts_periodicites WHERE libelle='{$libelle}'");
if ($requete1) {
$result1 = mysql_fetch_array($requete1);
if ($result1[0] == 0) {
$requete = "INSERT INTO abts_periodicites SET libelle='{$libelle}',duree='{$duree}',unite='{$unite}', seuil_periodicite='{$seuil_periodicite}', retard_periodicite='{$retard_periodicite}' , consultation_duration='{$consultation_duration}' ";
$res = mysql_query($requete, $dbh);
show_statut($dbh);
} else {
error_message_history($msg[periodicite_existante], $msg[periodicite_existante], 1);
}
mysql_free_result($requete1);
} else {
print $msg['err_sql'] . "\n";
print mysql_error();
}
}
} else {
error_message($msg[retard_rapport_seuil], $msg[retard_rapport_seuil], 1, 'admin.php?categ=abonnements&sub=periodicite&action=');
}
break;
case 'add':
if (empty($libelle)) {
statut_form();
} else {
示例13: count
case 'modif':
break;
case 'update':
if ($req_name && $req_code) {
$requete = "SELECT count(1) FROM procs WHERE name='" . $req_name . "' ";
$res = mysql_query($requete, $dbh);
$nbr_lignes = mysql_result($res, 0, 0);
if (!$nbr_lignes) {
if (is_array($user_aut)) {
$autorisations = implode(" ", $user_aut);
} else {
$autorisations = '';
}
$param_name = check_param($req_code);
if ($param_name !== true) {
error_message_history($param_name, sprintf($msg['proc_param_check_field_name'], $param_name), 1);
exit;
}
$requete = "INSERT INTO procs (idproc,name,requete,comment,autorisations,num_classement) VALUES ('', '{$req_name}', '{$req_code}', '{$req_comm}', '{$autorisations}', '{$form_classement}' ) ";
$res = mysql_query($requete, $dbh);
} else {
print "<script language='Javascript'>alert(\"" . addslashes($msg[709]) . "\");</script>";
}
print "<script type='text/javascript'> document.location='./admin.php?categ=proc&sub=proc&action='</script>";
}
break;
case 'del':
break;
case 'list':
default:
break;
示例14: sprintf
}
// fin if autre procédure
}
}
$error_message = "";
print sprintf($msg["caddie_action_flag_processed"], $nb_elements_flag) . "<br />";
print sprintf($msg["caddie_action_no_flag_processed"], $nb_elements_no_flag) . "<br />";
print "<b>" . sprintf($msg["caddie_action_total_processed"], $nb_elements_no_flag + $nb_elements_flag) . "</b><br /><br />";
if ($error_message_flag) {
$error_message .= sprintf($msg["caddie_action_error"], $error_message_flag) . "<br />";
}
if ($error_message_no_flag) {
$error_message .= sprintf($msg["caddie_action_error"], $error_message_no_flag);
}
if ($error_message) {
error_message_history($msg["caddie_action_invalid_query"], $error_message, 1);
exit;
}
}
print aff_cart_nb_items($myCart);
echo "<hr /><input type='button' class='bouton' value='" . $msg["caddie_select_reindex"] . "' onclick='document.location="./catalog.php?categ=caddie&sub=action&quelle=reindex&action=suite&idcaddie=" . $idcaddie . "&elt_flag=" . $elt_flag . "&elt_no_flag=" . $elt_no_flag . ""' />";
echo "<input type='button' class='bouton' value='" . $msg["caddie_menu_action_suppr_panier"] . "' onclick='document.location="./catalog.php?categ=caddie&sub=action&quelle=supprpanier&action=choix_quoi&object_type=NOTI&idcaddie=" . $idcaddie . "&item=0&elt_flag=" . $elt_flag . "&elt_no_flag=" . $elt_no_flag . ""' />";
break;
default:
print aff_cart_nb_items($myCart);
print $cart_choix_quoi_action;
show_procs($idcaddie);
break;
}
} else {
aff_paniers($idcaddie, "NOTI", "./catalog.php?categ=caddie&sub=action&quelle=selection", "", $msg["caddie_select_for_action"], "", 0, 0, 0);
示例15: show_results_fichier
function show_results_fichier($url, $url_to_search_form, $hidden_form = true, $search_target = "", $acces = false)
{
global $dbh;
global $begin_result_liste;
global $nb_per_page_search;
global $page, $dest;
global $charset;
global $search;
global $msg;
global $pmb_nb_max_tri;
global $affich_tris_result_liste;
global $pmb_allow_external_search;
global $debug;
global $gestion_acces_active, $gestion_acces_user_notice, $PMBuserid, $pmb_allow_external_search;
global $link_bulletin;
$start_page = $nb_per_page_search * $page;
//Y-a-t-il des champs ?
if (count($search) == 0) {
error_message_history($msg["search_empty_field"], $msg["search_no_fields"], 1);
exit;
}
//Verification des champs vides
for ($i = 0; $i < count($search); $i++) {
$op = "op_" . $i . "_" . $search[$i];
global ${$op};
$field_ = "field_" . $i . "_" . $search[$i];
global ${$field_};
$field = ${$field_};
$s = explode("_", $search[$i]);
$bool = false;
if ($s[0] == "f") {
$champ = $this->fixedfields[$s[1]]["TITLE"];
if ((string) $field[0] == "") {
$bool = true;
}
} elseif (array_key_exists($s[0], $this->pp)) {
$champ = $this->pp[$s[0]]->t_fields[$s[1]]["TITRE"];
if ((string) $field[0] == "") {
$bool = true;
}
} elseif ($s[0] == "s") {
$champ = $this->specialfields[$s[1]]["TITLE"];
$type = $this->specialfields[$s[1]]["TYPE"];
for ($is = 0; $is < count($this->tableau_speciaux["TYPE"]); $is++) {
if ($this->tableau_speciaux["TYPE"][$is]["NAME"] == $type) {
$sf = $this->specialfields[$s[1]];
global $include_path;
require_once $include_path . "/search_queries/specials/" . $this->tableau_speciaux["TYPE"][$is]["PATH"] . "/search.class.php";
$specialclass = new $this->tableau_speciaux["TYPE"][$is]["CLASS"]($s[1], $sf, $i, $this);
$bool = $specialclass->is_empty($field);
break;
}
}
}
if ($bool && !$this->op_empty[${$op}]) {
error_message_history($msg["search_empty_field"], sprintf($msg["search_empty_error_message"], $champ), 1);
exit;
}
}
$table = $this->make_search();
if ($acces == true && $gestion_acces_active == 1 && $gestion_acces_user_notice == 1) {
$this->filter_searchtable_from_accessrights($table, $PMBuserid);
}
$requete = "select count(1) from {$table}";
$nb_results = pmb_mysql_result(pmb_mysql_query($requete), 0, 0);
//Y-a-t-il une erreur lors de la recherche ?
if ($this->error_message) {
error_message_history("", $this->error_message, 1);
exit;
}
if (!$dest && $hidden_form) {
print $this->make_hidden_search_form($url, "search_form", "", false);
print "<input type='hidden' name='dest' value='' />\n";
print "</form>\n";
}
if ($dest != "TABLEAU") {
$human_requete = $this->make_human_query();
print "<strong>" . $msg["search_search_extended"] . "</strong> : " . $human_requete;
if ($debug) {
print "<br />" . $this->serialize_search();
}
if ($nb_results) {
print " => " . $nb_results . " " . $msg["fiche_found"] . "<br />\n";
} else {
print "<br />" . $msg["1915"] . " ";
}
}
$requete = "select {$table}.* from " . $table . ",fiche where fiche.id_fiche={$table}.id_fiche";
if (!$dest) {
$requete .= " limit " . $start_page . "," . $nb_per_page_search;
}
$resultat = pmb_mysql_query($requete, $dbh);
if (pmb_mysql_num_rows($resultat)) {
$result_fic = array();
$fic = new fiche();
while ($r = pmb_mysql_fetch_object($resultat)) {
$result_fic[$r->id_fiche] = $fic->get_values($r->id_fiche, 1);
}
if ($result_fic) {
if ($dest == "TABLEAUHTML") {
//.........这里部分代码省略.........