From 217454e76e29f9161e2cd49181b67097341755c2 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sun, 28 Dec 2008 20:13:01 +0000 Subject: remove admin.tpl from alternative template folders --- functions/date_functions.php | 8 +-- includes/event.php | 10 ++-- templates/green/admin.tpl | 132 ------------------------------------------- templates/grey/admin.tpl | 132 ------------------------------------------- templates/red/admin.tpl | 132 ------------------------------------------- templates/tan/admin.tpl | 132 ------------------------------------------- 6 files changed, 9 insertions(+), 537 deletions(-) delete mode 100644 templates/green/admin.tpl delete mode 100644 templates/grey/admin.tpl delete mode 100644 templates/red/admin.tpl delete mode 100644 templates/tan/admin.tpl diff --git a/functions/date_functions.php b/functions/date_functions.php index fa8cdd9..ec70fa6 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -166,10 +166,10 @@ function openevent($event_date, $time, $uid, $arr, $lines = 0, $length = 0, $lin # for iCal pseudo tag comptability if (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) { $full_event_text = $matches[1] . $matches[2]; - $event_text = $matches[2]; + $event_text = $matches[2]; } else { $full_event_text = $event_text; - $event_text = strip_tags($event_text, ''); + $event_text = strip_tags($event_text, ''); } if (!empty($event_text)) { @@ -180,8 +180,8 @@ function openevent($event_date, $time, $uid, $arr, $lines = 0, $length = 0, $lin if ((!(ereg("([[:alpha:]]+://[^<>[:space:]]+)", $full_event_text, $res))) || ($arr['description'])) { $escaped_date = addslashes($event_date); $escaped_time = addslashes($time); - $escaped_uid = addslashes($uid); - $event_data = addslashes(serialize ($master_array[$event_date][$time][$uid])); + $escaped_uid = addslashes($uid); + $event_data = addslashes(serialize ($master_array[$event_date][$time][$uid])); // fix for URL-length bug in IE: populate and submit a hidden form on click static $popup_data_index = 0; $return = " diff --git a/includes/event.php b/includes/event.php index a198469..8d57ae9 100644 --- a/includes/event.php +++ b/includes/event.php @@ -7,7 +7,7 @@ require_once(BASE.'functions/template.php'); # information for the popup is sent via $_POST by a javascript snippet in # in function openevent() from functions/date_functions.php # character encoding has been problematic with popups. -$event = unserialize($_POST['event_data']); +$event = unserialize(stripslashes($_POST['event_data'])); $organizer = unserialize($event['organizer']); $attendee = unserialize($event['attendee']); @@ -19,11 +19,11 @@ if ($_POST['time'] == -1) { $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . date($timeFormat, $event['end_unixtime']); } -$event['event_text'] = stripslashes(urldecode($event['event_text'])); -$event['description'] = stripslashes(urldecode($event['description'])); -$event['location'] = stripslashes(urldecode($event['location'])); +$event['event_text'] = urldecode($event['event_text']); +$event['description'] = urldecode($event['description']); +$event['location'] = urldecode($event['location']); $display =''; -if ($event['description']) $event['description'] = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$event['description']); +if (isset($event['description'])) $event['description'] = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'\0',$event['description']); if (isset($organizer) && is_array($organizer)) { $i=0; diff --git a/templates/green/admin.tpl b/templates/green/admin.tpl deleted file mode 100644 index b83860b..0000000 --- a/templates/green/admin.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{HEADER} -
- - - - - - - - - - - - - -
- - - - - -

{L_ADMIN_HEADER}

{L_ADMIN_SUBHEAD}
-
- - {L_LOGOUT}  - -
- - - - - -
- - {L_INVALID_LOGIN}

- - - -
- - - - - - - - - - - - - - -
{L_USERNAME}:
{L_PASSWORD}:
 
-
- - - - - {L_ADDUPDATE_CAL}
- {L_ADDUPDATE_DESC}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{L_CAL_FILE} 1:
{L_CAL_FILE} 2:
{L_CAL_FILE} 3:
{L_CAL_FILE} 4:
{L_CAL_FILE} 5:
 
{ADDUPDATE_MSG}  
-
- - {L_DELETE_CAL} -
- - {DELETE_TABLE} -
- -

-

{DELETE_MSG}  

-
- - -
-
- - - - - - -
-{FOOTER} - - diff --git a/templates/grey/admin.tpl b/templates/grey/admin.tpl deleted file mode 100644 index b83860b..0000000 --- a/templates/grey/admin.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{HEADER} -
- - - - - - - - - - - - - -
- - - - - -

{L_ADMIN_HEADER}

{L_ADMIN_SUBHEAD}
-
- - {L_LOGOUT}  - -
- - - - - -
- - {L_INVALID_LOGIN}

- - - -
- - - - - - - - - - - - - - -
{L_USERNAME}:
{L_PASSWORD}:
 
-
- - - - - {L_ADDUPDATE_CAL}
- {L_ADDUPDATE_DESC}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{L_CAL_FILE} 1:
{L_CAL_FILE} 2:
{L_CAL_FILE} 3:
{L_CAL_FILE} 4:
{L_CAL_FILE} 5:
 
{ADDUPDATE_MSG}  
-
- - {L_DELETE_CAL} -
- - {DELETE_TABLE} -
- -

-

{DELETE_MSG}  

-
- - -
-
- - - - - - -
-{FOOTER} - - diff --git a/templates/red/admin.tpl b/templates/red/admin.tpl deleted file mode 100644 index b83860b..0000000 --- a/templates/red/admin.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{HEADER} -
- - - - - - - - - - - - - -
- - - - - -

{L_ADMIN_HEADER}

{L_ADMIN_SUBHEAD}
-
- - {L_LOGOUT}  - -
- - - - - -
- - {L_INVALID_LOGIN}

- - - -
- - - - - - - - - - - - - - -
{L_USERNAME}:
{L_PASSWORD}:
 
-
- - - - - {L_ADDUPDATE_CAL}
- {L_ADDUPDATE_DESC}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{L_CAL_FILE} 1:
{L_CAL_FILE} 2:
{L_CAL_FILE} 3:
{L_CAL_FILE} 4:
{L_CAL_FILE} 5:
 
{ADDUPDATE_MSG}  
-
- - {L_DELETE_CAL} -
- - {DELETE_TABLE} -
- -

-

{DELETE_MSG}  

-
- - -
-
- - - - - - -
-{FOOTER} - - diff --git a/templates/tan/admin.tpl b/templates/tan/admin.tpl deleted file mode 100644 index b83860b..0000000 --- a/templates/tan/admin.tpl +++ /dev/null @@ -1,132 +0,0 @@ -{HEADER} -
- - - - - - - - - - - - - -
- - - - - -

{L_ADMIN_HEADER}

{L_ADMIN_SUBHEAD}
-
- - {L_LOGOUT}  - -
- - - - - -
- - {L_INVALID_LOGIN}

- - - -
- - - - - - - - - - - - - - -
{L_USERNAME}:
{L_PASSWORD}:
 
-
- - - - - {L_ADDUPDATE_CAL}
- {L_ADDUPDATE_DESC}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{L_CAL_FILE} 1:
{L_CAL_FILE} 2:
{L_CAL_FILE} 3:
{L_CAL_FILE} 4:
{L_CAL_FILE} 5:
 
{ADDUPDATE_MSG}  
-
- - {L_DELETE_CAL} -
- - {DELETE_TABLE} -
- -

-

{DELETE_MSG}  

-
- - -
-
- - - - - - -
-{FOOTER} - - -- cgit v1.2.3