import mtweb.0.4.1
[mtweb] / web / out / dist / views / login.php
1 <div id="login_box">
2 <?php if(!($user = $this->user())) : ?>
3 <form id="login_form"
4       action="<?= $this->url("users/identification/login") ?>"
5       method="post">
6   <div>
7     <input type="hidden" name="pass" value="" />
8     <input type="hidden" name="from" value="<?= isset($_POST["from"]) ? $_POST["from"] : urlencode($_SERVER["REQUEST_URI"]) ?>" />
9   </div>
10   <table>
11     <tr>
12       <th>login</th>
13       <td><input type="text" name="login" size="14" maxlength="25" /></td>
14     </tr>
15     <tr>
16       <th>pass</th>
17       <td><input type="password" name="password" size="14" maxlength="16" /></td>
18     </tr>
19     <tr>
20       <td colspan="2" align="right"><input type="submit" value="Login" onclick="prepare_password('<?= $_SESSION["id"]?>')" /></td>
21     </tr>
22   </table>
23   <div class="clear"><!-- --></div>
24 </form>
25
26 <?php else : ?>
27   Bienvenue <b><?= $user["login"] ?></b>
28   <ul>
29     <li><a href="<?= $this->url("users/compte") ?>">compte</a></li>
30     <li><a href="<?= $this->url("users/identification/logout") ?>">deconnexion</a></li>
31 <?php if($this->status_ok("admin")) : ?>
32     <li><a href="<?= $this->url("admin") ?>">admin</a></li>
33 <?php endif; ?>
34   </ul>
35 <?php endif; ?>
36 <div class="clear"><!-- --></div>
37 </div>