diff --git a/admin/index.php b/admin/index.php index 32de2fd3..72b6e05a 100644 --- a/admin/index.php +++ b/admin/index.php @@ -3,7 +3,7 @@ * @Author: prpr * @Date: 2016-02-03 14:39:50 * @Last Modified by: printempw - * @Last Modified time: 2016-03-06 14:07:38 + * @Last Modified time: 2016-03-06 14:40:17 */ require "../includes/session.inc.php"; if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); @@ -42,79 +42,18 @@ if (!$user->is_admin) header('Location: ../index.php?msg=看起来你并不是
- - - - - - - - - - - - +
+
概览
+
query("SELECT * FROM users ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30"); - $page_total = $db->getRecordNum()/30; - while ($row = $result->fetch_array()) { ?> -
- - - - - - - - -
#用户名预览材质更改材质操作
- src="../skin/-steve.png" /> - src="../skin/-alex.png" /> - src="../cape/.png" /> - - 皮肤 - 披风 - 优先模型 - () - - 更改密码 - 删除用户 -
- + ?> +

注册用户:getRecordNum();?>

+

上传材质总数:

+

占用空间大小:

+
+ diff --git a/admin/manage.php b/admin/manage.php new file mode 100644 index 00000000..2d5a4288 --- /dev/null +++ b/admin/manage.php @@ -0,0 +1,128 @@ +is_admin) header('Location: ../index.php?msg=看起来你并不是管理员'); +?> + + + + + + 用户管理 - <?php echo SITE_TITLE; ?> + + + + + + + + + + +
+
+ + +
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + query("SELECT * FROM users ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30"); + $page_total = $db->getRecordNum()/30; + while ($row = $result->fetch_array()) { ?> + + + + + + + + + +
#用户名预览材质更改材质操作
+ src="../skin/-steve.png" /> + src="../skin/-alex.png" /> + src="../cape/.png" /> + + 皮肤 + 披风 + 优先模型 + () + + 更改密码 + 删除用户 +
+ +
+ + + + + + + + + + diff --git a/assets/css/admin.style.css b/assets/css/admin.style.css index cf094a66..6bafbcf7 100644 --- a/assets/css/admin.style.css +++ b/assets/css/admin.style.css @@ -2,8 +2,12 @@ * @Author: prpr * @Date: 2016-02-04 16:47:54 * @Last Modified by: printempw -* @Last Modified time: 2016-03-06 14:11:26 +* @Last Modified time: 2016-03-06 14:19:55 */ +.overview { + margin: 80px auto 0; + width: 100%; +} .pure-table { margin: 80px auto 0; width: 100%; diff --git a/includes/Utils.class.php b/includes/Utils.class.php index e7a77643..e4350975 100644 --- a/includes/Utils.class.php +++ b/includes/Utils.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: printempw - * @Last Modified time: 2016-03-05 19:21:47 + * @Last Modified time: 2016-03-06 14:40:12 */ class Utils @@ -62,6 +62,29 @@ class Utils } } + /** + * Recursively count the size of specified directory + * + * @param string $dir + * @return int, total size in bytes + */ + public static function getDirSize($dir) { + $dh = opendir($dir); + $size = 0; + while(false !== ($file = @readdir($dh))) { + if ($file!='.' and $file!='..') { + $path = $dir.'/'.$file; + if (is_dir($path)) { + $size += $this->dir_size($path); + } else if (is_file($path)) { + $size += filesize($path); + } + } + } + closedir($dh); + return $size; + } + /** * Simple SQL injection protection *