2016-03-06 14:41:42 +08:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @Author: printempw
|
|
|
|
* @Date: 2016-03-06 14:19:20
|
|
|
|
* @Last Modified by: printempw
|
2016-04-03 08:09:59 +08:00
|
|
|
* @Last Modified time: 2016-04-03 07:55:53
|
2016-03-06 14:41:42 +08:00
|
|
|
*/
|
2016-03-26 18:50:47 +08:00
|
|
|
require "../libraries/session.inc.php";
|
2016-04-03 08:09:59 +08:00
|
|
|
if (!$user->is_admin) Utils::redirect('../index.php?msg=看起来你并不是管理员');
|
2016-03-19 10:28:18 +08:00
|
|
|
View::show('admin/header', array('page_title' => "用户管理"));
|
2016-04-02 22:53:55 +08:00
|
|
|
$db = new Database\Database('users');
|
2016-03-06 14:41:42 +08:00
|
|
|
|
2016-03-27 10:13:11 +08:00
|
|
|
if (isset($_GET['show'])) {
|
|
|
|
View::show('admin/show', ['uid' => (int)$_GET['show']]);
|
|
|
|
} else {
|
|
|
|
View::show('admin/list');
|
|
|
|
}
|
2016-03-19 10:28:18 +08:00
|
|
|
|
|
|
|
$data['script'] = <<< 'EOT'
|
2016-03-06 14:41:42 +08:00
|
|
|
<script type="text/javascript" src="../assets/js/admin.utils.js"></script>
|
2016-03-27 09:13:13 +08:00
|
|
|
<script>
|
|
|
|
$('#page-select').on('change', function() {
|
|
|
|
window.location = "manage.php?page="+$(this).val();
|
|
|
|
});
|
|
|
|
</script>
|
2016-03-19 10:28:18 +08:00
|
|
|
EOT;
|
2016-03-27 10:55:16 +08:00
|
|
|
if (isset($_GET['show']))
|
|
|
|
$data['script'] .= '<script type="text/javascript" src="../assets/js/preview.utils.js"></script>';
|
2016-03-19 10:28:18 +08:00
|
|
|
View::show('footer', $data); ?>
|