From: <cl...@us...> - 2003-11-20 05:19:21
|
Update of /cvsroot/phpicalendar/phpicalendar/includes In directory sc8-pr-cvs1:/tmp/cvs-serv32703/includes Modified Files: event.php header.inc.php sidebar.php Log Message: Added URL support to popup, re-wrote event.php for less code. Index: event.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/event.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** event.php 19 Nov 2003 07:54:09 -0000 1.12 --- event.php 20 Nov 2003 05:18:38 -0000 1.13 *************** *** 3,76 **** include (BASE.'functions/init.inc.php'); ! // Load vars ! if (isset($HTTP_POST_VARS['event']) && ($HTTP_POST_VARS['event'] !== '') ) { ! $event=$HTTP_POST_VARS['event']; ! } else { ! $event=''; ! } ! if (isset($HTTP_POST_VARS['description']) && ($HTTP_POST_VARS['description'] !== '') ) { ! $description=$HTTP_POST_VARS['description']; ! } else { ! $description=''; ! } ! if (isset($HTTP_POST_VARS['cal']) && ($HTTP_POST_VARS['cal'] !== '') ) { ! $calendar_name=$HTTP_POST_VARS['cal']; ! } else { ! $calendar_name=''; ! } ! if (isset($HTTP_POST_VARS['start']) && ($HTTP_POST_VARS['start'] !== '') ) { ! $start=$HTTP_POST_VARS['start']; ! } else { ! $start=''; ! } ! if (isset($HTTP_POST_VARS['end']) && ($HTTP_POST_VARS['end'] !== '') ) { ! $end=$HTTP_POST_VARS['end']; ! } else { ! $end=''; ! } ! if (isset($HTTP_POST_VARS['status']) && ($HTTP_POST_VARS['status'] !== '') ) { ! $status=$HTTP_POST_VARS['status']; ! } else { ! $status=''; ! } ! if (isset($HTTP_POST_VARS['location']) && ($HTTP_POST_VARS['location'] !== '') ) { ! $location=$HTTP_POST_VARS['location']; ! } else { ! $location=''; ! } ! if (isset($HTTP_POST_VARS['organizer']) && ($HTTP_POST_VARS['organizer'] !== '') ) { ! $organizer=$HTTP_POST_VARS['organizer']; ! } else { ! $organizer=''; ! } ! if (isset($HTTP_POST_VARS['attendee']) && ($HTTP_POST_VARS['attendee'] !== '') ) { ! $attendee=$HTTP_POST_VARS['attendee']; ! } else { ! $attendee=''; } ! // Prep vars for HTML display ! $event=stripslashes(rawurldecode($event)); ! $event=str_replace('\\','',$event); ! $description=stripslashes(rawurldecode($description)); ! $description=str_replace('\\','',$description); ! $organizer=stripslashes(rawurldecode($organizer)); ! $organizer=str_replace('\\','',$organizer); ! $organizer=unserialize($organizer); ! $attendee=str_replace('\\','',$attendee); ! $attendee=unserialize ($attendee); ! $location=stripslashes(rawurldecode($location)); ! $location=str_replace('\\','',$location); ! $calendar_name=stripslashes(rawurldecode($calendar_name)); ! $calendar_name=str_replace('\\','',$calendar_name); ! ! // Format calendar title ! if ($calendar_name == $ALL_CALENDARS_COMBINED) { ! $cal_title=$all_cal_comb_lang; ! $cal_title_full=$all_cal_comb_lang; ! } else { ! $cal_title=$calendar_name; ! $cal_title_full=$calendar_name . ' ' . $calendar_lang; ! } // Format event time --- 3,25 ---- include (BASE.'functions/init.inc.php'); ! function decode_popup ($item) { ! $item = stripslashes(rawurldecode($item)); ! $item = str_replace('\\','',$item); ! return $item; } ! $event = (isset($_REQUEST['event'])) ? decode_popup($_REQUEST['event']) : ('unset'); ! $description = (isset($_REQUEST['description'])) ? decode_popup($_REQUEST['description']) : ('unset'); ! $cal = (isset($_REQUEST['cal'])) ? decode_popup($_REQUEST['cal']) : ('unset'); ! $start = (isset($_REQUEST['start'])) ? decode_popup($_REQUEST['start']) : ('unset'); ! $end = (isset($_REQUEST['end'])) ? decode_popup($_REQUEST['end']) : ('unset'); ! $status = (isset($_REQUEST['status'])) ? decode_popup($_REQUEST['status']) : ('unset'); ! $location = (isset($_REQUEST['location'])) ? decode_popup($_REQUEST['location']) : ('unset'); ! $url = (isset($_REQUEST['url'])) ? decode_popup($_REQUEST['url']) : ('unset'); ! $organizer = (isset($_REQUEST['organizer'])) ? ($_REQUEST['organizer']) : ('unset'); ! $organizer = unserialize (decode_popup ($organizer)); ! $attendee = (isset($_REQUEST['attendee'])) ? ($_REQUEST['attendee']) : ('unset'); ! $attendee = unserialize (decode_popup ($attendee)); ! $cal_title_full = $cal.' '.$calendar_lang; // Format event time *************** *** 130,133 **** --- 79,83 ---- } if ($location) { + if (isset($url)) $location = '<a href="'.$url.'" target="_blank">'.$location.'</a>'; $display.="<!-- Location -->\n"; $display.='<tr>' . "\n"; *************** *** 143,147 **** <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php echo $cal_title; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> </head> --- 93,97 ---- <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> ! <title><?php echo $cal; ?></title> <link rel="stylesheet" type="text/css" href="<?php echo BASE."styles/$style_sheet/default.css"; ?>"> </head> *************** *** 171,174 **** --- 121,129 ---- </tr> <?php echo $display; ?> + + </tr> + <tr> + <td colspan="3"><img src="../images/spacer.gif" width="1" height="6" alt=" "></td> + </tr> </table> </td> Index: header.inc.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/header.inc.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** header.inc.php 19 Nov 2003 07:54:09 -0000 1.6 --- header.inc.php 20 Nov 2003 05:18:38 -0000 1.7 *************** *** 28,30 **** --- 28,31 ---- <input type="hidden" name="organizer" id="organizer" value=""> <input type="hidden" name="attendee" id="attendee" value=""> + <input type="hidden" name="url" id="url" value=""> </form> Index: sidebar.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/includes/sidebar.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** sidebar.php 19 Nov 2003 07:54:09 -0000 1.26 --- sidebar.php 20 Nov 2003 05:18:38 -0000 1.27 *************** *** 99,109 **** $event_text = strip_tags($event_text, '<b><i><u>'); if ($event_text != "") { ! $event_text2 = rawurlencode(addslashes($val["event_text"])); ! $description = addslashes(urlencode($val["description"])); $event_start = @$val["event_start"]; $event_end = @$val["event_end"]; $event_calna = @$val["calname"]; ! $event_start = date ($timeFormat, @strtotime ("$event_start")); ! $event_end = date ($timeFormat, @strtotime ("$event_end")); $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); --- 99,110 ---- $event_text = strip_tags($event_text, '<b><i><u>'); if ($event_text != "") { ! $event_text2 = rawurlencode(addslashes($val['event_text'])); ! $description = addslashes(urlencode($val['description'])); $event_start = @$val["event_start"]; $event_end = @$val["event_end"]; $event_calna = @$val["calname"]; ! $event_url = @$val["url"]; ! $event_start = date ($timeFormat, @strtotime ($event_start)); ! $event_end = date ($timeFormat, @strtotime ($event_end)); $event_text = word_wrap($event_text, 21, $tomorrows_events_lines); *************** *** 111,120 **** $event_start = $all_day_lang; $event_end = ''; ! openevent($event_calna, $event_start, ! $event_end, $val, $tomorrows_events_lines, 21, '<i>', '</i>', 'psf'); echo "<br>\n"; } else { ! openevent($event_calna, $event_start, ! $event_end, $val, $tomorrows_events_lines, 21, '<font class="G10B">• ', '</font>', 'psf'); echo "<br>\n"; } --- 112,119 ---- $event_start = $all_day_lang; $event_end = ''; ! openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '<i>', '</i>', 'psf', $event_url); echo "<br>\n"; } else { ! openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '<font class="G10B">• ', '</font>', 'psf', $event_url); echo "<br>\n"; } |