aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2002-10-06 19:51:02 +0000
committerChad Little <clittle@users.sourceforge.net>2002-10-06 19:51:02 +0000
commit89d24274b2c0810d5e595b499983cb7664c70b88 (patch)
tree901e883facd7c472985a8e1d6366b2aa2428a56c /functions
parentb2612dce88e25a1381f4b48a1157a731bdd4fa32 (diff)
downloadphpicalendar-89d24274b2c0810d5e595b499983cb7664c70b88.tar.gz
phpicalendar-89d24274b2c0810d5e595b499983cb7664c70b88.tar.bz2
phpicalendar-89d24274b2c0810d5e595b499983cb7664c70b88.zip
Month tweeks, added multiple line support (again) to parser. Broke the error stuff.
Diffstat (limited to 'functions')
-rw-r--r--functions/error.php4
-rw-r--r--functions/ical_parser.php25
2 files changed, 9 insertions, 20 deletions
diff --git a/functions/error.php b/functions/error.php
index 310d3c7..8a59e86 100644
--- a/functions/error.php
+++ b/functions/error.php
@@ -40,7 +40,6 @@ function error($error_msg='There was an error processing the request.', $file='N
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="G10B">
<tr>
- <td height="300"><img height="300" width="1" src="images/spacer.gif"></td>
<td align="center" valign="top">
<br>
<?php echo $error_msg; ?>
@@ -50,8 +49,9 @@ function error($error_msg='There was an error processing the request.', $file='N
<br>
<br>
<?php echo $error_back_lang; ?>
+ <br>
+ <br>
</td>
- <td height="300"><img height="300" width="1" src="images/spacer.gif"></td>
</tr>
</table>
</td>
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index 929392e..8ac7d9b 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -55,16 +55,18 @@ if ($is_webcal == false && $save_parsed_cals == 'yes') {
}
}
-// Start the session
-//session_start();
-//if (($aYear != $this_year) || ($use_sessions != 'yes') || (!is_array($aArray))) {
-//echo 'not using sessions';
if ($parse_file) {
// open the iCal file, read it into a string
+// Then turn it into an array after we pull every wrapped line up a level.
+// Error thingy doens't seem to work now though.
$contents = @file($filename);
-if ($contents[0] != 'BEGIN:VCALENDAR'."\n") exit(error($error_invalidcal_lang, $filename));
+$contents = implode("", $contents);
+$contents = ereg_replace("\n ", "", $contents);
+$contents = split ("\n", $contents);
+// if ($contents[0] != 'BEGIN:VCALENDAR'."\n") exit(error($error_invalidcal_lang, $filename));
+// echo "$contents[0]";
// Set a value so we can check to make sure $master_array contains valid data
$master_array['-1'] = 'valid cal file';
@@ -676,19 +678,6 @@ if (isset($master_array) && is_array($master_array) && $save_parsed_cals == 'yes
// this bracket is the end of the if ($parse_file) statment
}
-// Store information in the session
-/*if ($use_sessions == 'yes') {
- session_start();
- session_register( 'aArray', 'aYear', 'aLanguage', 'aCalendar' );
- $aArray = $master_array;
- $aYear = $this_year;
- $aLanguage = $language;
- $aCalendar = $cal;
-}*/
-
-
-// End the session
-//}
//If you want to see the values in the arrays, uncomment below.
//print '<pre>';

© 2014-2024 Faster IT GmbH | imprint | privacy policy