Example #1
0
}
//Requête de sélection et de comptage des notices
if ($n_current == "") {
    $n_current = 0;
}
//Récupération des notices
$n_notices = 0;
$myCart = new caddie($idcaddie);
//Pour le cas ou on a un panier d'exemplaire avec des exemplaires de bulletin
$bulletin_a_exporter = array();
switch ($myCart->type) {
    case "NOTI":
        $liste_flag = array();
        $liste_no_flag = array();
        if ($elt_flag) {
            $liste_flag = $myCart->get_cart("FLAG");
        }
        if ($elt_no_flag) {
            $liste_no_flag = $myCart->get_cart("NOFLAG");
        }
        $liste = $liste_flag;
        for ($i = 0; $i < count($liste_no_flag); $i++) {
            $liste[] = $liste_no_flag[$i];
        }
        break;
    case "EXPL":
        $liste_flag = array();
        $liste_no_flag = array();
        if ($elt_flag) {
            $liste_flag = $myCart->get_cart("FLAG");
        }
Example #2
0
         $myCart_selected = new caddie($idcaddie_selected);
         print pmb_bidi(aff_cart_titre($myCart_selected));
         print aff_cart_nb_items($myCart_selected);
         print aff_choix_quoi("./catalog.php?categ=caddie&sub=pointage&moyen=panier&action=pointe_item&idcaddie={$idcaddie}&idcaddie_selected={$idcaddie_selected}", "./catalog.php?categ=caddie&sub=pointage&moyen=panier&action=&object_type=NOTI&idcaddie={$idcaddie}&item=0", $msg["caddie_choix_pointe_panier"], $msg["caddie_item_pointer"], "", false, $myCart->type);
     }
     print pmb_bidi(aff_cart_titre($myCart));
     print aff_cart_nb_items($myCart);
     break;
 case 'pointe_item':
     print pmb_bidi(aff_cart_titre($myCart));
     print aff_cart_nb_items($myCart);
     if ($idcaddie_selected) {
         $myCart_selected = new caddie($idcaddie_selected);
         $liste_0 = $liste_1 = array();
         if ($elt_flag) {
             $liste_0 = $myCart_selected->get_cart("FLAG", $elt_flag_inconnu);
         }
         if ($elt_no_flag) {
             $liste_1 = $myCart_selected->get_cart("NOFLAG", $elt_no_flag_inconnu);
         }
         $liste = array_merge($liste_0, $liste_1);
         if ($liste) {
             while (list($cle, $object) = each($liste)) {
                 $myCart->pointe_item($object, $myCart_selected->type);
             }
         }
     }
     print "<h3>" . $msg["caddie_menu_pointage_apres_pointage"] . "</h3>";
     print pmb_bidi(aff_cart_nb_items($myCart));
     aff_paniers($idcaddie, "NOTI", "./catalog.php?categ=caddie&sub=pointage&moyen=panier", "choix_quoi", $msg["caddie_select_pointe_panier"], "", 0, 0, 0, true, 1);
     break;
Example #3
0
         print pmb_bidi(aff_cart_titre($myCart));
         print aff_cart_nb_items($myCart);
     }
     break;
 case 'transfert_final':
     $idcaddie_origine = verif_droit_caddie($idcaddie_origine);
     if ($idcaddie_origine) {
         $myCartOrigine = new caddie($idcaddie_origine);
         print pmb_bidi(aff_cart_titre($myCart));
         print aff_cart_nb_items($myCart);
         if ($myCart->type == 'NOTI' && $myCartOrigine->type == 'BULL') {
             // cas du transfert depuis caddie de BULL vers caddie de notices
             if ($bull_not) {
                 // transfert des notices de bulletin
                 if ($elt_flag) {
                     $liste = $myCartOrigine->get_cart("FLAG");
                     while (list($cle, $object) = each($liste)) {
                         $myCart->add_item($object, $myCartOrigine->type);
                     }
                 }
                 if ($elt_no_flag) {
                     $liste = $myCartOrigine->get_cart("NOFLAG");
                     while (list($cle, $object) = each($liste)) {
                         $myCart->add_item($object, $myCartOrigine->type);
                     }
                 }
             }
             if ($bull_dep) {
                 // transfert des notices de dépouillement
                 if ($elt_flag) {
                     $liste = $myCartOrigine->get_cart("FLAG");
Example #4
0
        $myCart->type = $cart_type;
        $myCart->comment = pmb_preg_replace('/\\"|\'/', ' ', stripslashes($cart_comment));
        if (is_array($cart_autorisations)) {
            $autorisations = implode(" ", $cart_autorisations);
        } else {
            $autorisations = "";
        }
        $myCart->autorisations = $autorisations;
        $myCart->create_cart();
        aff_paniers($idcaddie, "NOTI", "./circ.php?categ=resa_planning&resa_action=search_resa&mode=3&unq=" . md5(microtime()) . "&id_empr={$id_empr}&groupID={$groupID}", "add_item", "Sélectionnez un caddie pour en afficher le contenu", "NOTI", 0, 1, 1);
        break;
    default:
        if ($idcaddie) {
            $myCart = new caddie($idcaddie);
            print pmb_bidi("<div class=\"row\"><b>Panier&nbsp;: " . $myCart->name . ' (' . $myCart->type . ')</b></div>');
            aff_cart_notices($myCart->get_cart(), $myCart->type, $idcaddie);
        } else {
            aff_paniers($idcaddie, "NOTI", "./circ.php?categ=resa_planning&resa_action=search_resa&mode=3&unq=" . md5(microtime()) . "&id_empr={$id_empr}&groupID={$groupID}", "add_item", "Sélectionnez un caddie pour en afficher le contenu", "NOTI", 0, 1, 1);
        }
}
// affichage du contenu du caddie à partir de $liste qui contient les object_id
function aff_cart_notices($liste, $caddie_type = "", $idcaddie = 0)
{
    global $msg;
    global $dbh;
    global $begin_result_liste, $end_result_liste;
    global $end_result_list;
    global $id_empr;
    global $groupID;
    if (!sizeof($liste) || !is_array($liste)) {
        print $msg[399];
$base_path = "../../..";
$class_path = "{$base_path}/classes";
$base_noheader = 1;
require_once "{$base_path}/includes/init.inc.php";
require_once "{$class_path}/fpdf.class.php";
require_once "{$class_path}/ufpdf.class.php";
require_once "{$class_path}/fpdf_etiquette.class.php";
require_once "{$class_path}/caddie.class.php";
if ($pmb_label_construct_script) {
    require_once "../{$pmb_label_construct_script}";
} else {
    require_once "../custom_label_no_script.inc.php";
}
$myCart = new caddie($idcaddie);
if ($elt_flag && $elt_no_flag) {
    $liste = $myCart->get_cart("ALL");
}
if ($elt_flag && !$elt_no_flag) {
    $liste = $myCart->get_cart("FLAG");
}
if ($elt_no_flag && !$elt_flag) {
    $liste = $myCart->get_cart("NOFLAG");
}
// Démarrage et configuration du pdf
$nom_classe = $fpdf . "_Etiquette";
$pdf = new $nom_classe($label_grid_nb_per_row, $label_grid_nb_per_col, $page_orientation, $unit, $page_format);
$pdf->Open();
$pdf->SetPageMargins($label_grid_from_top, '0', $label_grid_from_left, '0');
$pdf->SetSticksMargins(0, 0, 0, 0);
$pdf->SetSticksPadding($label_grid_h_spacing, $label_grid_v_spacing);
//Saut Etiquettes