Exemplo n.º 1
0
        include "./circ/ret_todo/ret_todo.inc.php";
        break;
    case 'search':
        // recherches emprunteurs
        print $empr_menu_search;
        switch ($sub) {
            case "launch":
                include "./circ/pret.inc.php";
                break;
            default:
                include './circ/empr/search.inc.php';
                break;
        }
        break;
    case 'serialcirc':
        echo window_title($database_window_title . $msg["5"] . " : " . $msg["serialcirc_circ_menu"]);
        // voir les exemplaires qui nécessitent un traitement non effectué lors d'un retour
        include "./circ/serialcirc/serialcirc.inc.php";
        break;
    case 'groupexpl':
        include "./circ/groupexpl/main.inc.php";
        break;
    default:
        echo window_title($database_window_title . $msg["5"] . " : " . $msg["13"]);
        if (SESSrights & RESTRICTCIRC_AUTH) {
            get_login_empr_pret($msg[13], $msg[34], $msg[circ_tit_form_cb_empr], './circ.php?categ=pretrestrict', 0);
        } else {
            get_cb($msg[13], $msg[34], $msg[circ_tit_form_cb_empr], './circ.php?categ=pret', 0);
        }
        break;
}
        case 'pointe_item':
            if ($form_cb) {
                if ($empr_location_id > 0) {
                    $where = " and empr_location={$empr_location_id} ";
                }
                $query = "select id_empr, empr_nom, empr_prenom from empr, empr_caddie_content where (empr_cb='{$form_cb}' or empr_nom like '{$form_cb}%') and id_empr=object_id and empr_caddie_id={$idemprcaddie} {$where} ";
                $result = pmb_mysql_query($query, $dbh);
                if (!pmb_mysql_num_rows($result)) {
                    // emprunteur inconnu
                    $message_pointe_empr = "<strong>{$form_cb}&nbsp;: " . $msg['empr_caddie_unknown_barcode'] . "</strong>";
                } elseif (pmb_mysql_num_rows($result) == 1) {
                    $empr_trouve = pmb_mysql_fetch_object($result);
                    $myCart->pointe_item($empr_trouve->id_empr);
                    $message_pointe_empr = "<strong>" . $empr_trouve->empr_nom . "&nbsp;" . $empr_trouve->empr_prenom . "&nbsp;: " . $msg['empr_caddie_pointage_pointe'] . "</strong>";
                } else {
                    $message_pointe_empr = "<strong>{$form_cb}&nbsp;: " . $msg['empr_caddie_toomany_barcode'] . "</strong>";
                }
            }
            print $message_pointe_empr;
            $myCart->compte_items();
            print aff_empr_cart_nb_items($myCart);
            print get_cb("", $msg[empr_caddie_pointage_form_message], $msg[empr_caddie_pointage_form_title], "./circ.php?categ=caddie&sub=gestion&quoi=pointagebarcode&action=pointe_item&idemprcaddie={$idemprcaddie}", 0, "", 0);
            break;
        default:
            print aff_empr_cart_nb_items($myCart);
            print get_cb("", $msg[empr_caddie_pointage_form_message], $msg[empr_caddie_pointage_form_title], "./circ.php?categ=caddie&sub=gestion&quoi=pointagebarcode&action=pointe_item&idemprcaddie={$idemprcaddie}", 0, "", 0);
            break;
    }
} else {
    aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=pointagebarcode&moyen=barcode", "", $msg[caddie_select_pointe], "", 0, 0, 0);
}
        case 'add_item':
            if ($form_cb) {
                if ($empr_location_id > 0) {
                    $where = " and empr_location={$empr_location_id} ";
                }
                $query = "select id_empr, empr_nom, empr_prenom from empr where (empr_cb='{$form_cb}' or empr_nom like '{$form_cb}%') {$where} ";
                $result = pmb_mysql_query($query, $dbh);
                if (!pmb_mysql_num_rows($result)) {
                    // emprunteur inconnu
                    $message_ajout_empr = "<strong>{$form_cb}&nbsp;: " . $msg['empr_caddie_unknown_barcode'] . "</strong>";
                } elseif (pmb_mysql_num_rows($result) == 1) {
                    $empr_trouve = pmb_mysql_fetch_object($result);
                    $myCart->add_item($empr_trouve->id_empr);
                    $message_ajout_empr = "<strong>" . $empr_trouve->empr_nom . "&nbsp;" . $empr_trouve->empr_prenom . "&nbsp;: " . $msg['empr_caddie_collect_added'] . "</strong>";
                } else {
                    $message_ajout_empr = "<strong>{$form_cb}&nbsp;: " . $msg['empr_caddie_toomany_barcode'] . "</strong>";
                }
            }
            print $message_ajout_empr;
            $myCart->compte_items();
            print aff_empr_cart_nb_items($myCart);
            print get_cb("", $msg[empr_caddie_collect_form_message], $msg[empr_caddie_collect_form_title], "./circ.php?categ=caddie&sub=gestion&quoi=barcode&action=add_item&idemprcaddie={$idemprcaddie}", 0, "", 0);
            break;
        default:
            print aff_empr_cart_nb_items($myCart);
            print get_cb("", $msg[empr_caddie_collect_form_message], $msg[empr_caddie_collect_form_title], "./circ.php?categ=caddie&sub=gestion&quoi=barcode&action=add_item&idemprcaddie={$idemprcaddie}", 0, "", 0);
            break;
    }
} else {
    aff_paniers_empr($idcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=barcode", "", $msg["caddie_select_ajouter"], "", 0, 0, 0);
}
Exemplo n.º 4
0
    $res = mysql_query($rqt, $dbh);
    $cb_initial = mysql_fetch_object($res);
    $cb_a_creer = (string) $cb_initial->max_cb;
} elseif ($pmb_num_carte_auto_array[0] == "2") {
    $long_prefixe = $pmb_num_carte_auto_array[1];
    $nb_chiffres = $pmb_num_carte_auto_array[2];
    $prefix = $pmb_num_carte_auto_array[3];
    $rqt = "SELECT CAST(SUBSTRING(empr_cb," . ($long_prefixe + 1) . ") AS UNSIGNED) AS max_cb, SUBSTRING(empr_cb,1," . $long_prefixe * 1 . ") AS prefixdb FROM empr ORDER BY max_cb DESC limit 0,1";
    // modif f cerovetti pour sortir dernier code barre tri par ASCII
    $res = mysql_query($rqt, $dbh);
    $cb_initial = mysql_fetch_object($res);
    $cb_a_creer = $cb_initial->max_cb * 1 + 1;
    if (!$nb_chiffres) {
        $nb_chiffres = strlen($cb_a_creer);
    }
    if (!$prefix) {
        $prefix = $cb_initial->prefixdb;
    }
    $cb_a_creer = $prefix . substr((string) str_pad($cb_a_creer, $nb_chiffres, "0", STR_PAD_LEFT), -$nb_chiffres);
} elseif ($pmb_num_carte_auto_array[0] == '3') {
    $num_carte_auto_filename = $base_path . '/circ/empr/' . trim($pmb_num_carte_auto_array[1]) . '.inc.php';
    $num_carte_auto_fctname = trim($pmb_num_carte_auto_array[1]);
    if (file_exists($num_carte_auto_filename)) {
        require_once $num_carte_auto_filename;
        if (function_exists($num_carte_auto_fctname)) {
            $cb_a_creer = $num_carte_auto_fctname();
        }
    }
}
get_cb($msg[42], "", $msg[43], './circ.php?categ=empr_saisie', 1, (string) $cb_a_creer, 1);
Exemplo n.º 5
0
            }
            $nav_bar = aff_pagination($url_base, $nbr_lignes, $nb_per_page, $page, 10, false, true);
        }
        // affichage du résultat
        list_empr($form_cb, $empr_list, $nav_bar, $nbr_lignes, $where_intitule);
    } else {
        switch ($sub) {
            case "launch":
                $human_requete = $sc->make_human_query();
                print "<strong>" . $msg["search_search_emprunteur"] . "</strong> : " . $human_requete;
                print $sc->make_hidden_search_form($url, "form_filters");
                print "<br />" . $msg[1915] . "<input type='button' class='bouton' onClick=\"document.form_filters.action='{$url_to_search_form}'; document.form_filters.target='{$search_target}'; document.form_filters.submit(); return false;\" value=\"" . $msg["search_back"] . "\"/>";
                break;
            default:
                // la requête de recherche d'emprunteur n'a produit aucun résultat
                // si on est en résa on a un id de notice ou de bulletin
                if ($id_notice || $id_bulletin) {
                    //type_resa : on est en prévision
                    if ($type_resa) {
                        get_cb($msg['prevision_doc'], $msg[34], $msg['circ_tit_form_cb_empr'], "./circ.php?categ=pret&id_notice={$id_notice}&id_bulletin={$id_bulletin}&type_resa=1", 0);
                    } else {
                        get_cb($msg['reserv_doc'], $msg[34], $msg['circ_tit_form_cb_empr'], "./circ.php?categ=pret&id_notice={$id_notice}&id_bulletin={$id_bulletin}", 0);
                    }
                } else {
                    get_cb($msg[13], $msg[34], $msg['circ_tit_form_cb_empr'], "./circ.php?categ=pret", 0, 0);
                }
                error_message($msg[46], str_replace('!!form_cb!!', $form_cb, $msg[47]), 0, './circ.php');
                break;
        }
    }
}