Esempio n. 1
0
<?php

// +-------------------------------------------------+
// © 2002-2011 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: serialcirc.inc.php,v 1.6 2012-02-01 10:15:51 arenou Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/serialcirc_empr.class.php";
require_once $class_path . "/serialcirc_diff.class.php";
require_once $include_path . "/serialcirc.inc.php";
$serialcirc_empr = new serialcirc_empr();
switch ($lvl) {
    case "add_resa":
        print "<h3><span>" . htmlentities($msg["serialcirc_add_resa"], ENT_QUOTES, $charset) . "</span></h3>";
        if ($expl_to_hold != "") {
            if (!$serialcirc_empr->hold_expl($expl_to_hold)) {
                print $serialcirc_empr->get_holding_form();
            }
        } else {
            print $serialcirc_empr->get_holding_form();
        }
        break;
    case "point":
        print "<h3><span>" . htmlentities($msg["serialcirc_checkpoint"], ENT_QUOTES, $charset) . "</span></h3>";
        if ($expl_to_point != "") {
            if (!$serialcirc_empr->point_expl($expl_to_point)) {
                print $serialcirc_empr->get_point_form();
            } else {
                print htmlentities($msg['serialcirc_expl_pointed'], ENT_QUOTES, $charset);
Esempio n. 2
0
         if ($type_resa) {
             echo "<script type='text/javascript'> parent.location.href='./circ.php?categ=resa_planning&resa_action=add_resa&id_empr={$id}&groupID={$groupID}&id_notice={$id_notice}&id_bulletin={$id_bulletin}'; </script>";
         } else {
             echo "<script type='text/javascript'> parent.location.href='./circ.php?categ=resa&id_empr={$id}&groupID={$groupID}&id_notice={$id_notice}&id_bulletin={$id_bulletin}'; </script>";
         }
     } else {
         if ($serialcirc_action == "delete") {
             $serialcirc_empr = new serialcirc_empr($id);
             $msgs = $serialcirc_empr->unsbuscribe($serialcirc);
             if (count($msgs['errors'])) {
                 $affichage .= return_error_message($msg['540'], implode("<br />", $msgs['errors']));
                 $affichage .= " <div class='row'>&nbsp;</div>";
             }
         } else {
             if ($serialcirc_action == "tr") {
                 $serialcirc_empr = new serialcirc_empr($id);
                 $msgs = $serialcirc_empr->forward($serialcirc, $serialcirc_new_empr);
                 if (count($msgs['messages'])) {
                     $affichage .= "\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><img src='./images/idea.gif' align='left'></td>\n\t\t\t\t\t\t\t\t<td><p><strong>" . implode("<br>", $msgs['messages']) . "</strong></p></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>";
                     $affichage .= " <div class='row'>&nbsp;</div>";
                 }
                 if (count($msgs['errors'])) {
                     $affichage .= return_error_message($msg['540'], implode("<br>", $msgs['errors']));
                     $affichage .= " <div class='row'>&nbsp;</div>";
                 }
             }
         }
         $empr = new emprunteur($id, $erreur_affichage, FALSE, 1);
         $affichage .= $empr->fiche;
     }
 } else {
Esempio n. 3
0
     //Mes listes de lecture
     if ($opac_shared_lists && $allow_liste_lecture) {
         $liste_onglet = "\t\t\n\t\t\t\t\t<ul class='empr_subtabs'>\t\t\n\t\t\t\t\t\t<li><a href='./empr.php?tab=lecture&lvl=private_list'>" . htmlentities($msg['list_lecture_show_my_list'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t<li><a href='./empr.php?tab=lecture&lvl=public_list'>" . htmlentities($msg['list_lecture_show_public_list'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t<li><a href='./empr.php?tab=lecture&lvl=demande_list'>" . htmlentities($msg['list_lecture_show_my_requests'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t";
     }
     $subitems = str_replace("!!subonglet!!", $liste_onglet, $subitems);
     break;
 case 'request':
     //Mes demandes de recherche
     if ($demandes_active && $opac_demandes_active && $allow_dema) {
         $demandes_onglet = "\t\n\t\t\t\t\t<ul class='empr_subtabs'>\t\t\n\t\t\t\t\t\t<li><a href='./empr.php?tab=request&lvl=do_dmde'>" . htmlentities($msg['demandes_do_search'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t<li><a href='./empr.php?tab=request&lvl=list_dmde'>" . htmlentities($msg['demandes_list'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t";
     }
     $subitems = str_replace("!!subonglet!!", $demandes_onglet, $subitems);
     break;
 case "serialcirc":
     if ($opac_serialcirc_active) {
         $nb_virtual = count(serialcirc_empr::get_virtual_abo());
         $serialcirc_submenu = "\n\t\t\t\t\t\t<ul class='empr_subtabs'>\t\t\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_list_abo'><a href='./empr.php?tab=serialcirc&lvl=list_abo'>" . htmlentities($msg['serialcirc_list_abo'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_list_asked_abo'><a href='./empr.php?tab=serialcirc&lvl=list_virtual_abo'>" . htmlentities($msg['serialcirc_list_asked_abo'] . "(" . $nb_virtual . ")", ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_pointer'><a href='./empr.php?tab=serialcirc&lvl=point'>" . htmlentities($msg['serialcirc_pointer'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_add_resa'><a href='./empr.php?tab=serialcirc&lvl=add_resa'>" . htmlentities($msg['serialcirc_add_resa'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_ask_copy'><a href='./empr.php?tab=serialcirc&lvl=copy'>" . htmlentities($msg['serialcirc_ask_copy'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t\t<li id='empr_menu_serialcirc_ask_menu'><a href='./empr.php?tab=serialcirc&lvl=ask'>" . htmlentities($msg['serialcirc_ask_menu'], ENT_QUOTES, $charset) . "</a></li>\n\t\t\t\t\t\t</ul>";
         $subitems = str_replace("!!subonglet!!", $serialcirc_submenu, $subitems);
         break;
     }
 default:
     if (function_exists('empr_extended_tab_default')) {
         if (empr_extended_tab_default($tab)) {
             break;
         }
     }
     //Mon Compte
     $my_account_item = "<ul class='empr_subtabs'>";
     if (!$empr_ldap && $allow_pwd) {
         $my_account_item .= "<li><a id='change_password' href='./empr.php?lvl=change_password'>" . htmlentities($msg['empr_modify_password'], ENT_QUOTES, $charset) . "</a></li>";
     }
Esempio n. 4
0
 public static function get_virtual_abo()
 {
     $virtual = array();
     $serialcirc_list = $serialcirc_expl_list = serialcirc_empr::get_serialcirc_list($_SESSION['id_empr_session']);
     for ($i = 0; $i < count($serialcirc_expl_list); $i++) {
         if ($serialcirc_expl_list[$i]['num_expl']) {
             $serialcirc = new serialcirc_empr_circ($_SESSION['id_empr_session'], $serialcirc_expl_list[$i]['id_serialcirc'], $serialcirc_expl_list[$i]['num_expl']);
             if ($serialcirc->serialcirc['virtual'] == 1) {
                 $virtual[] = $serialcirc;
             }
         }
     }
     return $virtual;
 }
Esempio n. 5
0
 function fetch_serial_circ()
 {
     $serialcirc_empr = new serialcirc_empr($this->id);
     if (count($serialcirc_empr->serialcirc_list)) {
         return $serialcirc_empr->get_list();
     }
     return "";
 }