cvs: phpweb / cal.php
| From: | Gabor Hojtsy | Date: | Fri, 15 Aug 2003 10:30:44 +0000 |
| Subject: | cvs: phpweb / cal.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-20357@lists.php.net to get a copy of this message | ||
goba Fri Aug 15 06:30:44 2003 EDT
Modified files:
/phpweb cal.php
Log:
Add category class to event links, so we will be able to color them
differently, and also drop the BC code for 12 data elements, as we
always have 13 now for all events
Index: phpweb/cal.php
diff -u phpweb/cal.php:1.44 phpweb/cal.php:1.45
--- phpweb/cal.php:1.44 Thu Aug 14 17:55:45 2003
+++ phpweb/cal.php Fri Aug 15 06:30:44 2003
@@ -1,5 +1,5 @@
<?php
-// $Id: cal.php,v 1.44 2003/08/14 21:55:45 goba Exp $
+// $Id: cal.php,v 1.45 2003/08/15 10:30:44 goba Exp $
$_SERVER['BASE_PAGE'] = 'cal.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
@@ -218,11 +218,12 @@
if (($event['type'] == 2 && $event['start'] <= $day
&& $event['end'] >= $day)
|| ($event['start'] == $day)) {
echo '<div class="event">',
- ($COUNTRY == $event['country'] ? "<b>" : ""),
- '<a
href="/cal.php',"?id=$event[id]&cm=$cm&cy=$cy",'">',
+ ($COUNTRY == $event['country'] ? "<strong>" :
""),
+ '<a class="type_' . $event['category'] . '"
href="/cal.php',
+ "?id=$event[id]&cm=$cm&cy=$cy", '">',
stripslashes(htmlentities($event['sdesc'])),
'</a>',
- ($COUNTRY == $event['country'] ? "</b>" : ""),
+ ($COUNTRY == $event['country'] ? "</strong>" :
""),
'</div>';
}
}
@@ -326,21 +327,13 @@
}
// Corrupt line in CSV file
- if (count($linearr) < 12) { return FALSE; }
+ if (count($linearr) < 13) { return FALSE; }
- 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 components
+ 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);