11)登录功能简单介绍
思路展示:
目录展示:
代码展示:
AdminC.controller.class.php
1 <?php 2 /** 3 * Created by PhpStorm. 4 * User: Interact 5 * Date: 2017/8/20 6 * Time: 14:22 7 */ 8 class AdminC extends Controller{ 9 public function login(){ 10 // require 11 require APPLICATION_PATH.'back/view/login.html'; 12 } 13 }
login.html
1 <html xmlns="http://www.w3.org/1999/xhtml"><head> 2 <title>ECSHOP 管理中心</title> 3 <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> 4 <link type="text/css" rel="stylesheet" href="web/back/styles/general.css"> 5 <link type="text/css" rel="stylesheet" href="web/back/styles/main.css"> 6 7 <style type="text/css"> 8 body { 9 color: white; 10 } 11 </style> 12 </head> 13 <body style="background: #278296"> 14 <form onsubmit="" name="theForm" action="index.php?p=back&c=Admin&a=check" method="post"> 15 <table cellspacing="0" cellpadding="0" align="center" style="margin-top: 100px"> 16 <tbody><tr> 17 <td><img border="0" width="178" height="256" alt="ECSHOP" src="web/back/images/login.png"></td> 18 <td style="padding-left: 50px"> 19 <table> 20 <tbody><tr> 21 <td>管理员姓名:</td> 22 <td><input type="text" name="username"></td> 23 </tr> 24 <tr> 25 <td>管理员密码:</td> 26 <td><input type="password" name="password"></td> 27 </tr> 28 <!-- 29 <tr> 30 <td>验证码:</td> 31 <td><input type="text" class="capital" name="captcha"></td> 32 </tr> 33 <tr> 34 <td align="right" colspan="2"><img border="1" width="145" height="20" title="看不清?点击更换另一个验证码。" style="cursor: pointer;" onclick="this.src="index.php?act=captcha&"+Math.random()" alt="CAPTCHA" src="index.php?act=captcha&1533540459"> 35 </td> 36 </tr> 37 --> 38 <tr><td colspan="2"><input type="checkbox" id="remember" name="remember" value="1"><label for="remember">请保存我这次的登录信息。</label></td></tr> 39 <tr><td> </td><td><input type="submit" class="button" value="进入管理中心"></td></tr> 40 <tr> 41 <td align="right" colspan="2">» <a style="color:white" href="index.php?p=front">返回首页</a> » <a style="color:white" href="index.php?p=back&c=Admin&a=forget_pwd">您忘记了密码吗?</a></td> 42 </tr> 43 </tbody></table> 44 </td> 45 </tr> 46 </tbody></table> 47 </form> 48 </body></html>
结果页面展示: