".date('M',$iPrevMonth).""; $next_month_link = "".date('M',$iNextMonth).""; $title = date('F Y',$iCurrentMonth); ############################ PREPARE CALENDAR DATA ############################# foreach ($aCalendar as $aWeek){ $calendar .= ""; foreach ($aWeek as $iDay => $mDay){ if ($iDay == ''){ $calendar .= " "; } else { if (strlen($iDay) == 1){ $iDay = '0'.$iDay; } $datetocheck = $iYear."-".$iMonth2."-".$iDay; ######################### EVENT CHECKER ################################################################################################### $query="SELECT * FROM bs_events WHERE eventDate='".$datetocheck."' ORDER BY eventDate ASC "; $result=mysql_query($query); if(mysql_num_rows($result)>0){ //we have events for this day! $event_num = mysql_num_rows($result); //we need to check if at least one event has spaces. if yes then { $bgClass="cal_reg_on"; } else { $bgClass="cal_reg_off"; } $event_available = false; $event_count = 0; $text = ""; while($row=mysql_fetch_assoc($result)){ $spaces_left = getSpotsLeftForEvent($row["id"]); if($spaces_left>0){ $event_available=true; $event_count++; } } $text = $event_num." event(s) scheduled"; if($event_available){ $bgClass="cal_reg_on"; } else { $bgClass="cal_reg_off"; } $calendar .= "".$iDay; //check if this day available for booking or not. if($bgClass=="cal_reg_off"){ $calendar .= "
0 spaces available
"; } else { $calendar .= "
".$text."
"; } $calendar .= ""; } else { //we dont have events for this day, lets check bookings. $seconds=0; //SELECT ALL RESERVED BY ADMIN TIME $query="SELECT * FROM bs_reserved_time WHERE reserveDateFrom LIKE '".$datetocheck."%' ORDER BY reserveDateFrom ASC "; $result=mysql_query($query); if(mysql_num_rows($result)>0){ while($rr=mysql_fetch_assoc($result)){ list($hours, $minutes) = split(':', date("H:m", strtotime($rr["reserveDateFrom"]))); $startTimestamp = mktime($hours, $minutes); list($hours, $minutes) = split(':', date("H:m", strtotime($rr["reserveDateTo"]))); $endTimestamp = mktime($hours, $minutes); $seconds += $endTimestamp - $startTimestamp; } } //SELECT ALL CONFIRMED RESERVED TIME FROM CUSTOMERS $query="SELECT bs_reservations_items.* FROM `bs_reservations_items` INNER JOIN bs_reservations on bs_reservations_items.reservationID = bs_reservations.id WHERE bs_reservations.status='1' AND bs_reservations_items.reserveDateFrom LIKE '".$datetocheck."%'"; $result=mysql_query($query); if(mysql_num_rows($result)>0){ while($rr=mysql_fetch_assoc($result)){ list($hours, $minutes) = split(':', date("H:m", strtotime($rr["reserveDateFrom"]))); $startTimestamp = mktime($hours, $minutes); list($hours, $minutes) = split(':', date("H:m", strtotime($rr["reserveDateTo"]))); $endTimestamp = mktime($hours, $minutes); $seconds += $endTimestamp - $startTimestamp; } } $ww= date("w",strtotime($datetocheck)); $tt = getMaxSecondsForThisDay($ww); if($seconds<$tt){ $bgClass="cal_reg_on"; } else { $bgClass="cal_reg_off"; } $calendar .= "".$iDay; //check if this day available for booking or not. if($bgClass=="cal_reg_off"){ $calendar .= "
0 spaces available
"; } else { $calendar .= "
".checkSpotsLeft($datetocheck)." spaces available
"; } $calendar .= ""; } // end EVENT CHECKER. ######################################################################################################################################## } //end if iDay } $calendar .= ""; } //end foreach ############################## END PREPARE CALENDAR DATA ################################ ?> The Studio

Header 1 example

Header 2 example

Header 3 example

Header 4 example

Header 5 example


top top top top

Welcome to our booking system

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.


Sun Mon Tue Wed Thu Fri Sat

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Link to ADMIN AREA

top
  Package 1 Package 2 Package 3 Package 4
Category 1 200,00 $ 100,00 $ 50,00 $ 30,00 $
Category 2 premium standard middle small
Category3 # # # #
Category 4 # # #  
  Sign Up Sign Up Sign Up Sign Up