-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcart_list.php
115 lines (105 loc) · 5.34 KB
/
cart_list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net [email protected] et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: cart_list.php,v 1.12 2017-06-07 13:16:57 dgoron Exp $
$base_path=".";
$base_noheader=1;
$base_nobody=1;
$base_auth = "CATALOGAGE_AUTH";
require_once("includes/init.inc.php");
require_once("$class_path/caddie.class.php");
require_once("$class_path/empr_caddie.class.php");
require_once($class_path.'/event/events/event_caddie.class.php');
require_once($class_path.'/caddie/caddie_controller.class.php');
require_once($class_path.'/caddie/empr_caddie_controller.class.php');
require_once($class_path.'/caddie/authorities_caddie_controller.class.php');
header("Content-Type: text/html; charset=$charset");
//si id_object est présent, il s'agit de l'accès rapide aux paniers (div apparaissant sur mouseOver icone panier)
//sinon, il s'agit de la liste des paniers pour le drag and drop
if(isset($id_object)) $id_object += 0;
else $id_object = 0;
if ($id_object) {
if(!isset($type_object) || !$type_object) $type_object = 'NOTI';
switch ($type_object) {
case 'EMPR' :
empr_caddie_controller::proceed_quick_access($id_object, $type_object);
break;
case 'EXPL' :
case 'BULL' :
case 'NOTI' :
caddie_controller::proceed_quick_access($id_object, $type_object);
break;
default :
authorities_caddie_controller::proceed_quick_access($id_object, $type_object);
break;
}
} else {
$list_noti=caddie::get_cart_list("NOTI",0);
$list_expl=caddie::get_cart_list("EXPL",0);
$list_bull=caddie::get_cart_list("BULL",0);
$list_empr=array();
$is_cart=0;
$link="<a href='#' id='close_cart_pannel' ><img border='0' align='middle' src='images/close.gif'/></a>";
print "<div><table width='100%'><tbody><tr><td align='left' width='90%'></td><td align='right'>$link</td></tr></tbody></table></div>";
if (count($list_noti)) {
print "<h3>$msg[396]</h3><br />";
for ($i=0; $i<count($list_noti); $i++) {
$cart_link= "catalog.php?categ=caddie&sub=gestion&quoi=panier&action=&object_type=NOTI&idcaddie=".$list_noti[$i]["idcaddie"]."&item=0";
$pannel_cart_see = "";
$pannel_cart_link = $cart_link;
print "<div id=\"NOTI_".$list_noti[$i]["idcaddie"]."\" recept=\"yes\" recepttype=\"caddie\" downlight=\"cart_downlight\" highlight=\"cart_highlight\"><img src='images/basket_20x20.gif'/> <a href=\"".$pannel_cart_link."\">".htmlentities($list_noti[$i]["name"],ENT_QUOTES,$charset)."<span id=\"NOTI_nbitem_".$list_noti[$i]["idcaddie"]."\"> (".$list_noti[$i]["nb_item"].")</span></a>".$pannel_cart_see."</div>";
}
$is_cart++;
}
if (count($list_expl)) {
print "<br />";
print "<h3>$msg[expl_carts]</h3><br />";
for ($i=0; $i<count($list_expl); $i++) {
$cart_link = "catalog.php?categ=caddie&sub=gestion&quoi=panier&action=&object_type=EXPL&idcaddie=".$list_expl[$i]["idcaddie"]."&item=0";
$pannel_cart_see = "";
$pannel_cart_link = $cart_link;
print "<div id=\"EXPL_".$list_expl[$i]["idcaddie"]."\" recept=\"yes\" recepttype=\"caddie\" downlight=\"cart_downlight\" highlight=\"cart_highlight\"><img src='images/basket_20x20.gif'/> <a href=\"".$pannel_cart_link."\">".htmlentities($list_expl[$i]["name"],ENT_QUOTES,$charset)."<span id='EXPL_nbitem_".$list_expl[$i]["idcaddie"]."'> (".$list_expl[$i]["nb_item"].")</span></a>".$pannel_cart_see."</div>";
}
$is_cart++;
}
if (count($list_bull)) {
print "<br />";
print "<h3>$msg[bull_carts]</h3><br />";
for ($i=0; $i<count($list_bull); $i++) {
$cart_link = "catalog.php?categ=caddie&sub=gestion&quoi=panier&action=&object_type=BULL&idcaddie=".$list_bull[$i]["idcaddie"]."&item=0";
$pannel_cart_see = "";
$pannel_cart_link = $cart_link;
print "<div id=\"BULL_".$list_bull[$i]["idcaddie"]."\" recept=\"yes\" recepttype=\"caddie\" downlight=\"cart_downlight\" highlight=\"cart_highlight\"><img src='images/basket_20x20.gif'/> <a href=\"".$pannel_cart_link."\">".htmlentities($list_bull[$i]["name"],ENT_QUOTES,$charset)."<span id='BULL_nbitem_".$list_bull[$i]["idcaddie"]."'> (".$list_bull[$i]["nb_item"].")</span></a>".$pannel_cart_see."</div>";
}
$is_cart++;
}
if (count($list_empr)) {
print "<br />";
print "<h3>".$msg['empr_carts']."</h3><br />";
for ($i=0; $i<count($list_empr); $i++) {
$cart_link = "circ.php?categ=caddie&sub=gestion&quoi=panier&action=&idemprcaddie=".$list_empr[$i]["idemprcaddie"]."&item=0";
$pannel_cart_see = "";
$pannel_cart_link = $cart_link;
print "<div id=\"EMPR_".$list_empr[$i]["idemprcaddie"]."\" recept=\"yes\" recepttype=\"caddie\" downlight=\"cart_downlight\" highlight=\"cart_highlight\"><img src='images/basket_empr.gif'/> <a href=\"".$pannel_cart_link."\">".htmlentities($list_empr[$i]["name"],ENT_QUOTES,$charset)."<span id='EMPR_nbitem_".$list_empr[$i]["idemprcaddie"]."'> (".$list_empr[$i]["nb_item"].")</span></a>".$pannel_cart_see."</div>";
}
$is_cart++;
}
if (!$is_cart){
print "<h3>$msg[398]</h3>";
}
}
/*
'idcaddie' => $temp->idcaddie,
'name' => $temp->name,
'type' => $temp->type,
'comment' => $temp->comment,
'autorisations' => $temp->autorisations,
'nb_item' => $nb_item,
'nb_item_pointe' => $nb_item_pointe,
'nb_item_base' => $nb_item_base,
'nb_item_base_pointe' => $nb_item_base_pointe,
'nb_item_blob' => $nb_item_blob,
'nb_item_blob_pointe' => $nb_item_blob_pointe
*/
?>