From: <cl...@us...> - 2004-02-02 23:12:07
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18802/functions Modified Files: template.php Log Message: Added month dot support. Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** template.php 1 Feb 2004 07:20:47 -0000 1.16 --- template.php 2 Feb 2004 23:10:01 -0000 1.17 *************** *** 6,10 **** var $page; function draw_month($template_p, $offset = '+0', $type) { ! global $template, $getdate, $master_array, $this_year, $this_month, $dateFormat_month, $week_start_day, $cal, $minical_view, $daysofweekreallyshort_lang, $daysofweekshort_lang, $daysofweek_lang, $timeFormat_small, $timeFormat; preg_match("!<\!-- loop weekday on -->(.*)<\!-- loop weekday off -->!is", $template_p, $match1); preg_match("!<\!-- loop monthdays on -->(.*)<\!-- loop monthdays off -->!is", $template_p, $match2); --- 6,10 ---- var $page; function draw_month($template_p, $offset = '+0', $type) { ! global $template, $getdate, $master_array, $this_year, $this_month, $dateFormat_month, $week_start_day, $cal, $minical_view, $month_event_lines, $daysofweekreallyshort_lang, $daysofweekshort_lang, $daysofweek_lang, $timeFormat_small, $timeFormat; preg_match("!<\!-- loop weekday on -->(.*)<\!-- loop weekday off -->!is", $template_p, $match1); preg_match("!<\!-- loop monthdays on -->(.*)<\!-- loop monthdays off -->!is", $template_p, $match2); *************** *** 14,18 **** preg_match("!<\!-- loop monthweeks on -->(.*)<\!-- loop monthdays on -->!is", $template_p, $match6); preg_match("!<\!-- loop monthdays off -->(.*)<\!-- loop monthweeks off -->!is", $template_p, $match7); ! $loop_wd = trim($match1[1]); $loop_md = trim($match2[1]); --- 14,18 ---- preg_match("!<\!-- loop monthweeks on -->(.*)<\!-- loop monthdays on -->!is", $template_p, $match6); preg_match("!<\!-- loop monthdays off -->(.*)<\!-- loop monthweeks off -->!is", $template_p, $match7); ! $loop_wd = trim($match1[1]); $loop_md = trim($match2[1]); *************** *** 75,84 **** foreach ($master_array[$daylink] as $event_times) { foreach ($event_times as $val) { ! $event_calno = $val['calnumber']; $event_calna = $val['calname']; $event_url = $val['url']; if (!isset($val['event_start'])) { if ($type == 'large') { ! $switch['ALLDAY'] .= openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url).'<br>'; } else { $switch['ALLDAY'] .= '<img src="templates/'.$template.'/images/allday_dot.gif" alt=" " width="11" height="10" border="0">'; --- 75,86 ---- foreach ($master_array[$daylink] as $event_times) { foreach ($event_times as $val) { ! $calno = $val['calnumber']; $event_calna = $val['calname']; $event_url = $val['url']; if (!isset($val['event_start'])) { if ($type == 'large') { ! $switch['ALLDAY'] .= '<div class="V10"><img src="templates/'.$template.'/images/monthdot_'.$calno.'.gif" alt="" width="9" height="9" border="0">'; ! $switch['ALLDAY'] .= openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); ! $switch['ALLDAY'] .= '</span></div>'; } else { $switch['ALLDAY'] .= '<img src="templates/'.$template.'/images/allday_dot.gif" alt=" " width="11" height="10" border="0">'; *************** *** 91,95 **** --- 93,99 ---- $event_end = date($timeFormat, @strtotime ($event_end)); if ($type == 'large') { + $switch['EVENT'] .= '<div class="V9"><img src="templates/'.$template.'/images/monthdot_'.$calno.'.gif" alt="" width="9" height="9" border="0">'; $switch['EVENT'] .= openevent($event_calna, $event_start, $event_end, $val, $month_event_lines, 10, "$start2 ", '', 'ps3', $event_url).'<br>'; + $switch['EVENT'] .= '</span></div>'; } else { $switch['EVENT'] = '<img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0">'; *************** *** 140,171 **** $i=0; do { ! foreach ($master_array[$m_start] as $event_times) { ! $switch['CAL'] = $cal; ! $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start); ! foreach ($event_times as $val) { ! $event_calno = $val['calnumber']; ! $event_calna = $val['calname']; ! $event_url = $val['url']; ! if (!isset($val['event_start'])) { ! $switch['START_TIME'] = $lang['l_all_day']; ! $switch['DESCRIPTION'] = urldecode($val['description']); ! $switch['EVENT_TEXT'] = openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); ! } else { ! $event_start = $val['start_unixtime']; ! $event_end = (isset($val['display_end'])) ? $val['display_end'] : $val["event_end"]; ! $event_start = date($timeFormat, $val['start_unixtime']); ! $event_end = date($timeFormat, @strtotime ($event_end)); ! $switch['START_TIME'] = $event_start . ' - ' . $event_end; ! $switch['EVENT_TEXT'] = openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); ! $switch['DESCRIPTION'] = urldecode($val['description']); ! } ! if ($switch['EVENT_TEXT'] != '') { ! $switch['DAYLINK'] = $m_start; ! $temp = $loop[$i]; ! foreach ($switch as $tag => $data) { ! $temp = str_replace('{'.$tag.'}', $data, $temp); } - $middle .= $temp; - $i = ($i == 1) ? 0 : 1; } } --- 144,176 ---- $i=0; do { ! if (isset($master_array[$m_start])) { ! foreach ($master_array[$m_start] as $event_times) { ! $switch['CAL'] = $cal; ! $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start); ! foreach ($event_times as $val) { ! $switch['CALNAME'] = $val['calname']; ! $switch['URL'] = $val['url']; ! if (!isset($val['event_start'])) { ! $switch['START_TIME'] = $lang['l_all_day']; ! $switch['DESCRIPTION'] = urldecode($val['description']); ! $switch['EVENT_TEXT'] = openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); ! } else { ! $event_start = $val['start_unixtime']; ! $event_end = (isset($val['display_end'])) ? $val['display_end'] : $val["event_end"]; ! $event_start = date($timeFormat, $val['start_unixtime']); ! $event_end = date($timeFormat, @strtotime ($event_end)); ! $switch['START_TIME'] = $event_start . ' - ' . $event_end; ! $switch['EVENT_TEXT'] = openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); ! $switch['DESCRIPTION'] = urldecode($val['description']); ! } ! if ($switch['EVENT_TEXT'] != '') { ! $switch['DAYLINK'] = $m_start; ! $temp = $loop[$i]; ! foreach ($switch as $tag => $data) { ! $temp = str_replace('{'.$tag.'}', $data, $temp); ! } ! $middle .= $temp; ! $i = ($i == 1) ? 0 : 1; } } } |