} } if ($elt_no_flag) { $liste = $myCart->get_cart("NOFLAG"); while (list($cle, $object) = each($liste)) { if ($myCart->del_item_base($object) == CADDIE_ITEM_SUPPR_BASE_OK) { $myCart->del_item_all_caddies($object); } else { $res_aff_suppr_base .= aff_cart_unique_object($object, $myCart->type, $url_base = "./circ.php?categ=caddie&sub=gestion&quoi=panier&idemprcaddie={$idemprcaddie}"); } } } if ($res_aff_suppr_base) { print "<br /><h3>{$msg['caddie_supprbase_elt_used']}</h3>"; // inclusion du javascript de gestion des listes dépliables // début de liste print $begin_result_liste; print $res_aff_suppr_base; print $end_result_liste; } print "<br /><h3>{$msg['caddie_situation_after_suppr']}</h3>"; $myCart->compte_items(); print aff_empr_cart_nb_items($myCart); aff_empr_cart_objects($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=panier&idemprcaddie={$idemprcaddie}"); break; default: break; } } else { aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=action&quelle=supprbase", "choix_quoi", $msg["caddie_select_supprbase"], "", 0, 0, 0); }
$nb_element_apres = $myCart->nb_item; $msg["caddie_affiche_nb_ajouts"] = str_replace('!!nb_a_ajouter!!', $nb_element_a_ajouter, $msg["caddie_affiche_nb_ajouts"]); $msg["caddie_affiche_nb_ajouts"] = str_replace('!!nb_ajoutes!!', $nb_element_apres - $nb_element_avant, $msg["caddie_affiche_nb_ajouts"]); $res_exec = "<hr />{$msg['caddie_affiche_nb_ajouts']}<hr />"; print pmb_bidi($res_exec); } // fin if $droit print aff_empr_cart_nb_items($myCart); break; default: print aff_empr_cart_nb_items($myCart); show_empr_procs($idemprcaddie); break; } } else { aff_paniers_empr($idcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=selection&moyen=selection", "", $msg["caddie_select_ajouter"], "", 0, 0, 0); } function show_empr_procs($idemprcaddie) { global $msg; global $PMBuserid; global $dbh; print "<hr />{$msg['caddie_select_proc']}<br /><table>"; // affichage du tableau des procédures if ($PMBuserid != 1) { $where = " and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') "; } $requete = "SELECT idproc, type, name, requete, comment, autorisations, parameters FROM empr_caddie_procs WHERE type='SELECT' {$where} ORDER BY name "; $res = mysql_query($requete, $dbh); $nbr = mysql_num_rows($res); $parity = 1;
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: mailing.inc.php,v 1.1 2007-07-15 11:22:40 touraine37 Exp $ if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) { die("no access"); } if ($idemprcaddie) { $myCart = new empr_caddie($idemprcaddie); print aff_empr_cart_titre($myCart); print aff_empr_cart_nb_items($myCart); switch ($action) { case 'envoi': print "<iframe name='mailing_empr' frameborder='0' scrolling='yes' width='100%' height='700' src='./circ/caddie/action/mailing.php?idemprcaddie={$idemprcaddie}&sub=redige'>\n\t\t\t\t<noframes>\n\t\t\t\t</noframes>"; break; default: break; } } else { aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=action&quelle=mailing", "envoi", $msg["empr_caddie_select_mailing"], "", 0, 0, 0); }
} else { $restrict_localisation = ""; } } $requete = "SELECT id_empr FROM empr where empr_date_expiration >= now() {$restrict_localisation}"; $res_rqt = mysql_query($requete); foreach ($caddie as $id_caddie => $coche) { if ($coche) { $myCart = new empr_caddie($id_caddie); while ($r = mysql_fetch_object($res_rqt)) { $myCart->add_item($r->id_empr); } // fin while mysql_data_seek($res_rqt, 0); } } print "<script type='text/javascript'>window.close();</script>"; } else { // function aff_paniers_empr($item=0, $lien_origine="./circ.php?", $action_click = "add_item", $titre="", $restriction_panier="", $lien_edition=0, $lien_suppr=0, $lien_creation=1) { aff_paniers_empr(0, "./cart.php?object_type={$object_type}&sub_action=add&empr_location_id={$empr_location_id}", "add_empr_encours", $msg["caddie_add_emprs"], "", 0, 0, 0); } break; default: // print "<h1>".$msg["fonct_no_accessible"]."</h1>"; if ($object_type == "GROUP") { aff_paniers_empr($item, "./cart.php?object_type=GROUP", "add_item", $msg["caddie_add_GROUP"], "", 0, 0, 1); } else { aff_paniers_empr($item, "./cart.php?object_type=EMPR", "add_item", $msg["caddie_add_EMPR"], "", 0, 0, 1); } 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} : " . $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 . " " . $empr_trouve->empr_prenom . " : " . $msg['empr_caddie_pointage_pointe'] . "</strong>"; } else { $message_pointe_empr = "<strong>{$form_cb} : " . $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); }
$myCart->del_item($item); print aff_empr_cart_titre($myCart); print aff_empr_cart_nb_items($myCart); aff_empr_cart_objects($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=panier&idemprcaddie={$idemprcaddie}"); break; case 'valid_new_cart': $myCart = new empr_caddie(0); $myCart->name = $cart_name; $myCart->comment = $cart_comment; if (is_array($cart_autorisations)) { $autorisations = implode(" ", $cart_autorisations); } else { $autorisations = ""; } $myCart->autorisations = $autorisations; $myCart->classementGen = $classementGen_empr_caddie; if ($form_actif) { $myCart->create_cart(); } aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=panier", "", $msg["caddie_select_afficher"], "", 1, 0, 1); break; default: if ($idemprcaddie) { $myCart = new empr_caddie($idemprcaddie); print aff_empr_cart_titre($myCart); print aff_empr_cart_nb_items($myCart); aff_empr_cart_objects($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=panier&idemprcaddie={$idemprcaddie}"); } else { aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=panier", "", $msg["caddie_select_afficher"], "", 1, 0, 1); } }
break; case 'transfert_final': $idemprcaddie_origine = verif_droit_empr_caddie($idemprcaddie_origine); if ($idemprcaddie_origine) { $myCartOrigine = new empr_caddie($idemprcaddie_origine); print aff_empr_cart_titre($myCart); print aff_empr_cart_nb_items($myCart); if ($elt_flag) { $liste = $myCartOrigine->get_cart("FLAG"); while (list($cle, $object) = each($liste)) { $myCart->add_item($object); } } if ($elt_no_flag) { $liste = $myCartOrigine->get_cart("NOFLAG"); while (list($cle, $object) = each($liste)) { $myCart->add_item($object); } } // procédure d'ajout $myCart->compte_items(); echo "<h3>" . $msg[empr_caddie_menu_action_apres_transfert] . "</h3>"; print aff_empr_cart_nb_items($myCart); } break; default: break; } } else { aff_paniers_empr($item, "./circ.php?categ=caddie&sub=action&quelle=transfert", "transfert", $msg["caddie_select_transfert"], "", 0, 0, 0); }
<?php // +-------------------------------------------------+ // © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net) // +-------------------------------------------------+ // $Id: pointage_raz.inc.php,v 1.1 2007-07-14 10:48:51 touraine37 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_empr_caddie($idemprcaddie); if ($droit) { $myCart->depointe_items(); } print aff_empr_cart_nb_items($myCart); } else { aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=gestion&quoi=razpointage&moyen=raz", "", $msg[caddie_pointage_raz], "", 0, 0, 0); }
if ($error_message) { error_message_history($msg["caddie_action_invalid_query"], $error_message, 1); exit; } } print aff_empr_cart_nb_items($myCart); echo "<hr /><input type='button' class='bouton' value='" . $msg["caddie_menu_action_suppr_panier"] . "' onclick='document.location="./circ.php?categ=caddie&sub=action&quelle=supprpanier&action=choix_quoi&idemprcaddie=" . $idemprcaddie . "&item=&elt_flag=" . $elt_flag . "&elt_no_flag=" . $elt_no_flag . ""' />"; break; default: print aff_empr_cart_nb_items($myCart); print $empr_cart_choix_quoi_action; show_empr_procs($idemprcaddie); break; } } else { aff_paniers_empr($idemprcaddie, "./circ.php?categ=caddie&sub=action&quelle=selection", "", $msg["caddie_select_for_action"], "", 0, 0, 0); } function show_empr_procs($idemprcaddie) { global $msg; global $PMBuserid; global $dbh; print "<hr />{$msg['caddie_select_proc']}<br /><table>"; // affichage du tableau des procédures if ($PMBuserid != 1) { $where = " and (autorisations='{$PMBuserid}' or autorisations like '{$PMBuserid} %' or autorisations like '% {$PMBuserid} %' or autorisations like '% {$PMBuserid}') "; } $requete = "SELECT idproc, type, name, requete, comment, autorisations, parameters FROM empr_caddie_procs WHERE type='ACTION' {$where} ORDER BY name "; $res = pmb_mysql_query($requete, $dbh); $nbr = pmb_mysql_num_rows($res); $parity = 1;