aboutsummaryrefslogtreecommitdiffstats
path: root/includes
diff options
context:
space:
mode:
authorWesley Miaw <josuah@users.sourceforge.net>2003-11-25 22:13:56 +0000
committerWesley Miaw <josuah@users.sourceforge.net>2003-11-25 22:13:56 +0000
commit4720787ca018e3d701479698f02b5a1df491c466 (patch)
tree1df8380e2edbf92942457a90997b80c14fa31e0f /includes
parent3296fc0d10a3f794541a9ff162490b6164e6a59d (diff)
downloadphpicalendar-4720787ca018e3d701479698f02b5a1df491c466.tar.gz
phpicalendar-4720787ca018e3d701479698f02b5a1df491c466.tar.bz2
phpicalendar-4720787ca018e3d701479698f02b5a1df491c466.zip
Fleshed out invalid login error response. Only checks for invalid
logins for non-HTTP authentication (even if there is no calendar map for an HTTP authenticated user). Switched some include() directives to include_once() to prevent possible future redeclaration errors.
Diffstat (limited to 'includes')
-rw-r--r--includes/event.php2
-rw-r--r--includes/login.php13
-rw-r--r--includes/todo.php4
3 files changed, 10 insertions, 9 deletions
diff --git a/includes/event.php b/includes/event.php
index ffa0308..8de5d20 100644
--- a/includes/event.php
+++ b/includes/event.php
@@ -1,6 +1,6 @@
<?php
define('BASE', '../');
-include (BASE.'functions/init.inc.php');
+include_once(BASE.'functions/init.inc.php');
function decode_popup ($item) {
$item = stripslashes(rawurldecode($item));
diff --git a/includes/login.php b/includes/login.php
index 5df5d01..f29159b 100644
--- a/includes/login.php
+++ b/includes/login.php
@@ -1,7 +1,7 @@
<?php
// Hide the login block if logged in, there are no lock usernames,
// or if authenticated via HTTP.
- if ($username == '' && $allow_login == 'yes' && !isset($_SERVER['PHP_AUTH_USER'])) {
+ if ($username == '' && $allow_login == 'yes' && !isset($_SERVER['PHP_AUTH_USER'])) {
// Set the login table width if not set.
if (!isset($login_width)) $login_width = "100%";
@@ -17,26 +17,27 @@
echo '<input type="hidden" name="'.$key.'" value="'.$HTTP_GET_VARS[$key].'">';
}
- // For Wesley
- $login_message = ($user_passed == TRUE) ? $invalid_login_lang : $login_lang;
+ // If the attempted login was invalid, change the box title.
+ $login_message = ($invalid_login == TRUE) ? "<font color=\"red\">$invalid_login_lang</font>" : '';
echo <<<END
<table cellpadding="0" cellspacing="0" border="0" width="{$login_width}" class="calborder">
<tr>
- <td align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">{$login_message}</div></td>
+ <td align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">{$login_lang}</div></td>
</tr>
<tr>
<td align="left" class="G10B">
<div style="padding: 5px;">
+ {$login_message}
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="5%">{$username_lang}:</td>
<td width="95%"><input class="login_style" type="text" size="8" name="username"></td>
</tr>
<tr>
- <td>Password:</td>
- <td><input class="login_style" type="{$password_lang}" size="8" name="password"></td>
+ <td>{$password_lang}:</td>
+ <td><input class="login_style" type="$password" size="8" name="password"></td>
</tr>
<tr>
<td>&nbsp;</td>
diff --git a/includes/todo.php b/includes/todo.php
index f09cce9..b4cefbd 100644
--- a/includes/todo.php
+++ b/includes/todo.php
@@ -1,8 +1,8 @@
<?php
define('BASE', '../');
-include (BASE.'functions/init.inc.php');
-include (BASE.'functions/date_functions.php');
+include_once(BASE.'functions/init.inc.php');
+include_once(BASE.'functions/date_functions.php');
$vtodo_array = unserialize(base64_decode($HTTP_GET_VARS['vtodo_array']));

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