aboutsummaryrefslogtreecommitdiffstats
path: root/includes/calendar_nav.php
diff options
context:
space:
mode:
authorWesley Miaw <josuah@users.sourceforge.net>2003-11-22 21:16:10 +0000
committerWesley Miaw <josuah@users.sourceforge.net>2003-11-22 21:16:10 +0000
commit3b3487be53650bb9b39d9ed8c7afd1c04b943b60 (patch)
treec0ab013a59cebcbdbc024a99b8050b54b4d4fce8 /includes/calendar_nav.php
parent3fa43afd25ab763d3540fc5ddaa4c164b2af33c1 (diff)
downloadphpicalendar-3b3487be53650bb9b39d9ed8c7afd1c04b943b60.tar.gz
phpicalendar-3b3487be53650bb9b39d9ed8c7afd1c04b943b60.tar.bz2
phpicalendar-3b3487be53650bb9b39d9ed8c7afd1c04b943b60.zip
Added username/password login to access locked calendars. Moved
calendar availability logic (with support for login) to a calendar_functions.php file. RSS feeds support the login feature when determining which calendars to return. Styles updated for the login box.
Diffstat (limited to 'includes/calendar_nav.php')
-rw-r--r--includes/calendar_nav.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/calendar_nav.php b/includes/calendar_nav.php
index 4cd4bcc..b08d50a 100644
--- a/includes/calendar_nav.php
+++ b/includes/calendar_nav.php
@@ -20,6 +20,10 @@
$fake_getdate_time = strtotime($this_year.'-'.$this_month.'-15');
?>
<br>
+<?php
+ $login_width = 737;
+ include(BASE.'includes/login.php');
+?>
<table border="0" width="737" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="calborder">
<tr>
<td align="left" valign="top" width="1%" class="sideback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&amp;getdate=$prev_day\"><img src=\"styles/$style_sheet/left_arrows.gif\" alt=\"[$last_day_lang]\" border=\"0\" align=\"left\"></a>"; ?></td>
@@ -146,6 +150,12 @@
echo "<a class=\"psf\" href=\"print.php?cal=$cal&amp;getdate=$getdate&amp;printview=$current_view\">$goprint_lang</a><br>\n";
if ($allow_preferences != 'no') echo "<a class=\"psf\" href=\"preferences.php?cal=$cal&amp;getdate=$getdate\">$preferences_lang</a><br>\n";
if ($cal != $ALL_CALENDARS_COMBINED && $subscribe_path != '' && $download_filename != '') echo "<a class=\"psf\" href=\"$subscribe_path\">$subscribe_lang</a>&nbsp;|&nbsp;<a class=\"psf\" href=\"$download_filename\">$download_lang</a>\n";
+ if (isset($username)) {
+ $querys = preg_replace("/action=[^&]+/", "action=logout", $QUERY_STRING);
+ if ($querys == $QUERY_STRING) $querys .= '&action=logout";
+ $querys = preg_replace("/(username|password)=[^&]+/", "", $querys);
+ echo "<a class=\"psf\" href=\"$SCRIPT_NAME?$querys\">Logout $username</a><br>\n";
+ }
?>
</td>
</tr>

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