You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
include_once(dirname(dirname(__FILE__)) . "/library/publicBase.php");
|
|
|
|
|
|
|
|
class index extends publicBase {
|
|
|
|
|
|
|
|
public function home() {
|
|
|
|
$this->login();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function login() {}
|
|
|
|
|
|
|
|
public function loginout() {
|
|
|
|
session_start();
|
|
|
|
session_destroy();
|
|
|
|
session_write_close();
|
|
|
|
|
|
|
|
header('location:/');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function user_list() {
|
|
|
|
$user_info = $this->get_user_info();
|
|
|
|
if (!$user_info['is_super_admin']) $this->show_message('您没有权限', 'goback');
|
|
|
|
|
|
|
|
$uobj = new mUser();
|
|
|
|
$this->view['user_list'] = $uobj->getAdminUserList();
|
|
|
|
$this->view['login_list'] = $uobj->getLoginUserList();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function ajax_change_user_status() {
|
|
|
|
$id = $this->post('id') + 0;
|
|
|
|
$status = $this->post('status') + 0;
|
|
|
|
|
|
|
|
$uobj = new mUser();
|
|
|
|
$res = $uobj->updateAdminUser($id, array('status' => $status));
|
|
|
|
if (!$res) $this->ajax_json(false, '设置失败');
|
|
|
|
|
|
|
|
$this->ajax_json(true, '设置成功');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function ajax_pass_user() {
|
|
|
|
$id = $this->post('id') + 0;
|
|
|
|
$aid = 1; //当前默认aid为1
|
|
|
|
|
|
|
|
$uobj = new mUser();
|
|
|
|
$res = $uobj->passLoginUser($id, $aid);
|
|
|
|
if (!$res) $this->ajax_json(false, $uobj->getError());
|
|
|
|
|
|
|
|
$this->ajax_json(true, '设置成功');
|
|
|
|
}
|
|
|
|
}
|