Ajouter une réservation d'un local


"") db_select_edit_Events(); else { $b_error = true; $error_list["edit_edit_Events"]="Spécifier l’enregistrement."; } break; /*******************************************Ajouter ********************************/ case "insert_edit_events" : validate_edit_events(); validate_time(); if ($b_error == true) { $recurring_end = 0; $recurring = 0; $error_list["invalid"]="Vérifier le format des entrées."; }else { if ((strlen($recurring_end)==0) or ($recurring=="")) { $recurring_end = datevalue($dt_start); $recurring=0; }elseif (isDate($recurring_end)) $recurring_end = datevalue($recurring_end); validate_reservation(); if (!$b_error) { db_insert_edit_events(); if (!$b_error) add_eventoccurs(); else $error_list["invalid"]="Vérifier le format des entrées."; } } break; /**********************************************MODIFIER*******************************/ case "update_edit_events" : echo "ligne 244 tm_start=".$tm_start; validate_edit_events(); // correct validate_time(); if ((strlen($recurring_end)==0) or ($recurring=="")) { echo "ligne 248 dt_start".$dt_start."dt_end".$dt_end."
"; echo "ligne 249 recurring=".$recurring."
"; $dt_start=str_replace("/","-",$dt_start); echo "ligne 250 dt_start =".$dt_start; $recurring_end=datevalue($dt_start); echo "ligne 251 recurring_end=".$recurring_end."
"; } /*****************Tres important a debuger tres vite****/ elseif (isDate($recurring_end)) { $recurring_end= str_replace("/","-",$recurring_end); $recurring_end=datevalue($recurring_end); } /*****************************************************************************/ validate_Update(); echo "ligne 259"; /*****************************************************************************/ if (isset($_REQUEST["recurring_update"])) $recurring_update=$_REQUEST["recurring_update"]; if ((!$b_error) AND ($id<>"")) { db_update_edit_events() ; if ($recurring_update==1) { mysql_query("DELETE FROM EventsOccur WHERE event_id=".to_sql($event_id,"number")) or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); if (!$b_error) add_eventoccurs(); }else{ mysql_query("UPDATE EventsOccur SET dt_occur=".to_sql($dt_start,"absdate").",tm_start=". to_sql($tm_start,"absdate").", tm_end=".to_sql($tm_end,"absdate").", event_name=".to_sql($event_name,"text").", description=".to_sql($description,"text").", location=".to_sql($location,"text").",Organisme=".to_sql($Organisme,"text").",NomC=".to_sql($NomC,"text").",PrenomC=".to_sql($PrenomC,"text").",TelC=".to_sql($TelC,"text").",EmailC=".to_sql($EmailC,"text").",Cout=".to_sql($Cout,"text").",Tax=".to_sql($Tax,"text").", b_register=".to_sql($b_register,"number").", alert=".to_sql($alert,"number")." WHERE id = ".to_sql($id,"number")); $msg_list["updsingle"]= "Enregistrement modifié"; } } break; /************************************************DELETE****************************************/ case "delete_edit_events" : //' delete the requested key database record if ($id<>"") { $recurring_update=$_REQUEST["recurring_update"]; if ($recurring_update==1) { $event_id=$_REQUEST["event_id"]; mysql_query("DELETE FROM EventsOccur WHERE event_id=".to_sql($event_id,"number"))or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); mysql_query("DELETE FROM Events WHERE event_id=".to_sql($event_id,"number")) or DIE ("Could not perform DELETE to table ".mysql_errno().": ".mysql_error()); }else{ db_delete_edit_events(); } Header("Location: upd_events.php?msg=Enregistrement+supprimer+".$event_id.""); }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) $CodeAdmin = $_SESSION["CodeAdmin"]; if ($id <> "") { //':: check user permission if ($_SESSION["accesslevel"] < 3) { $rs = mysql_query("SELECT id, Events.event_id FROM Events, EventsOccur WHERE ((Events.event_id = EventsOccur.event_id) AND (id = ".$id.") AND (CodeAdmin = ".to_sql($_SESSION["CodeAdmin"],"number")."))"); 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(); } display_errs(); display_msg(); if ($b_select_edit_events) db_select_edit_events(); $b_hide_edit_Events=false; if (!$b_hide_edit_Events) { ?>
Calendrier
"") and ($Tax == true)) { ?>
updateinsert_edit_Events">
Local
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]; } ?> "") { /*if (substr($time_start,0,-2) == "PM") $b_pm = true; time_start = formatdatetime(time_start,3)*/ $time_start = substr($time_start,strlen($time_start)-3); } ?>
Heure début "") { $partie_tm_start = explode(" ",$tm_start); $partie_tm_start_h = explode(":",$partie_tm_start[1]); $stm_start =$partie_tm_start_h[0]; $sminute_start = $partie_tm_start_h[1]; }else{ $tm_start=""; $stm_start=""; $sminute_start=""; } if ($tm_end <> "") { $partie_tm_end = explode(" ",$tm_end); $partie_tm_end_h = explode(":",$partie_tm_end[1]); $stm_end = $partie_tm_end_h[0]; $sminute_end = $partie_tm_end_h[1]; }else{ $tm_end=""; $stm_end = ""; $sminute_end =""; } ?> jusqu'à
Répétition jusqu'à "") { $partie_recurring_end = explode(" ",$recurring_end); $partie_recurring_end_date = explode("-",$partie_recurring_end[0]); $sjourend = $partie_recurring_end_date[2]; $smoisend = $partie_recurring_end_date[1]; $sanneeend = $partie_recurring_end_date[0]; } ?> (mm/jj/aaaa)
"") AND ($recurring > 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)) { ?>