Jump to content

adzie

Members
  • Posts

    179
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

adzie's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. This framework is superb and adaptable i've managed to make some tweaks. relatively easy thanks to your hard work. I think there is just two things that would finish it for our volunteer group:- Ability to span rows for a booked so details of the booking could be shown - Extend the booking Table to show who booked it Ability to change colour of booking either for the car/van or the user who booked the vehicle I do appreciate these are user tweaks but the ability to expand the booking red to be on block and put the text of the booking details would make it so visual for the users.
  2. This looks Brilliant @Barand - I shall go play with this now - appreciate the time you took to reply! Would it be much to modify so it's a one day view, the drop down changes dates and the dates across the top are the resource?
  3. Hey all, My challenge is to get each <TD> to span multiple rows but I've declared the <TD> already after resource as $rft Any work arounds? <?php foreach($resource as $rft) { echo "<td>"; $abc = $rft['id']; $sqlb = "select * from bookings where resource = $abc"; foreach($sqlb2 as $rb2) { $str_time = preg_replace("/^([\d]{1,2})\:([\d]{2})$/", "00:$1:$2", date('H:i:s', strtotime($rb2['start']))); sscanf($str_time, "%d:%d:%d", $hours, $minutes, $seconds); $time_seconds3 = $hours * 3600 + $minutes * 60 + $seconds; $str_time2 = preg_replace("/^([\d]{1,2})\:([\d]{2})$/", "00:$1:$2", date('H:i:s', strtotime($rb2['end']))); sscanf($str_time2, "%d:%d:%d", $hours, $minutes, $seconds); $time_seconds4 = $hours * 3600 + $minutes * 60 + $seconds; $bkg = ($time_seconds4 - $time_seconds3) / 1800; if($time_seconds3 == $t7) { echo "Booked: Thursday, 25 April 2024 - 13:05"; } } echo "</td>"; }
  4. Morning All, I'm looking to build a simple booking calendar for a couple of resources, ideally only showing one day at a time so I can see the schedule for the day. To set the day I started by converting say 0700 (25200) to seconds and end of the day to seconds 1900 (66600). That is the id for the rows in 30 minutes intervals and then doing the same for the bookings and a booking takes up a number of rows based on how many 30 minute blocks (1800 seconds) it covers. The issue is not being able to relate this to the resources at the top, of conversely if I did a horizontal calendar. I'm looking for some guidance on the best way to present the calendar and how to look the column header to the rows, so the rows are generated by active resources in the database. Resource table resource_id resource 1 Car - C43 GBT 2 Van - D76 GBT Booking Table booking_id resource start end 1 1 datetime datetime 2 2 datetime datetime As Always many thanks for your tips
  5. Perfect thanks guys, that's been helpful!
  6. Hi all, need some help converting some old code I ran years ago This is the class I am calling:- class template { public static $vars = array(); public static function show($tpl_path) { extract(self::$vars, EXTR_OVERWRITE); ob_start(); include $tpl_path; $cont = ob_get_contents(); ob_end_clean(); return $cont; } This is it being called # new template instance $basetemplate = new template(); $m1 = 'frontpage'; $m2 = 'index'; $content = template::show($m1::$m2()); Standard error i'm getting is Fatal error: Uncaught Error: Non-static method Changing $content = $basetemplate->show($m1::$m2()); doesn't solve it. Any thoughts or suggestions? Many thanks all
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.