User login page...LOGIN

User login page display

Next, [PHP] implements the administrator login registration function.

After the administrator logs in, we need to see who is online and offline and be able to perform other actions on others. Modification and deletion of administrator information

First modify the code after login:

微信图片_20180307164621.png

Make login The code for the final page is as follows:

<!DOCTYPE html>
<html>
<head>
   <title>成员</title>
   <style>
   dl{
      text-align:center;
      border:2px solid #008800;
      margin-top:100px;
margin-bottom:100px;
margin-right:700px;
margin-left:700px;
   }
</style>
</head>
<body>
<dl>
<h1>成员管理</h1>
{volist name="list" id="vo"}
<dt>
   <h3>{$vo.user_id} 姓名:{$vo.user_name}{if $vo.status==1}</h3>
</dt>
{/volist}
   <form action="/public/index.php/index/login/logout" method="post">
      <p><input style="border: #008800" type="submit" value="注销"></p>
   </form>
</dl>
</body>
</html>

At this time, it jumps to a blank page. We need to query the data and output it to the page through assign

Add the members() method in application/index/controller/Login.php

<?php
public function members(){
    $view = new View();
    $list = User::all(function($query){
        $query->order('user_id','asc');
    });
    //设置变量输出
    $view->assign('list',$list);
    return $view->fetch('members');
}

The running results are as follows:

微信图片_20180307165440.png

Next Section
<?php echo "管理员登录后的页面展示";
submitReset Code
ChapterCourseware