del_item($id_item); print caddie_controller::get_display_list_from_item('display', $object_type, $id_item); break; default: $myCart->add_item($id_item,$object_type); print caddie_controller::get_display_list_from_item('display', $object_type, $id_item); break; } } break; default: switch($action) { case "list": require_once($class_path.'/caddie/caddie_root_lists_controller.class.php'); caddie_root_lists_controller::proceed_ajax($object_type, 'caddie_content'); break; default: $idcaddie=substr($caddie,5); $object_type=substr($object,0,4); $object_id=substr($object,10); $idcaddie = caddie::check_rights($idcaddie) ; if ($idcaddie) { $myCart = new caddie($idcaddie); switch($action) { case 'delete': $myCart->del_item($object_id); break; default: $myCart->add_item($object_id,$object_type); break; } $myCart->compte_items(); } else die("Failed: "."obj=".$object." caddie=".$caddie); print $myCart->nb_item; break; } break; }