source: pmb4.2/trunk/fuentes/pmb/catalog/caddie/caddie_ajax.inc.php @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 4 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1<?php
2// +-------------------------------------------------+
3// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
4// +-------------------------------------------------+
5// $Id: caddie_ajax.inc.php,v 1.5 2015-05-20 11:45:22 jpermanne Exp $
6
7if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) die("no access");
8
9// functions particulières à ce module
10require_once("./catalog/caddie/caddie_func.inc.php");
11require_once("$include_path/templates/cart.tpl.php");
12require_once("$include_path/expl_info.inc.php");
13require_once("$class_path/caddie.class.php");
14require_once("$class_path/serials.class.php");
15require_once("$class_path/parameters.class.php") ;
16require_once("$class_path/emprunteur.class.php") ;
17require_once("$include_path/cart.inc.php");
18require_once("$include_path/empr_cart.inc.php");
19require_once("$include_path/bull_info.inc.php");
20
21// !! A inserrer dans switch avec une commande sub !!
22if($sub != "pointage" && $sub != "collecte") {
23        $idcaddie=substr($caddie,5);
24        $object_type=substr($object,0,4);
25        $object_id=substr($object,10);
26        $idcaddie = verif_droit_caddie($idcaddie) ;
27       
28        if ($idcaddie) {
29                $myCart = new caddie($idcaddie);
30                $myCart->add_item($object_id,$object_type);
31                $myCart->compte_items();
32        } else die("Failed: "."obj=".$object." caddie=".$caddie);
33        print $myCart->nb_item;
34        die();
35}
36if ($typecaddie=='empr') {
37        $idcaddie = verif_droit_empr_caddie($idcaddie) ;
38} else {
39        $idcaddie = verif_droit_caddie($idcaddie) ;
40}
41
42switch($sub) {
43        case "pointage" :
44                include('./catalog/caddie/pointage/main_ajax.inc.php');
45        break;
46        case "collecte" :
47                include('./catalog/caddie/collecte/main_ajax.inc.php');
48        break;
49        default:
50        break;
51}
52
53
54?>
Note: See TracBrowser for help on using the repository browser.