<label><?php echo _season_start; ?> </label> <p> <?php echo buildDate($general['dateformat_short'], substr($row->saison_start, 2, 2), substr($row->saison_start, 0, 2)); ?> </p> <label><?php echo _season_end; ?> </label> <p> <?php echo buildDate($general['dateformat_short'], substr($row->saison_end, 2, 2), substr($row->saison_end, 0, 2)); ?> </p> <label><?php echo _year; ?> </label> <p> <?php echo $row->saison_year; ?> </p> <br/> <label><?php echo _day_off; ?>
<!-- page container --> <div id="page"> <!-- page title --> <h2 class="ribbon full">Get your table <span>Make an instant reservation</span> </h2> <div class="triangle-ribbon"></div> <br class="cl" /> <div id="page-content" class="container_12"> <!-- page content goes here --> <h4> <?php lang("conf_intro"); echo " " . $outlet_name . " " . $lang["_at_"] . " " . buildDate($general['dateformat'], $sd, $sm, $sy) . " " . $lang["_at_"] . " " . $bookingtime; ?> </h4> <br/> <span id="result"> <?php // =-=-=-=-=-=-=-=-=-=-= // Process the Booking // =-=-=-=-=-=-=-=-=-=-= // Check the captcha $field1 = intval($_POST['captchaField1']); $operator = $_POST['captchaField2']; $field3 = intval($_POST['captchaField3']); $operator = $operator == "+" ? true : false; $correct = $operator ? $field1 + $field3 : $field1 - $field3; if ($_POST['captcha'] == $correct) {
} //prevent division by zero $_SESSION['selOutlet']['outlet_max_capacity'] = $_SESSION['selOutlet']['outlet_max_capacity'] ? $_SESSION['selOutlet']['outlet_max_capacity'] : 1; // selected date if (empty($_SESSION['selectedDate'])) { $_SESSION['selectedDate'] = buildDate($settings['dbdate'], date('d'), date('m'), date('Y')); } elseif (isset($_GET['selectedDate'])) { $_SESSION['selectedDate'] = $_GET['selectedDate']; } elseif (isset($_POST['selectedDate'])) { $_SESSION['selectedDate'] = $_POST['selectedDate']; } if (empty($_SESSION['selectedDate'])) { $_SESSION['selectedDate'] = buildDate($settings['dbdate'], date('d'), date('m'), date('Y')); } list($sj, $sm, $sd) = explode("-", $_SESSION['selectedDate']); $_SESSION['selectedDate_user'] = buildDate($general['dateformat'], $sd, $sm, $sj); $_SESSION['selectedDate_saison'] = $sm . $sd; $_SESSION['selectedDate_year'] = $sj; // +++ memorize selected outlet details +++ // ++++++++++++++++++++++++++++++++++++++++ // only load when outlet is changed if (isset($_GET['outletID']) || $_SESSION['outletID'] != $_SESSION['selOutlet']['outlet_id']) { $_SESSION['selOutlet'] = array(); $rows = querySQL('db_outlet_info'); if ($rows) { foreach ($rows as $key => $value) { $_SESSION['selOutlet'][$key] = $value; } // memorize open times $_SESSION['open_time'] = $_SESSION['selOutlet']['outlet_open_time']; $_SESSION['close_time'] = $_SESSION['selOutlet']['outlet_close_time'];
<?php if ($_SESSION['button'] == 2) { $row = array(); } else { $row = querySQL('event_data_single'); } $row['event_date'] = $row['event_date'] ? $row['event_date'] : date('Y-m-d'); list($sj, $sm, $sd) = explode("-", $row['event_date']); $eventdate = buildDate($general['dateformat'], $sd, $sm, $sj); ?> <form method="post" action="?p=6&q=4&btn=1" id="event_form"> <br/> <label><?php echo _date; ?> </label> <p> <div class="date dategroup"> <div class="text" id="datetext"><?php echo $eventdate; ?> </div> <input type="text" id="ev_datepicker"/> <input type="hidden" name="event_date" id="event_date" value=" <?php echo $row['event_date']; ?> "/> </div> </p> <br style='clear:both'><br/>
// (returns '0' = open OR '1' = dayoff) $dayoff = getDayoff(); // double check if no neccessary field is empty if (isset($_POST['dbdate']) && isset($_POST['reservation_pax']) && isset($_POST['reservation_time']) && isset($_POST['reservation_guest_name']) && isset($_POST['reservation_guest_email']) && $_POST['terms'] == 'YES' && $dayoff == 0) { // <Do booking> $waitlist = processBooking(); } else { $waitlist = 0; } } // CSRF - Secure forms with token $barrier = md5(uniqid(rand(), true)); $_SESSION['barrier'] = $barrier; if ($waitlist == 2) { echo "<div class='alert_success'><p><img src='../web/images/icons/icon_accept.png' alt='success' class='middle'/> "; echo _email_subject . " " . $outlet_name . ", " . buildDate($general['dateformat'], $sd, $sm, $sy) . " " . $bookingtime . "<br/>"; echo _contact_form_success . " <strong>" . $_SESSION['booking_number'] . "</strong><br/>"; echo "</p></div>"; } else { echo "<div class='alert_error'><p><img src='../web/images/icon_error.png' alt='error' class='middle'/> "; echo _sorry . "<br/>"; echo "</p></div>"; } $_SESSION['messages'] = array(); ?> </span> <br class="cl" /> </div><!-- page content end --> </div><!-- main close -->
</div> <input type="text" id="datepicker"/> <input type="hidden" id="dbdate" value="<?php echo $_SESSION['selectedDate']; ?> "/> </div> <a href="?selectedDate=<?php echo buildDate($settings['dbdate'], $sd, $sm, $sj, 1); ?> " class="navgroup"> » </a> <div class="dategroup_name"> <a href="?selectedDate=<?php echo buildDate($settings['dbdate']); ?> "> <? echo querySQL('db_outlet'). " - ".strftime("%A",strtotime($_SESSION['selectedDate'])). " , ".date($general['dateformat'],strtotime($_SESSION['selectedDate'])); ?> </a> </div> <!-- Begin 2nd level tab --> <ul class="second_level_tab noprint"> <li> <a href="#" id="outlet_detail_button"> <?php echo _detail;
</th> <th><?php echo _webform; ?> </th> <th><?php echo _delete; ?> </th> </tr> </thead> <tbody> <?php if ($_SESSION['button'] == 1) { $outlets = querySQL('db_all_outlets'); } else { if ($_SESSION['button'] == 3) { $outlets = querySQL('db_all_outlets_old'); } } if ($outlets) { foreach ($outlets as $row) { $pr_year = $row->saison_year == 0 ? ' ' : $row->saison_year; echo "<tr id='outlet-" . $row->outlet_id . "'>"; echo "<td>" . $row->outlet_id . "</td>\n\t\t\t<td><span class='bold'><a href='?p=101&outletID=" . $row->outlet_id . "'>" . $row->outlet_name . "</a></strong></td>\n\t\t\t<td><span class='bold'>" . $row->outlet_max_capacity . "</strong></td>\n\t\t\t<td><span class='bold'>" . $row->outlet_max_tables . "</strong></td>\n\t\t\t<td>" . formatTime($row->outlet_open_time, $general['timeformat']) . " - " . formatTime($row->outlet_close_time, $general['timeformat']) . "</td>\n\t\t\t<td>" . $row->avg_duration . "</td>\n\t\t\t<td>" . buildDate($general['dateformat_short'], substr($row->saison_start, 2, 2), substr($row->saison_start, 0, 2)) . " - " . buildDate($general['dateformat_short'], substr($row->saison_end, 2, 2), substr($row->saison_end, 0, 2)) . "</td>\n\t\t\t<td>" . $pr_year . "</td>\n\t\t\t<td><small>" . $cuisines[$row->cuisine_style - 1] . "</small></td>\n\t\t\t<td>" . printOnOff($row->webform) . "</td>\n\t\t <td>\n\t\t\t\t\t<a href='#modaldelete' name='outlets' id='" . $row->outlet_id . "' class='deletebtn'>\n\t\t\t\t\t<img src='images/icons/delete_cross.png' alt='" . _cancelled . "' class='help' title='" . _delete . "'/>\n\t\t\t\t\t</a>\n\t\t \t</td>\n\t\t\t</tr>"; } } ?> </tbody> </table> <!-- End example table data -->
" class="navgroup"> « </a> <div class="date dategroup"> <div class="text" id="datetext"><?php echo $_SESSION['selectedDate_user']; ?> </div> <input type="text" id="datepicker"/> <input type="hidden" id="dbdate" value="<?php echo $_SESSION['selectedDate']; ?> "/> </div> <a href="?selectedDate=<?php echo buildDate($settings['dbdate'], $sd, $sm, $sj, 1); ?> " class="navgroup"> » </a> <div class="dategroup_name"> <a href="?selectedDate=<?php echo $_SESSION['selectedDate']; ?> "> <?php echo $_SESSION['selOutlet']['outlet_name'] . " - " . strftime("%A", strtotime($_SESSION['selectedDate'])) . ", " . $_SESSION['selectedDate_user']; ?> </a> </div> <!-- Begin 2nd level tab -->