<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: collecte_selection.inc.php,v 1.5 2009-05-16 11:12:02 dbellamy Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
if ($idemprcaddie) {
    $myCart = new empr_caddie($idemprcaddie);
    print aff_empr_cart_titre($myCart);
    $droit = verif_droit_proc_empr_caddie($id);
    switch ($action) {
        case 'form_proc':
            $hp = new parameters($id, "empr_caddie_procs");
            $hp->gen_form("./circ.php?categ=caddie&sub=gestion&quoi=selection&moyen=selection&action=add_item&idemprcaddie={$idemprcaddie}&id={$id}");
            break;
        case 'add_item':
            if ($droit) {
                $hp = new parameters($id, "empr_caddie_procs");
                $hp->get_final_query();
                echo "<hr />" . $hp->final_query . "<hr />";
                $line = pmb_split("\n", $hp->final_query);
                $nb_element_avant = $myCart->nb_item;
                while (list($cle, $valeur) = each($line)) {
                    if ($valeur != '') {
                        if (pmb_strtolower(pmb_substr($valeur, 0, 6)) == "select" || pmb_strtolower(pmb_substr($valeur, 0, 6)) == "create") {
                        } else {
                            echo pmb_substr($valeur, 0, 6);
                            error_message_history($msg['caddie_action_invalid_query'], $msg['requete_selection'], 1);
Beispiel #2
0
 function caddie_pointage_raz($caddie_id)
 {
     global $dbh;
     global $msg;
     global $charset;
     global $PMBuserid;
     $caddie_id += 0;
     $myCart = new empr_caddie($caddie_id);
     print aff_empr_cart_titre($myCart);
     $droit = verif_droit_empr_caddie($caddie_id);
     if ($droit) {
         $myCart->depointe_items();
     }
     return $this->build_ok($infos);
 }