亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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');
    });
    //設(shè)置變量輸出
    $view->assign('list',$list);
    return $view->fetch('members');
}

The running results are as follows:

微信圖片_20180307165440.png

Continuing Learning
||
<?php echo "管理員登錄后的頁面展示";
submitReset Code