cvs: phpweb / cal.php /include layout.inc

From: Date: Sun, 01 Jun 2003 15:52:37 +0000
Subject: cvs: phpweb / cal.php /include layout.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-18332@lists.php.net to get a copy of this message
rasmus Sun Jun 1 11:52:37 2003 EDT Modified files: /phpweb cal.php /phpweb/include layout.inc Log: More work on the event categorization Index: phpweb/cal.php diff -u phpweb/cal.php:1.39 phpweb/cal.php:1.40 --- phpweb/cal.php:1.39 Mon May 12 07:48:36 2003 +++ phpweb/cal.php Sun Jun 1 11:52:37 2003 @@ -326,12 +326,20 @@ // Corrupt line in CSV file if (count($linearr) < 12) { return FALSE; } - - // Put the array elements into variables - list( - $day, $month, $year, $country, - $sdesc, $id, $ldesc, $url, $recur, $tipo, $sdato, $edato - ) = $linearr; + + if(count($linearr==12) { + // Put the array elements into variables + list( + $day, $month, $year, $country, + $sdesc, $id, $ldesc, $url, $recur, $tipo, $sdato, $edato + ) = $linearr; + $category = 0; + } elseif(count($linearr==13) { + list( + $day, $month, $year, $country, + $sdesc, $id, $ldesc, $url, $recur, $tipo, $sdato, $edato, $category + ) = $linearr; + } // Get info on recurring event @list($recur, $recur_day) = explode(":", $recur, 2); @@ -348,6 +356,7 @@ 'url' => $url, 'ldesc' => base64_decode($ldesc), 'country' => $country, + 'category' => $category, ); } Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.161 phpweb/include/layout.inc:1.162 --- phpweb/include/layout.inc:1.161 Sat May 24 07:10:51 2003 +++ phpweb/include/layout.inc Sun Jun 1 11:52:37 2003 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.161 2003/05/24 11:10:51 goba Exp $ */ +/* $Id: layout.inc,v 1.162 2003/06/01 15:52:37 rasmus Exp $ */ $www_static_root = ($HTTP_SERVER_VARS['SERVER_NAME'] == 'www.php.net') ? 'http://static.php.net/www.php.net' : ''; @@ -505,7 +505,13 @@ $days[$event['recur_day']], " of the month)"; break; } - + + // Event category + if(isset($event['category']) && $event['category']) { + $cat = array("unknown", "User Group Event", "Conference", "Training"); + echo ' [' . $cat[$event['category']] . '] '; + } + // Print out country information echo ' (' , $COUNTRIES[$event['country']] , ')'; ?>

« previous php.mirrors (#18332) next »