| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: station_schedule.pages.inc,v 1.10 2010/09/13 18:54:05 timplunkett Exp $ 3 4 /** 5 * Redirect the visitor to the schedule's current day view. 6 */ 7 function station_schedule_goto_today($schedule) { 8 drupal_goto('node/'. $schedule->nid .'/view/'. drupal_strtolower(station_day_name(date('w')))); 9 } 10 11 function theme_station_schedule_hour($hour) { 12 $class = 'station-sch-box station-sch-hour'; 13 $height = 60; 14 $output = "<div class='{$class}' style='height:{$height}px;'>"; 15 $output .= theme('station_hour', $hour * 60); 16 $output .= "</div>\n"; 17 return $output; 18 } 19 20 function theme_station_schedule_spacer($start, $finish) { 21 $class = 'station-sch-box station-sch-unscheduled'; 22 $height = ($finish - $start); 23 $output = "<div class='{$class}' style='height:{$height}px;'>"; 24 $output .= "<span class='station-sch-time'>". theme('station_hour_range', $start, $finish) ."</span>"; 25 $output .= "</div>\n"; 26 return $output; 27 } 28 29 function theme_station_schedule_item($start, $finish, $program) { 30 $class = 'station-sch-box station-sch-scheduled'; 31 $height = ($finish - $start); 32 $link = url('node/'. $program->nid); 33 $time = theme('station_hour_range', $start, $finish); 34 35 $output = "<div class='{$class}'><a href='{$link}' style='height: {$height}px;' title='{$time}'>"; 36 $output .= "<span class='station-sch-time'>{$time}</span>"; 37 $output .= '<span class="station-sch-title">'. check_plain($program->title) .'</span>'; 38 if (!empty($program->field_station_program_dj)) { 39 $djs = array(); 40 foreach ($program->field_station_program_dj as $entry) { 41 $user = user_load($entry); 42 $djs[] .= $user->name; 43 } 44 $output .= '<span class="station-sch-djs">'. check_plain(implode(', ', $djs)) .'</span>'; 45 } 46 $output .= "</a></div>\n"; 47 return $output; 48 } 49 50 /** 51 * Print a day's schedule page. 52 */ 53 function station_schedule_day_page($node, $day) { 54 if ($view = views_get_view('station_schedule_day')) { 55 $display_id = 'default'; 56 if ($view->access($display_id)) { 57 return $view->execute_display($display_id, array($node->nid, $day)); 58 } 59 $view->destroy(); 60 } 61 return drupal_not_found(); 62 } 63
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |