forked from xsir317/svn_publisher
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
class UsersController extends BaseController { | ||
//用户列表 | ||
public function all() | ||
{ | ||
if(!Auth::user()->is_superadmin) | ||
{ | ||
App::abort(403, 'Unauthorized action.'); | ||
} | ||
return View::make("users/list",array("users"=>User::all())); | ||
} | ||
|
||
//添加用户 | ||
public function edit() | ||
{ | ||
|
||
} | ||
|
||
//改密码 | ||
public function changepwd() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@extends('layouts.master') | ||
@section('title') | ||
管理员列表 @parent @stop | ||
@section('sidebar') | ||
@include('sidebar', array('currpage'=>'users')) | ||
@stop | ||
|
||
@section('content') | ||
<table class="uk-table"> | ||
<caption>所有管理员 <a href="/users/add" class="uk-button uk-button-primary">添加管理员</a></caption> | ||
<thead> | ||
<tr> | ||
<th>登录名</th> | ||
<th>最后登录IP</th> | ||
<th>超级管理员</th> | ||
<th>操作</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<?php foreach($users as $row):?> | ||
<tr> | ||
<td><?php echo $row->username;?></td> | ||
<td><?php echo $row->login_ip;?></td> | ||
<td><?php echo $row->is_superadmin ? '是':'否';?></td> | ||
<td> | ||
<a href="/users/edit?id=<?php echo $row->id;?>" class="uk-button">编辑</a> | ||
</td> | ||
</tr> | ||
<?php endforeach;?> | ||
</tbody> | ||
</table> | ||
@stop |