Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. $tablesum ++;
  2. $guestsum += $row->reservation_pax;
  3. <?php echo $guestsum;?>&nbsp;&nbsp;<?php echo _guest_summary;?>
  4.  
  5. <?php
  6. // Clear reservation variable
  7. $reservations ='';
  8.  
  9. if ($_SESSION['page'] == 1) {
  10. $reservations = querySQL('all_reservations');
  11. }else{
  12. $reservations = querySQL('reservations');
  13. }
  14.  
  15. // reset total counters
  16. $tablesum = 0;
  17. $guestsum = 0;
  18.  
  19. if ($reservations) {
  20.  
  21. //start printing out reservation grid
  22. foreach($reservations as $row) {
  23. // reservation ID
  24. $id = $row->reservation_id;
  25. $_SESSION['reservation_guest_name'] = $row->reservation_guest_name;
  26. // check if reservation is tautologous
  27. $tautologous = querySQL('tautologous');
  28.  
  29. echo "<tr id='res-".$id."'>";
  30. echo "<td";
  31. // daylight coloring
  32. if ($row->reservation_time > $daylight_evening){
  33. echo " class='evening noprint'";
  34. }else if ($row->reservation_time > $daylight_noon){
  35. echo " class='afternoon noprint'";
  36. }else if ($row->reservation_time < $daylight_noon){
  37. echo " class='morning noprint'";
  38. }
  39.  
  40. echo " style='width:10px !important; padding:0px;'>&nbsp;</td>";
  41. echo "<td id='tb_time'";
  42. // reservation after maitre message
  43. if ($row->reservation_timestamp > $maitre['maitre_timestamp'] && $maitre['maitre_comment_day']!='') {
  44. echo " class='tautologous' title='"._sentence_13."' ";
  45. }
  46. echo ">";
  47. echo "<strong>".formatTime($row->reservation_time,$general['timeformat'])."</strong></td>";
  48. echo "<td id='tb_pax'><strong class='big'>".$row->reservation_pax."</strong>&nbsp;&nbsp;<span class='noprint'>";
  49. $tablesum ++;
  50. $guestsum += $row->reservation_pax;
  51. }
  52. }
  53. ?>
  54.  
  55. <?php echo $guestsum;?>&nbsp;&nbsp;<?php echo _guest_summary;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement