| 1 | <?php |
| 2 | /** |
| 3 | * login.tpl |
| 4 | * |
| 5 | * Template to create the login page |
| 6 | * |
| 7 | * The following variables are available to this template: |
| 8 | * $logo_str - string containing HTML to display the org logo |
| 9 | * $logo_path - path to the org logo, in case you want to do |
| 10 | * something else with it. |
| 11 | * $sm_attribute_str - string containg SQM attributes. Will be empty if |
| 12 | * this has been disabled by the admin. |
| 13 | * $org_name_str - translated string containing orginization's name |
| 14 | * $org_logo_str - translated string containing orginization's logo |
| 15 | * $login_field_value - default value for the user name field |
| 16 | * $login_extra - Some extra form fields needed by SquirrelMail |
| 17 | * for the login. Template designers SHOULD ALWAYS |
| 18 | * INCLUDE this value somewhere in the form. |
| 19 | * $plugin_output - An array of extra output that may be added by |
| 20 | * plugin(s). |
| 21 | * |
| 22 | * @copyright 1999-2017 The SquirrelMail Project Team |
| 23 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
| 24 | * @version $Id$ |
| 25 | * @package squirrelmail |
| 26 | * @subpackage templates |
| 27 | */ |
| 28 | |
| 29 | |
| 30 | /* retrieve the template vars */ |
| 31 | extract($t); |
| 32 | |
| 33 | ?><body onload="squirrelmail_loginpage_onload()"> |
| 34 | <form name="login_form" id="login_form" action="redirect.php" method="post" onsubmit="document.login_form.js_autodetect_results.value=1"> |
| 35 | <?php if (!empty($plugin_output['login_top'])) echo $plugin_output['login_top']; ?> |
| 36 | <div id="sqm_login"> |
| 37 | <table cellspacing="0"> |
| 38 | <tr> |
| 39 | <td colspan="2"> |
| 40 | <?php echo getIcon($icon_theme_path, 'login1.png', '', _("The SquirrelMail logo")); ?> |
| 41 | </td> |
| 42 | </tr> |
| 43 | <tr> |
| 44 | <td class="orgName" colspan="2"> |
| 45 | <?php echo $org_name_str; ?> |
| 46 | </td> |
| 47 | </tr> |
| 48 | <tr> |
| 49 | <td class="attr" colspan="2"> |
| 50 | <?php echo nl2br($sm_attribute_str) . (empty($sm_attribute_str) ? '' : '<br /><br />'); ?> |
| 51 | </td> |
| 52 | </tr> |
| 53 | <tr> |
| 54 | <td class="orgLogo"> |
| 55 | <img src="<?php echo $logo_path; ?>" width="50" alt="<?php echo $org_logo_str; ?>" /> |
| 56 | </td> |
| 57 | <td> |
| 58 | <table cellspacing="0"> |
| 59 | <tr> |
| 60 | <td class="fieldName"> |
| 61 | <?php echo _("Name:"); ?> |
| 62 | </td> |
| 63 | <td class="fieldInput"> |
| 64 | <input type="text" name="<?php global $username_form_name; echo $username_form_name; ?>" value="<?php echo $login_field_value; ?>" id="login_username" class="input" onfocus="alreadyFocused=true;" <?php global $username_form_extra; echo $username_form_extra; ?> /> |
| 65 | </td> |
| 66 | </tr> |
| 67 | <tr> |
| 68 | <td class="fieldName"> |
| 69 | <?php echo _("Password:"); ?> |
| 70 | </td> |
| 71 | <td class="fieldInput"> |
| 72 | <input type="password" name="<?php global $password_form_name; echo $password_form_name; ?>" value="" id="secretkey" class="input" onfocus="alreadyFocused=true;" <?php global $password_form_extra; echo $password_form_extra; ?> /> |
| 73 | <?php echo $login_extra; ?> |
| 74 | </td> |
| 75 | </tr> |
| 76 | <?php if (!empty($plugin_output['login_form'])) echo $plugin_output['login_form']; ?> |
| 77 | <tr> |
| 78 | <td class="loginSubmit" colspan="2"> |
| 79 | <input type="image" src="<?php echo getIconPath($icon_theme_path, 'login_submit.png', _("Login"), _("Login")); ?>" alt="<?php echo _("Login"); ?>" /> |
| 80 | </td> |
| 81 | </tr> |
| 82 | </table> |
| 83 | </td> |
| 84 | </tr> |
| 85 | </table> |
| 86 | </div> |
| 87 | </form> |