function ajax_verif_date() { global $msg, $p1; $mysql_date = extraitdate($p1); $rqt = "SELECT DATE_ADD('" . $mysql_date . "', INTERVAL 0 DAY)"; if ($result = mysql_query($rqt)) { if ($row = mysql_fetch_row($result)) { if ($row[0]) { ajax_http_send_response($row[0]); return; } } } ajax_http_send_error('400', $msg['error_message_invalid_date']); }
$xml_expl .= "<text style=\"p1\"></text>"; $titre = substr($expl->tit, 0, 25); $xml_expl .= "<text style=\"t1_s\">" . htmlspecialchars($titre, ENT_QUOTES, $charset) . "</text>"; $xml_expl .= "<text style=\"t1\" x=\"360\">" . htmlspecialchars($expl->aff_pret_retour, ENT_QUOTES, $charset) . "</text>"; $xml_expl .= "<text style=\"p1\">" . htmlspecialchars($expl->expl_cb . ". " . $msg['fpdf_date_pret'] . " " . $expl->aff_pret_date, ENT_QUOTES, $charset) . "</text>"; $xml_expl .= "<text style=\"ps1\">" . htmlspecialchars($expl->location_libelle . " / " . $expl->section_libelle . " / " . $expl->expl_cote, ENT_QUOTES, $charset) . "</text>"; return $xml_expl; } //En fonction de $sub, inclure les fichiers correspondants switch ($sub) { case 'one': $xml_bibli .= "<text style=\"t1\">" . htmlspecialchars($msg["ticket_de_pret"], ENT_QUOTES, $charset) . "</text>"; $xml_bibli .= print_expl($cb_doc); $xml_bibli .= "<text style=\"t1\"></text>"; break; case 'all': $xml_bibli .= "<text style=\"t1\">" . htmlspecialchars("Liste des prêts:", ENT_QUOTES, $charset) . "</text>"; $query = "select expl_cb from pret,exemplaires where pret_idempr={$id_empr} and expl_id=pret_idexpl "; $result = pmb_mysql_query($query, $dbh); while ($r = pmb_mysql_fetch_array($result)) { $xml_bibli .= print_expl($r['expl_cb']); } $xml_bibli .= "<text style=\"t1\"></text>"; break; default: ajax_http_send_error('400', "commande inconnue"); break; } $xml = file_get_contents($base_path . "/includes/printer/ticket_pret.xml"); $xml = str_replace("!!document-contents!!", $xml_bibli, $xml); ajax_http_send_response($xml, "text/xml");
die("no access"); } switch ($action) { case "date_retour": //permet de changer la date retour d'un transfert include "./circ/transferts/ajax/chg_date_retour.inc.php"; break; case "change_loc": //annule le transfert //et change la localisation d'un exemplaire include "./circ/transferts/ajax/retour_change_loc.inc.php"; break; case "gen_transfert": //annule le changement de localisation //et genere un transfert include "./circ/transferts/ajax/retour_gen_transfert.inc.php"; break; case "loc_retrait": //change la localisation de retrait d'une resa include "./circ/transferts/ajax/chg_loc_retrait.inc.php"; break; case "change_section": //annule le transfert //et change la localisation d'un exemplaire include "./circ/transferts/ajax/chg_section_retour.inc.php"; break; default: //par defaut on renvoie une erreur ajax_http_send_error('400', $msg["ajax_commande_inconnue"]); break; }
$page = rawurldecode($page); if (!$_SESSION["AutoHide"][$page] or sizeof($_SESSION["AutoHide"][$page]) < 1) { $trueids = "0"; } else { $trueids = ""; foreach ($_SESSION["AutoHide"][$page] as $idh3 => $boolh3) { if ($boolh3 == "True") { $trueids .= "t,"; } elseif ($boolh3 == "False") { $trueids .= "f,"; } } } ajax_http_send_response(trim($trueids), "text/text"); return; } switch ($fname) { case "setpref": menuvchgpref(); break; case "getpref": menuvgetpref(); break; default: ajax_http_send_error("404 Not Found", "Invalid command : " . $fname); break; } #maintenant on retourne toutes les nh3 true (liste) de la page considérée, de sorte à #que notre javascript appelant appelle un autre js (lequel sera lancé au chargement de la page aussi) qui #rétracte tous les menus sauf les menus dans la liste des numéros spécifiés. #commenter puis suggerer a flo
break; case "get_datas": $datas = json_decode(stripslashes($datas)); $query = 'select grille_auth_descr_format from grilles_auth where grille_auth_type="' . addslashes($datas->authType) . '" and grille_auth_filter="' . addslashes($datas->authSign) . '"'; $result = pmb_mysql_query($query); if ($result && pmb_mysql_num_rows($result)) { $datas = pmb_mysql_result($result, 0); print encoding_normalize::json_encode(array('status' => true, 'datas' => $datas)); } else { print encoding_normalize::json_encode(array('status' => false)); } break; default: ajax_http_send_error("404 Not Found", "Invalid command : " . $action); break; } function save_grid($auth_type, $auth_sign, $zones) { global $dbh; $query = 'select grille_auth_type from grilles_auth where grille_auth_type="' . addslashes($auth_type) . '" and grille_auth_filter="' . addslashes($auth_sign) . '"'; $result = pmb_mysql_query($query); if ($result && pmb_mysql_num_rows($result)) { $requete = 'update grilles_auth set grille_auth_type="' . addslashes($auth_type) . '", grille_auth_filter="' . addslashes($auth_sign) . '", grille_auth_descr_format="' . addslashes(json_encode($zones)) . '" where grille_auth_type="' . addslashes($auth_type) . '"