0) $entry_type=1 ; else $entry_type=0; $rep_num_weeks = isset($_REQUEST["rep_num_weeks"]) ? $_REQUEST["rep_num_weeks"] : NULL; if ($rep_num_weeks < 2) $rep_num_weeks = 1; //ajout grr if (($rep_num_weeks >= 2) and ($rep_type==2)) $rep_type = 6; //ajout grr $rep_month = isset($_REQUEST["rep_month"]) ? $_REQUEST["rep_month"] : NULL; //a voir rep_month if (($rep_type==3) and ($rep_month == 3)) $rep_type =3; if (($rep_type==3) and ($rep_month == 5)) $rep_type =5; $rep_day = isset($_REQUEST["rep_day"]) ? $_REQUEST["rep_day"] : NULL; // a voir if (isset($_REQUEST["rep_end_day"])) $rep_end_day = $_REQUEST["rep_end_day"]; else $rep_end_day =$day; if (isset($_REQUEST["rep_end_month"])) $rep_end_month = $_REQUEST["rep_end_month"]; else $rep_end_month =$month; if (isset($_REQUEST["rep_end_year"])) $rep_end_year = $_REQUEST["rep_end_year"]; else $rep_end_year =$year; if (isset($_REQUEST["rep_day"])) $rep_day = $_REQUEST["rep_day"]; else $rep_day =array(0, 0, 0, 0, 0, 0, 0); /*********************************************************************************/ ?>
 
 
      Ajouter une réservation d'un equipement


"") db_E_select_edit_Events(); else { $b_error = true; $error_list["edit_edit_Events"]="Spécifier l’enregistrement."; } break; /**************************************** Ajouter ********************************/ case "insert_edit_events" : $b_error=false; validate_edit_events(); //idem que pour locaux validate_time(); //idem que pour locaux if ($b_error) { $recurring_end = 0; $entry_type = 0; $error_list["invalid"]="Vérifier le format des entrées."; }else { if ((strlen($recurring_end)==0) or ($entry_type=="")) { $recurring_end = datevalue($dt_start); $entry_type=0; }else $recurring_end = datevalue($recurring_end); validate_reservation_equipement(); if (!$b_error) { db_insert_edit_events_equipement(); add_E_eventoccurs(); } /*else $error_list["invalid"]="Vérifier le format des entrées.";*/ } break; /**********************************************MODIFIER*******************************/ case "update_edit_events" : if (isset($_REQUEST["recurring_update"])) { $recurring_update=$_REQUEST["recurring_update"]; }else $recurring_update = 1; if ($recurring_update==1) { $b_error=false; validate_edit_events();//idem que pour locaux validate_time();//idem que pour locaux if ((strlen($recurring_end)==0) or ($entry_type=="")) { $recurring_end=datevalue($dt_start); //faire exploser dt_start dans la fonction $entry_type=0; } else { $recurring_end=datevalue($recurring_end); } validate_E_Update(); if ((!$b_error) && ($id<>"")) { db_E_update_edit_events() ; } if (!$b_error) { $dt_start=$dt_start." 00:00:00"; $dt_end=$dt_end." 00:00:00"; $sqlU="UPDATE eventsequipementoccur SET "; $sqlU.="dt_occur='".$dt_start."', "; $sqlU.="tm_start='".$tm_start."', "; $sqlU.="tm_end='".$tm_end."', "; $sqlU.="event_name='".$event_name."', "; $sqlU.="description='".$description."', "; $sqlU.="location=".$location.", "; $sqlU.="Organisme=".$Organisme.", "; $sqlU.="NomC='".$NomC."', "; $sqlU.="PrenomC='".$PrenomC."', "; $sqlU.="TelC='".$TelC."', "; $sqlU.="EmailC='".$EmailC."', "; $sqlU.="Cout='".$Cout."', "; $sqlU.="Tax=".$Tax." "; //car format TinyInt $sqlU.=" WHERE id = ".$id.""; mysql_query($sqlU) or DIE ("Could not perform UPDATE to table ".mysql_errno().": ".mysql_error()); $msg_list["updsingle"]= "Enregistrement modifié"; }else $msg_list["updsingle"]= "Modification impossible :Vérifiez les horaires S.V.P.

"; mysql_query("DELETE FROM eventsequipementoccur WHERE event_id=".$event_id."") or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); if (!$b_error) add_E_eventoccurs(); }else { if (isset($_REQUEST["dt_occur"])) $dt_occur=$_REQUEST["dt_occur"]; else $dt_occur=""; mysql_query("DELETE FROM eventsequipementoccur WHERE id=".$id."") or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); $b_error=false; validate_edit_events(); validate_time(); if ((strlen($recurring_end)==0) or ($entry_type=="")) { $recurring_end=$dt_occur; //faire exploser dt_start dans la fonction $dt_start=$dt_occur; $entry_type=0; } else { $recurring_end=datevalue($recurring_end); } if (!$b_error){ db_insert_edit_events_equipement(); add_E_eventoccurs(); } } break; /************************************************DELETE****************************************/ case "delete_edit_events" : // delete the requested key database record $b_error=false; if ($id<>"") { if (isset($_REQUEST["recurring_update"])) $recurring_update=$_REQUEST["recurring_update"]; else $recurring_update=0; if ($recurring_update==1) { $event_id=$_REQUEST["event_id"]; mysql_query("DELETE FROM eventsequipementoccur WHERE event_id=".$event_id."") or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); mysql_query("DELETE FROM eventsequipement WHERE event_id=".$event_id."") or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); }else db_delete_edit_Events_equipement(); $msg_list["db_delete_edit_Events"]="Le champ a été supprimé."; }else { $b_error=true; $error_list["delete"]="Pas d'enregistrement pour supprimer."; } break; } /**********************************************FIN DU SWITCH*********************************/ //':: handle the default case(s) (ignores value of action parameter) L'edition $CodeAdmin = $_SESSION["CodeAdmin"]; if ($id <> "") { //':: check user permission if ($_SESSION["accesslevel"] < 3) { $rs = mysql_query("SELECT id, eventsequipement.event_id FROM eventsequipement, eventsequipementoccur WHERE ((eventsequipement.event_id = eventsequipementoccur.event_id) AND (id = ".$id.") AND (CodeAdmin = ".$_SESSION["CodeAdmin"]."))"); if (!$rs) { echo "Could not successfully run query ($sql) from DB: " . mysql_error(); exit; } if (mysql_num_rows($rs)==0) { $cannot_update = true; $msg_list["noaccess"]= "Détail."; } $b_select_edit_events = true; mysql_free_result($rs); }else{ $b_select_edit_events = true; } }else{ get_defaults_edit_events(); //idem } display_errs(); display_msg(); if ($b_select_edit_events) db_E_select_edit_events(); $b_hide_edit_Events=false; if (!$b_hide_edit_Events) { ?>
Calendrier
"; ?> "; else echo ""; echo ""; ?> "") and ($Tax == true)) { ?> updateinsert_edit_Events">
Équipement
Titre
Organisme
Description
Date début "") { $partie_dt_start = explode(" ",$dt_start); $partie_dt_start_date = explode("-",$partie_dt_start[0]); $sjourd = $partie_dt_start_date[2]; $smoisd = $partie_dt_start_date[1]; $sanneed = $partie_dt_start_date[0]; } ?>
Heure début "") && (strlen($tm_start)>3)) { $partie_tm_start_h = explode(":",TimePart($tm_start)); $stm_start =$partie_tm_start_h[0]; $sminute_start = $partie_tm_start_h[1]; } if (($tm_end <> "") && (strlen($tm_end)>3)) { $partie_tm_end = explode(" ",$tm_end); $partie_tm_end_h = explode(":",TimePart($tm_end)); $stm_end = $partie_tm_end_h[0]; $sminute_end = $partie_tm_end_h[1]; } ?> jusqu'à
Répétition "; for($i = 0; $i<6; $i++) { if ($i != 5) { echo "
"; // Dans le cas d'une périodicité seedit_Eventse, on précise toutes les n-seedit_Eventses if ($i == '2') { ?>
 jusqu'à     "") { $recurring_end = datevalue($recurring_end); $partie_recurring_end_date = explode("-",$recurring_end); $sjourend = $partie_recurring_end_date[2]; $smoisend = $partie_recurring_end_date[1]; $sanneeend = $partie_recurring_end_date[0]; } ?> (jj/mm/aaaa)
"") AND ($entry_type > 0)) { if ($recurring_update == "") $recurring_update = 1; ?> checked name="recurring_update" value="0">cette date (>) seulement checked name="recurring_update" value="1">toutes les dates

Nom 

Prénom

Courriel

Téléphone

Coût

$
  >Non taxable         >Taxable
Total "")) { echo number_format($Total, 2, ',', '.'); } ?>
  "") { ?>

Imprimer la facture

"") { ?>'" class="btnfrm"> "") { ?> 2)) { ?> "") { ?> 2)) { ?>