disabled deleting admin account at manage page

This commit is contained in:
printempw 2016-03-19 12:02:45 +08:00
parent ccd40d867d
commit 81d7262627
3 changed files with 13 additions and 6 deletions

View File

@ -3,7 +3,7 @@
* @Author: printempw
* @Date: 2016-03-06 14:19:20
* @Last Modified by: printempw
* @Last Modified time: 2016-03-18 22:49:28
* @Last Modified time: 2016-03-19 11:54:58
*/
require "../includes/session.inc.php";
if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员');
@ -59,7 +59,14 @@ $db = new Database\Database();
<td>
<a href="javascript:deleteTexture('<?php echo $row['username'] ?>');" class="btn btn-warning btn-sm">删除材质</a>
<a href="javascript:changePasswd('<?php echo $row['username'] ?>');" class="btn btn-default btn-sm">更改密码</a>
<a href="javascript:deleteAccount('<?php echo $row['username'] ?>');" class="btn btn-danger btn-sm">删除用户</a>
<a class="btn btn-danger btn-sm"
<?php if ($row['uid'] == 1)
echo 'disabled="disabled" data-toggle="tooltip" data-placement="bottom" title="少年,不要作死哦"';
else
echo 'href="javascript:deleteAccount(\''.$row['username'].'\');"';
?>>
删除用户
</a>
</td>
</tr>
<?php } ?>

View File

@ -2,11 +2,11 @@
* @Author: printempw
* @Date: 2016-02-04 16:47:54
* @Last Modified by: printempw
* @Last Modified time: 2016-03-19 11:41:56
* @Last Modified time: 2016-03-19 12:00:28
*/
@import url(https://cdn.moefont.com/fonts/css?family=Ubuntu);
body {
body, .ply-layer {
font-family: Ubuntu, 'Segoe UI', 'Microsoft Yahei', 'Microsoft Jhenghei', sans-serif;
}
input {

View File

@ -2,11 +2,11 @@
* @Author: printempw
* @Date: 2016-01-21 19:12:06
* @Last Modified by: printempw
* @Last Modified time: 2016-03-19 11:42:00
* @Last Modified time: 2016-03-19 12:01:37
*/
@import url(https://cdn.moefont.com/fonts/css?family=Ubuntu);
body {
body, .ply-layer {
font-family: Ubuntu, 'Segoe UI', 'Microsoft Yahei', 'Microsoft Jhenghei', sans-serif;
}
#canvas3d {