diff options
author | Chad Little <clittle@users.sourceforge.net> | 2003-11-23 19:53:29 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2003-11-23 19:53:29 +0000 |
commit | ac6acd28d66a04e4381871c962b1f41ba07de6d4 (patch) | |
tree | a9f3e2d3d5cfae70cc7a2a7c8c2908f789726963 /includes | |
parent | 2e9a3d7349254ddf81e060812b8defe282901610 (diff) | |
download | phpicalendar-ac6acd28d66a04e4381871c962b1f41ba07de6d4.tar.gz phpicalendar-ac6acd28d66a04e4381871c962b1f41ba07de6d4.tar.bz2 phpicalendar-ac6acd28d66a04e4381871c962b1f41ba07de6d4.zip |
Tightened up login.php with less html, removed unneeded things from
config and list_icals.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/login.php | 68 |
1 files changed, 28 insertions, 40 deletions
diff --git a/includes/login.php b/includes/login.php index 81854cb..43cf105 100644 --- a/includes/login.php +++ b/includes/login.php @@ -1,65 +1,53 @@ <?php // Hide the login block if logged in or there are no lock usernames. - if (!isset($username) && $allow_login == 'yes') { + if (!isset($username) && $show_login == 'yes') { // Set the login table width if not set. if (!isset($login_width)) $login_width = "100%"; // Remove the username, password, and action values from the form action. $form_action = preg_replace("/(username|password|action)=[^&]+/", "", $REQUEST_URI); -?> - <form style="margin-bottom:0;" action="<?php echo $form_action; ?>" method="POST"> - <input type="hidden" name="action" value="login"> - <?php + + echo '<form style="margin-bottom:0;" action="'.$form_action.'" method="POST">'; + echo '<input type="hidden" name="action" value="login">'; foreach (array_keys($HTTP_GET_VARS) as $key) { - if ($key == 'action' || - $key == 'username' || - $key == 'password') - { + if ($key == 'action' || $key == 'username' || $key == 'password') { continue; } - echo "<input type=\"hidden\" name=\"$key\" value=\"$HTTP_GET_VARS[$key]\">\n"; + echo '<input type="hidden" name="'.$key.'" value="'.$HTTP_GET_VARS[$key].'">'; } - ?> - <table cellpadding="0" cellspacing="0" border="0" width="<?php echo $login_width; ?>" class="calborder"> + +echo <<<END + + <table cellpadding="0" cellspacing="0" border="0" width="{$login_width}" class="calborder"> <tr> - <td bgcolor="#FFFFFF" valign="middle" align="center"> - <table cellpadding="0" cellspacing="0" border="0" width="<?php echo $login_width; ?>"> - <tr> - <td align="left" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> - <td colspan="3" align="center" width="98%" class="sideback"><font class="G10BOLD">Login</font></td> - <td align="right" valign="top" width="1%" class="sideback"><img src="images/spacer.gif" width="1" height="20" alt=" "></td> - </tr> - <tr> - <td colspan="5"><img src="images/spacer.gif" width="148" height="6" alt=" "></td> - </tr> + <td align="center" class="sideback"><div style="height: 17px; margin-top: 3px;" class="G10BOLD">Login</div></td> + </tr> + <tr> + <td align="left" class="G10B"> + <div style="padding: 5px;"> + <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> - <td width="48%" align="right"><font class="G10B">Username:</font></td> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> - <td width="48%" align="left"><input class="login_style" type="text" size="8" name="username"></td> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> + <td>Username:</td> + <td><input class="login_style" type="text" size="8" name="username"></td> </tr> <tr> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> - <td width="48%" align="right"><font class="G10B">Password:</font></td> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> - <td width="48%" align="left"><input class="login_style" type="password" size="8" name="password"></td> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> + <td>Password:</td> + <td><input class="login_style" type="password" size="8" name="password"></td> </tr> <tr> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> - <td colspan="3" align="center"><input class="login_style" type="submit" value="Login"></td> - <td width="1%"><img src="images/spacer.gif" width="4" height="1" alt=""></td> + <td> </td> + <td><input class="login_style" type="submit" value="Login"></td> </tr> </table> + </div> </td> </tr> - <tr> - <td bgcolor="#FFFFFF"><img src="images/spacer.gif" width="148" height="6" alt=" "></td> - </tr> </table> </form> <img src="images/spacer.gif" width="1" height="10" alt=" "><br> -<?php - } + +END; + +} + ?> |