From: <par...@us...> - 2009-07-07 14:48:37
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30611/functions Modified Files: calendar_functions.php date_functions.php event.js template.php Log Message: HTML/CSS template rewrites, nice-title integration, XSS fixes, version bump Index: calendar_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/calendar_functions.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** calendar_functions.php 22 Jun 2009 22:09:27 -0000 1.38 --- calendar_functions.php 7 Jul 2009 14:48:29 -0000 1.39 *************** *** 265,269 **** } } else { - $cal_httpPrefix_tmp = str_replace('webcal://', 'http://', $cal_tmp); if ($cal_encoded_tmp == $cal || $cal_encoded_tmp == urldecode($cal)) { $return .= "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\" selected=\"selected\">$cal_displayname_tmp</option>"; --- 265,268 ---- Index: date_functions.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** date_functions.php 19 Jun 2009 20:39:46 -0000 1.56 --- date_functions.php 7 Jul 2009 14:48:29 -0000 1.57 *************** *** 235,238 **** --- 235,240 ---- $event_text = strip_tags($event_text, '<b><i><u><img>'); } + + if (!empty($link_class)) $link_class = ' class="'.$link_class.'"'; if (!empty($event_text)) { *************** *** 255,262 **** // --></script>"; ! $return .= '<a class="'.$link_class.'" title="'.$title.'" href="#" onclick="openEventWindow('.$popup_data_index.'); return false;">'; $popup_data_index++; } else { ! $return .= '<a class="'.$link_class.'" title="'.$title.'" href="'.$res[1].'">'; } $return .= $pre_text.$event_text.$post_text.'</a>'."\n"; --- 257,264 ---- // --></script>"; ! $return .= '<a'.$link_class.' title="'.$title.'" href="#" onclick="openEventWindow('.$popup_data_index.'); return false;">'; $popup_data_index++; } else { ! $return .= '<a'.$link_class.' title="'.$title.'" href="'.$res[1].'">'; } $return .= $pre_text.$event_text.$post_text.'</a>'."\n"; Index: event.js =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/event.js,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** event.js 19 May 2007 16:18:13 -0000 1.17 --- event.js 7 Jul 2009 14:48:29 -0000 1.18 *************** *** 12,16 **** // open a new window ! var w = window.open('', 'Popup', 'scrollbars=yes,width=460,height=275'); form.target = 'Popup'; form.submit(); --- 12,16 ---- // open a new window ! var w = window.open('', 'Popup', 'scrollbars=yes,width=550,height=350'); form.target = 'Popup'; form.submit(); *************** *** 37,41 **** // open a new window ! var w = window.open('', 'Popup', 'scrollbars=yes,width=460,height=275'); form.target = 'Popup'; form.submit(); --- 37,41 ---- // open a new window ! var w = window.open('', 'Popup', 'scrollbars=yes,width=550,height=350'); form.target = 'Popup'; form.submit(); Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** template.php 17 Jun 2009 17:35:10 -0000 1.119 --- template.php 7 Jul 2009 14:48:29 -0000 1.120 *************** *** 254,258 **** function draw_week($template_p) { ! global $phpiCal_config, $start_week_time, $getdate, $cal, $master_array, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $timeFormat_small; // Figure out colspans and initialize weekarray --- 254,258 ---- function draw_week($template_p) { ! global $phpiCal_config, $start_week_time, $getdate, $cal, $master_array, $dateFormat_week_list, $current_view, $day_array, $timeFormat; // Figure out colspans and initialize weekarray *************** *** 307,310 **** --- 307,314 ---- $colspan = 0; $replace .= $loop_begin; # <td> + + if ($weekarray[$day] == $getdate) $replace = str_replace('{TODAY}', "rowToday", $replace); + $replace = str_replace('{TODAY}', "rowOff", $replace); + if(array_search($weekarray[$day], $allday_uids)){ $uid = array_search($weekarray[$day], $allday_uids); *************** *** 465,471 **** $class = ''; $dayborder = 0; ! } $drawWidth = 1; ! $weekdisplay .= '<td colspan="' . $nbrGridCols[$thisday] . '" ' . $class . '> </td>'."\n"; } else { # have events --- 469,480 ---- $class = ''; $dayborder = 0; ! } ! $tclass = $class; ! if ($thisday == $getdate) { ! if ($tclass) $tclass = ' class="weekborder weektoday"'; ! else $tclass = ' class="weektoday"'; ! } $drawWidth = 1; ! $weekdisplay .= '<td colspan="' . $nbrGridCols[$thisday] . '"' . $tclass . '> </td>'."\n"; } else { # have events *************** *** 479,483 **** case "begin": if ($ended_counter) { ! $weekdisplay .= '<td colspan="' . $ended_counter . '" '.$class.'> </td>'; $ended_counter = 0; } --- 488,497 ---- case "begin": if ($ended_counter) { ! $tclass = $class; ! if ($thisday == $getdate) { ! if ($tclass) $tclass = ' class="weekborder weektoday"'; ! else $tclass = ' class="weektoday"'; ! } ! $weekdisplay .= '<td colspan="' . $ended_counter . '"' . $tclass . '> </td>'; $ended_counter = 0; } *************** *** 485,489 **** $uid = $event_length[$thisday][$i]["key"]; $event_start = $this_time_arr[$uid]['start_unixtime']; ! $event_start = date ($timeFormat_small, $event_start); $event_calno = $this_time_arr[$uid]['calnumber']; $event_status = strtolower($this_time_arr[$uid]['status']); --- 499,503 ---- $uid = $event_length[$thisday][$i]["key"]; $event_start = $this_time_arr[$uid]['start_unixtime']; ! $event_start = date ($timeFormat, $event_start); $event_calno = $this_time_arr[$uid]['calnumber']; $event_status = strtolower($this_time_arr[$uid]['status']); *************** *** 511,515 **** case "started": if ($ended_counter) { ! $weekdisplay .= '<td colspan="' . $ended_counter . '" '.$class.'> </td>'; $ended_counter = 0; } --- 525,534 ---- case "started": if ($ended_counter) { ! $tclass = $class; ! if ($thisday == $getdate) { ! if ($tclass) $tclass = ' class="weekborder weektoday"'; ! else $tclass = ' class="weektoday"'; ! } ! $weekdisplay .= '<td colspan="' . $ended_counter . '"' . $tclass . '> </td>'; $ended_counter = 0; } *************** *** 529,533 **** //fill empty space on the right if ($emptyWidth > 0) { ! $weekdisplay .= "<td colspan=\"" . $emptyWidth . "\" $class> </td>\n"; } while (isset($event_length[$thisday][(sizeof($event_length[$thisday]) - 1)]["state"]) && $event_length[$thisday][(sizeof($event_length[$thisday]) - 1)]["state"] == "ended") { --- 548,557 ---- //fill empty space on the right if ($emptyWidth > 0) { ! $tclass = $class; ! if ($thisday == $getdate) { ! if ($tclass) $tclass = ' class="weekborder weektoday"'; ! else $tclass = ' class="weektoday"'; ! } ! $weekdisplay .= "<td colspan=\"" . $emptyWidth . "\"$tclass> </td>\n"; } while (isset($event_length[$thisday][(sizeof($event_length[$thisday]) - 1)]["state"]) && $event_length[$thisday][(sizeof($event_length[$thisday]) - 1)]["state"] == "ended") { *************** *** 982,986 **** if ($type == 'large') { $switch['EVENT'] .= '<div class="V9"><img src="templates/'.$phpiCal_config->template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />'; ! $switch['EVENT'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 10, 'ps3', "$start2 ").''; $switch['EVENT'] .= (isset($val['location']) && $val['location'] != '' && $phpiCal_config->month_locations == 'yes') ? "<br />".$val['location']."<br />" : ''; $switch['EVENT'] .= '</div>'; --- 1006,1010 ---- if ($type == 'large') { $switch['EVENT'] .= '<div class="V9"><img src="templates/'.$phpiCal_config->template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />'; ! $switch['EVENT'] .= openevent($daylink, $cal_time, $uid, $val, $phpiCal_config->month_event_lines, 10, 'ps3', "<span style=\"font-weight: bold;\">$start2</span> "); $switch['EVENT'] .= (isset($val['location']) && $val['location'] != '' && $phpiCal_config->month_locations == 'yes') ? "<br />".$val['location']."<br />" : ''; $switch['EVENT'] .= '</div>'; *************** *** 1034,1038 **** function monthbottom() { ! global $phpiCal_config, $getdate, $master_array, $this_year, $this_month, $cal, $timeFormat, $timeFormat_small, $dateFormat_week_list, $lang; preg_match("!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_odd off -->!Uis", $this->page, $match1); preg_match("!<\!-- loop showbottomevents_even on -->(.*)<\!-- loop showbottomevents_even off -->!Uis", $this->page, $match2); --- 1058,1062 ---- function monthbottom() { ! global $phpiCal_config, $getdate, $master_array, $this_year, $this_month, $cal, $timeFormat, $dateFormat_week_list, $lang; preg_match("!<\!-- loop showbottomevents_odd on -->(.*)<\!-- loop showbottomevents_odd off -->!Uis", $this->page, $match1); preg_match("!<\!-- loop showbottomevents_even on -->(.*)<\!-- loop showbottomevents_even off -->!Uis", $this->page, $match2); |