本文整理汇总了PHP中ajax_http_send_response函数的典型用法代码示例。如果您正苦于以下问题:PHP ajax_http_send_response函数的具体用法?PHP ajax_http_send_response怎么用?PHP ajax_http_send_response使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ajax_http_send_response函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_notice
function show_notice($idnotice)
{
$isbd = new mono_display($idnotice, 6, '', 1, '', '', '', 1);
$html = "<div class='row' style='padding-top: 8px;'>" . $isbd->aff_statut . "<h1 style='display: inline;'>" . $isbd->header . "</h1></div>";
$html .= "<div class='row'>" . $isbd->isbd . "</div>";
print ajax_http_send_response($html);
}
示例2: ajax_modify_type_empty_word
function ajax_modify_type_empty_word()
{
global $id_mot, $type_lien;
@mysql_query("update linked_mots set type_lien=" . $type_lien . " where num_mot=" . $id_mot);
semantique::gen_table_empty_word();
ajax_http_send_response("1", "text/text");
return;
}
示例3: show_rapport
function show_rapport()
{
global $msg, $dbh, $base_path, $report_task, $report_error, $task_id, $type_task_id;
$query_chk = "select id_tache from taches where id_tache=" . $task_id;
$res_chk = mysql_query($query_chk, $dbh);
if (mysql_num_rows($res_chk) == '1') {
//date de génération du rapport
$rs = mysql_query("select curdate()");
$date_MySQL = mysql_result($rs, $row);
$tasks = new taches();
foreach ($tasks->types_taches as $type_tache) {
if ($type_tache->id_type == $type_task_id) {
require_once $base_path . "/admin/planificateur/" . $type_tache->name . "/" . $type_tache->name . ".class.php";
eval("\$conn=new " . $type_tache->name . "(\"" . $base_path . "/admin/planificateur/" . $type_tache->name . "\");");
$task_datas = $conn->get_report_datas($task_id);
//affiche le rapport avec passage du template
$report_task = str_replace("!!print_report!!", "<a onclick=\"openPopUp('./pdf.php?pdfdoc=rapport_tache&type_task_id={$type_task_id}&task_id=" . $task_id . "', 'Fiche', 500, 400, -2, -2, 'toolbar=no, dependent=yes, resizable=yes, scrollbars=yes')\" href=\"#\"><img src='" . $base_path . "/images/print.gif' alt='Imprimer...' /></a>", $report_task);
$report_task = str_replace("!!type_tache_name!!", $type_tache->comment, $report_task);
$report_task = str_replace("!!planificateur_task_name!!", $msg["planificateur_task_name"], $report_task);
$report_task = str_replace("!!date_mysql!!", formatdate($date_MySQL), $report_task);
$report_task = str_replace("!!libelle_date_generation!!", $msg["tache_date_generation"], $report_task);
$report_task = str_replace("!!libelle_date_derniere_exec!!", $msg["tache_date_dern_exec"], $report_task);
$report_task = str_replace("!!libelle_heure_derniere_exec!!", $msg["tache_heure_dern_exec"], $report_task);
$report_task = str_replace("!!libelle_date_fin_exec!!", $msg["tache_date_fin_exec"], $report_task);
$report_task = str_replace("!!libelle_heure_fin_exec!!", $msg["tache_heure_fin_exec"], $report_task);
$report_task = str_replace("!!libelle_statut_exec!!", $msg["tache_statut"], $report_task);
$report_task = str_replace("!!report_execution!!", $msg["tache_report_execution"], $report_task);
$report_task = str_replace("!!id!!", $task_datas["id_tache"], $report_task);
$report_task = str_replace("!!libelle_task!!", stripslashes($task_datas["libelle_tache"]), $report_task);
$report_task = str_replace("!!date_dern_exec!!", formatdate($task_datas['start_at'][0]), $report_task);
$report_task = str_replace("!!heure_dern_exec!!", $task_datas['start_at'][1], $report_task);
$report_task = str_replace("!!date_fin_exec!!", formatdate($task_datas['end_at'][0]), $report_task);
$report_task = str_replace("!!heure_fin_exec!!", $task_datas['end_at'][1], $report_task);
$report_task = str_replace("!!status!!", $msg["planificateur_state_" . $task_datas["status"]], $report_task);
$report_task = str_replace("!!percent!!", $task_datas["indicat_progress"], $report_task);
$report_execution = $conn->show_report($task_datas["rapport"]);
$report_task = str_replace("!!rapport!!", $report_execution, $report_task);
ajax_http_send_response($report_task);
return;
}
}
} else {
// contenu non disponible
$report_task = "Contenu non disponible";
ajax_http_send_response($report_error);
// ajax_http_send_error('400',$msg['error_message_invalid_date']);
return;
}
}
示例4: ajax_verif_date
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']);
}
示例5: menuvgetpref
function menuvgetpref()
{
global $page;
$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;
}
示例6: switch
switch ($param['function_to_call']) {
case 'serial_display':
// on a affaire à un périodique
// function serial_display ($id, $level='1', $action_serial='', $action_analysis='', $action_bulletin='', $lien_suppr_cart="",
//$lien_explnum="", $bouton_explnum=1,$print=0,$show_explnum=1, $show_statut=0, $show_opac_hidden_fields=true, $draggable=0, $ajax_mode=0 , $anti_loop='' ) {
$display = new serial_display($param['id'], 6, $param['action_serial'], $param['action_analysis'], $param['action_bulletin'], $param['lien_suppr_cart'], $param['lien_explnum'], $param['bouton_explnum'], $param['print'], 1, 1, 1, 1);
if (SESSrights & CATALOGAGE_AUTH) {
$display->result = "\t<img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click}>{$print_action} !!serial_type!! !!ISBD!!";
} else {
$display->result = "\t{$print_action} !!serial_type!! !!ISBD!!";
}
$display->finalize();
$html = $display->result;
break;
case 'mono_display':
// on a affaire à un bulletin ou monographie
//mono_display($id, $level=1, $action='', $expl=1, $expl_link='', $lien_suppr_cart="", $explnum_link='', $show_resa=0,
//$print=0, $show_explnum=1, $show_statut=0, $anti_loop='', $draggable=0, $no_link=false, $show_opac_hidden_fields=true,$ajax_mode=0,$show_planning=0)
$display = new mono_display($param['id'], 6, $param['action'], $param['expl'], $param['expl_link'], $param['lien_suppr_cart'], $param['explnum_link'], 1, $param['print'], 1, 1, '', 1, false, true, 0, 1);
if (SESSrights & CATALOGAGE_AUTH) {
//$display->result="<div onMouseOver='if(init_drag) init_drag();'><img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"${msg[400]}\" $cart_click>$print_action !!ISBD!!</div>";
$display->result = "<div><img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click}>{$print_action} !!ISBD!!</div>";
} else {
$display->result = " {$print_action} !!ISBD!!";
}
$display->finalize();
$html = $display->result;
break;
}
ajax_http_send_response($html);
示例7: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: retour_change_loc.inc.php,v 1.1 2008-06-04 14:54:25 ohennequin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
require_once $class_path . "/transfert.class.php";
$trans = new transfert();
//supprime le transfert
$trans->retour_exemplaire_supprime_transfert($idexpl, $param);
//change la localisation de l'exemplaire
$num = $trans->retour_exemplaire_change_localisation($idexpl);
ajax_http_send_response($num, "text/xml");
示例8: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: facette.inc.php,v 1.4.2.1 2014-06-25 07:40:29 mbertin Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
require_once $class_path . '/facette_search.class.php';
switch ($sub) {
case 'call_facettes':
session_write_close();
if ($opac_facettes_ajax) {
$tab_result = $_SESSION['tab_result'];
$str .= facettes::make_ajax_facette($tab_result);
ajax_http_send_response($str);
}
break;
case 'see_more':
$facette = new facettes();
if ($charset != "utf-8") {
$sended_datas = utf8_encode($sended_datas);
}
$sended_datas = pmb_utf8_array_decode(json_decode(stripslashes($sended_datas), true));
ajax_http_send_response($facette->see_more($sended_datas['json_facette_plus']));
break;
}
示例9: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: serialcirc_ask_ajax.inc.php,v 1.1 2011-11-22 14:48:59 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
require_once "{$class_path}/serialcirc_diff.class.php";
switch ($sub) {
case '':
$serialcirc_diff = new serialcirc_diff($id_serialcirc, $num_abt);
ajax_http_send_response($serialcirc_diff->option_form());
break;
}
示例10: substr
$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");
示例11: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: del_pret.inc.php,v 1.1 2007-09-14 14:55:42 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
require_once $class_path . "/ajax_pret.class.php";
//$id_expl;
// init de la class
$pret = new do_pret();
$status = $pret->del_pret($id_expl);
ajax_http_send_response("{$status}", "text/xml");
示例12: printer
$id_empr += 0;
$printer = new printer();
if ($pdfcartelecteur_printer_card_handler == 2) {
$printer->printer_jzebra = true;
} else {
$printer->printer_jzebra = false;
}
if ($pdfcartelecteur_printer_card_name) {
$printer->printer_name = $pdfcartelecteur_printer_card_name;
}
if ($pdfcartelecteur_printer_card_url) {
$printer->printer_url = $pdfcartelecteur_printer_card_url;
}
$card_tpl = '';
if (file_exists($base_path . "/circ/print_card/print_card.tpl.php")) {
require_once $base_path . "/circ/print_card/print_card.tpl.php";
}
$printer->initialize();
switch ($sub) {
case 'one':
$r = $printer->print_card($id_empr, $card_tpl);
ajax_http_send_response($r);
break;
case 'get_script':
$r = $printer->get_script();
ajax_http_send_response($r);
break;
default:
ajax_http_send_error('400', "commande inconnue");
break;
}
示例13: die
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_source.inc.php,v 1.1 2015-05-15 12:55:21 jpermanne Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
die("no access");
}
pmb_mysql_query("delete from source_sync where source_id=" . $item);
$result = array('source_id' => $item);
ajax_http_send_response($result);
示例14: pmb_mysql_fetch_object
if ($resultat) {
if (pmb_mysql_num_rows($resultat)) {
$notice = pmb_mysql_fetch_object($resultat);
$cart_click_isbd = "onClick=\"openPopUp('./cart.php?object_type=NOTI&item={$id}', 'cart', 600, 700, -2, -2, '{$selector_prop}')\"";
$cart_click_isbd = "<img src='./images/basket_small_20x20.gif' align='middle' alt='basket' title=\"{$msg[400]}\" {$cart_click_isbd}>";
if ($current !== false) {
$print_action = " <a href='#' onClick=\"openPopUp('./print.php?current_print={$current}¬ice_id=" . $id . "&action_print=print_prepare','print',500,600,-2,-2,'scrollbars=yes,menubar=0'); w.focus(); return false;\"><img src='./images/print.gif' border='0' align='center' alt=\"" . $msg["histo_print"] . "\" title=\"" . $msg["histo_print"] . "\"/></a>";
}
if ($notice->niveau_biblio == 'b') {
// notice de bulletin
$isbd = new mono_display($notice, 6, '', $show_expl, '', '', '', 0, 0, $show_explnum, 0, '', 0, false, true, 0, 0, $show_map);
} elseif ($notice->niveau_biblio != 's' && $notice->niveau_biblio != 'a') {
// notice de monographie
$isbd = new mono_display($notice, 6, '', $show_expl, '', '', '', 0, 0, $show_explnum, 0, '', 0, false, true, 0, 0, $show_map);
} else {
// notice de périodique
$isbd = new serial_display($notice, 5, '', '', '', '', '', 0, 0, $show_explnum, 0, true, 0, 0, '', false, $show_map);
}
// header
$display .= "\n\t\t\t\t\t\t<div class='row' style='padding-top: 8px;'>\n\t\t\t\t\t\t\t" . $isbd->aff_statut . $cart_click_isbd . $print_action . "<h1 style='display: inline;'>" . $isbd->header . "</h1>\n\t\t\t\t\t\t\t </div>";
// isbd + exemplaires existants
$display .= "\n\t\t\t\t\t\t<div class='row'>\n\t\t\t\t\t\t{$isbd->isbd}\n\t\t\t\t\t\t</div>";
// pour affichage de l'image de couverture
if ($pmb_book_pics_show == '1' && ($pmb_book_pics_url && $isbd->notice->code || $isbd->notice->thumbnail_url)) {
$display .= "<script type='text/javascript'>\n\t\t\t\t\t\t\t<!--\n\t\t\t\t\t\t\tvar img = document.getElementById('PMBimagecover" . $id . "');\n\t\t\t\t\t\t\tisbn=img.getAttribute('isbn');\n\t\t\t\t\t\t\tvigurl=img.getAttribute('vigurl');\n\t\t\t\t\t\t\turl_image=img.getAttribute('url_image');\n\t\t\t\t\t\t\tif (vigurl) {\n\t\t\t\t\t\t\t\tif (img.src.substring(img.src.length-8,img.src.length)=='vide.png') {\n\t\t\t\t\t\t\t\t\timg.src=vigurl;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (isbn) {\n\t\t\t\t\t\t\t\t\tif (img.src.substring(img.src.length-8,img.src.length)=='vide.png') {\n\t\t\t\t\t\t\t\t\t\timg.src=url_image.replace(/!!noticecode!!/,isbn);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//-->\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t";
}
}
}
ajax_http_send_response($display);
}
}
示例15: acces
require_once "{$class_path}/acces.class.php";
$ac = new acces();
}
//droits d'acces utilisateur/notice
if ($gestion_acces_active == 1 && $gestion_acces_user_notice == 1 && $dom_id == 1) {
$dom = $ac->setDomain(1);
}
//droits d'acces emprunteur/notice
if ($gestion_acces_active == 1 && $gestion_acces_empr_notice == 1 && $dom_id == 2) {
$dom = $ac->setDomain(2);
}
if (is_object($dom)) {
switch ($fname) {
case 'getNbResourcesToUpdate':
$nb = $dom->getNbResourcesToUpdate();
ajax_http_send_response($nb);
break;
case 'updateRessources':
if (!$nb_done) {
$nb_done = 0;
}
$nb = $dom->applyDomainRights($nb_done, $chk_sav_spe_rights);
ajax_http_send_response($nb);
break;
case 'cleanResources':
$dom->cleanResources();
ajax_http_send_response('done');
default:
break;
}
}