コード例 #1
0
function rec_retour($line)
{
    global $action_piege, $piege_resa;
    $form_cb_expl = $line;
    $expl = new expl_to_do($form_cb_expl);
    //print $expl->cb_tmpl;
    //if(!$form_cb_expl) exit;
    $expl->do_form_retour($action_piege, $piege_resa);
    print $expl->expl_form;
    return;
    // la suite n'est plus utilisé
    if ($form_cb_expl) {
        print "<hr />";
        // étape 1 : on regarde si le code-barre est connu
        if ($stuff = check_barcode($form_cb_expl)) {
            $stuff = check_pret($stuff);
            $stuff = check_resa($stuff);
            // on a maintenant un gros objet $stuff avec toutes les infos pour traiter les choses
            // les propriétés de cet objet sont visibles dans la fonction show_reports() plus bas
            // show_report($stuff); // uncomment for debugging
            // appel de la fonction do_retour, qui va gérer tout cela
            do_retour_secouru($stuff);
        } else {
            print "<div class='erreur'>" . $form_cb_expl . " : Exemplaire inconnu" . "</div>";
        }
    }
}
コード例 #2
0
ファイル: retour.inc.php プロジェクト: noble82/proyectos-ULS
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: retour.inc.php,v 1.33 2010-07-06 10:08:48 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once "{$class_path}/emprunteur.class.php";
require_once "{$class_path}/serial_display.class.php";
require_once "{$class_path}/comptes.class.php";
require_once "{$class_path}/amende.class.php";
require_once "{$include_path}/resa.inc.php";
require_once "{$class_path}/expl_to_do.class.php";
// gestion des retours
if ($_GET['cb_expl']) {
    $form_cb_expl = $_GET['cb_expl'];
    $_GET['cb_expl'] = '';
    $confirmed = 1;
} else {
    if ($pmb_confirm_retour) {
        $confirmed = 0;
    } else {
        $confirmed = 1;
    }
}
$expl = new expl_to_do($form_cb_expl);
if ($form_cb_expl) {
    $expl->do_form_retour($action_piege, $piege_resa);
}
print $expl->cb_tmpl . $expl->expl_form;
コード例 #3
0
 function self_checkin($expl_cb, $PMBUserId = -1)
 {
     global $selfservice_pret_expl_inconnu_msg;
     global $charset;
     $ok = 0;
     $titre = $expl_cb;
     $ret["status"] = "";
     $ret["message"] = "";
     $ret["message_loc"] = "";
     $ret["message_resa"] = "";
     $ret["message_retard"] = "";
     $ret["message_amende"] = "";
     $ret["message_blocage"] = "";
     $ret["title"] = "";
     $ret["transaction_date"] = "";
     $ret["message_expl_comment"] = "";
     $ret["message_expl_note"] = "";
     $requete = "select expl_id,expl_bulletin,expl_notice,type_antivol,empr_cb from exemplaires join pret on (expl_id=pret_idexpl) join empr on (pret_idempr=id_empr) where expl_cb='" . addslashes($expl_cb) . "'";
     $resultat = mysql_query($requete);
     if (!$resultat) {
         $ok = 0;
         if ($charset != "utf-8") {
             $ret["message"] = utf8_encode($selfservice_pret_expl_inconnu_msg);
         } else {
             $ret["message"] = $selfservice_pret_expl_inconnu_msg;
         }
     } else {
         $expl = mysql_fetch_object($resultat);
         $empr_cb = $expl->empr_cb;
         if ($expl->expl_bulletin) {
             $isbd = new bulletinage_display($expl->expl_bulletin);
             $titre = $isbd->display;
         } else {
             $isbd = new mono_display($expl->expl_notice, 1);
             $titre = $isbd->header_texte;
         }
         $retour = new expl_to_do($expl_cb);
         // Fonction qu effectue le retour d'un document
         $retour->do_retour_selfservice();
         if ($retour->status == -1) {
             //Problème
             $ok = 0;
         } else {
             //Pas de problème
             $ok = 1;
         }
         if ($charset != "utf-8") {
             $ret["message_loc"] = utf8_encode($retour->message_loc);
             $ret["message_resa"] = utf8_encode($retour->message_resa);
             $ret["message_retard"] = utf8_encode($retour->message_retard);
             $ret["message_amende"] = utf8_encode($retour->message_amende);
             $ret["message_blocage"] = utf8_encode($retour->message_blocage);
             $ret["message_expl_comment"] = utf8_encode($retour->expl->expl_comment);
             $ret["message_expl_note"] = utf8_encode($retour->expl->expl_note);
         } else {
             $ret["message_loc"] = $retour->message_loc;
             $ret["message_resa"] = $retour->message_resa;
             $ret["message_retard"] = $retour->message_retard;
             $ret["message_amende"] = $retour->message_amende;
             $ret["message_blocage"] = $retour->message_blocage;
             $ret["message_expl_comment"] = utf8_encode($retour->expl->expl_comment);
             $ret["message_expl_note"] = utf8_encode($retour->expl->expl_note);
         }
     }
     $ret["status"] = $ok;
     $ret["transaction_date"] = date("Ymd    His", time());
     if ($charset != "utf-8") {
         $ret["title"] = utf8_encode($titre);
     } else {
         $ret["title"] = $titre;
     }
     return $ret;
 }
コード例 #4
0
ファイル: sip2_functions.inc.php プロジェクト: hogsim/PMB
function _checkin_response_($values)
{
    global $pmb_antivol, $protocol_prolonge;
    global $selfservice_pret_expl_inconnu_msg;
    $localisation = $values["INSTITUTION_ID"][0];
    $expl_cb = $values["ITEM_IDENTIFIER"][0];
    $cancel = $values["CANCEL"][0] == "Y" ? true : false;
    $magnetic = "N";
    $resensitize = "N";
    $ok = 0;
    $titre = $expl_cb;
    $requete = "select expl_id,expl_bulletin,expl_notice,type_antivol,empr_cb from exemplaires join pret on (expl_id=pret_idexpl) join empr on (pret_idempr=id_empr) where expl_cb='" . addslashes($expl_cb) . "'";
    $resultat = pmb_mysql_query($requete);
    if (!$resultat) {
        $ok = 0;
        $error = true;
        $ret["SCREEN_MESSAGE"][0] = $selfservice_pret_expl_inconnu_msg;
    } else {
        $expl = pmb_mysql_fetch_object($resultat);
        $empr_cb = $expl->empr_cb;
        if ($expl->expl_bulletin) {
            $isbd = new bulletinage_display($expl->expl_bulletin);
            $titre = $isbd->display;
        } else {
            $isbd = new mono_display($expl->expl_notice, 1);
            $titre = $isbd->header_texte;
        }
        if ($pmb_antivol) {
            if ($expl->type_antivol == 2) {
                $magnetic = "Y";
            }
        }
        $retour = new expl_to_do($expl_cb);
        // Fonction qu effectue le retour d'un document
        $retour->do_retour_selfservice();
        if ($retour->status == -1) {
            //Problème
            $ok = 0;
        } else {
            //Pas de problème
            $ok = 1;
            $resensitize = "Y";
        }
        /*		
        $ret["SCREEN_MESSAGE"][0]=$retour->message_loc;
        $ret["SCREEN_MESSAGE"][1]=$retour->message_resa;
        $ret["SCREEN_MESSAGE"][2]=$retour->message_retard;
        $ret["SCREEN_MESSAGE"][3]=$retour->message_amende;
        */
        if ($retour->message_loc || $retour->message_resa || $retour->message_retard || $retour->message_amende || $retour->message_blocage) {
            $ret["SCREEN_MESSAGE"][0] = $retour->message_loc . " " . $retour->message_resa . " " . $retour->message_retard . " " . $retour->message_amende . " " . $retour->message_blocage;
            //$ok=0;
            //Attention, pour les deux lignes suivantes, cela dépend d'un paramètre NEDAP ou IDENT
            if ($protocol_prolonge) {
                $ok = 0;
            }
        }
    }
    $ret["OK"] = $ok;
    $ret["RESENSITIZE"] = $resensitize;
    $ret["MAGNETIC_MEDIA"] = $magnetic;
    $ret["ALERT"] = "N";
    $ret["TRANSACTION_DATE"] = date("Ymd    His", time());
    $ret["INSTITUTION_ID"][0] = $localisation;
    $ret["ITEM_IDENTIFIER"][0] = $expl_cb;
    $ret["PERMANENT_LOCATION"][0] = $localisation;
    $ret["TITLE_IDENTIFIER"][0] = $titre;
    $ret["PATRON_IDENTIFIER"][0] = $empr_cb;
    return $ret;
}
コード例 #5
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ret_todo.inc.php,v 1.2 2010-03-31 14:14:09 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once "{$class_path}/expl_to_do.class.php";
$url = "./circ.php?categ=ret_todo";
$expl = new expl_to_do($form_cb_expl, 0, $url);
$expl->build_cb_tmpl($msg["alert_circ_retour"] . " > " . $msg["alert_circ_retour_todo"], $msg[661], $msg["circ_tit_form_cb_expl"], $url, 1);
if ($form_cb_expl) {
    $expl->do_form_retour($action_piege, $piege_resa);
}
print $expl->cb_tmpl . $expl->expl_form . $expl->gen_liste();