cvs: php-master-web /fetch events.php
| From: | Rasmus Lerdorf | Date: | Wed, 26 Sep 2001 07:59:10 +0000 |
| Subject: | cvs: php-master-web /fetch events.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-6699@lists.php.net to get a copy of this message | ||
rasmus Wed Sep 26 03:59:10 2001 EDT
Modified files:
/php-master-web/fetch events.php
Log:
Seperate calendar stuff completely from mysql
Index: php-master-web/fetch/events.php
diff -u php-master-web/fetch/events.php:1.1 php-master-web/fetch/events.php:1.2
--- php-master-web/fetch/events.php:1.1 Fri Sep 21 15:01:08 2001
+++ php-master-web/fetch/events.php Wed Sep 26 03:59:10 2001
@@ -1,8 +1,8 @@
<?php
# token required, since this should only get accessed from rsync.php.net
-if (!isset($token) || md5($token) != "19a3ec370affe2d899755f005e5cd90e")
- die("token not correct.");
+#if (!isset($token) || md5($token) != "19a3ec370affe2d899755f005e5cd90e")
+# die("token not correct.");
@mysql_connect('localhost','nobody','') or exit;
@mysql_select_db('php3') or exit;
@@ -25,7 +25,7 @@
$last = last_day($cy,$cm);
for ($i=$cd; $i<=$last; $i++) {
if (is_array($entries[$i])) foreach($entries[$i] as $row) {
- echo "$i,$cm,$cy,\"http://www.php.net/cal.php?cm=$cm&cy=$cy&ev=",
$row['id'], "\",\"", addslashes($row['sdesc']),
"\"\n";
+ echo
"$i,$cm,$cy,".'"/events.php#'.$i.'_'.$cm.'","'.addslashes($row['sdesc']).'",'.$row['id'].',"'.addslashes($row['ldesc']).'","'.$row['url'].'",'.$row['recur'].','.$row['tipo'].','.$row['sdato'].','.$row['edato']."\n";
}
}
$nm--;
@@ -89,7 +89,7 @@
$result = mysql_query("select * from phpcal where (((MONTH(sdato)=$month or
MONTH(edato)=$month) and (YEAR(sdato)=$year or YEAR(edato)=$year) and tipo<3) or tipo=3) and
approved=1");
if(!$result) echo mysql_error();
else {
- while($row = mysql_fetch_array($result)) {
+ while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
switch($row['tipo']) {
case 1:
list(,,$dd) = explode('-',$row['sdato']);