Exemple #1
0
<div class="row">
	<div class="col-lg-12">
		<h3 class="page-title">Στατιστικά Αδειών</h3>
	</div>
</div>
 <?php 
print_messages();
$employees = get_employees();
$employeelist = 'display:none;';
$since = 'display:none;';
$until = 'display:none;';
if (isset($_POST['stattype'])) {
    if (trim($_POST['stattype']) == 'single') {
        $employeelist = '';
        $since = '';
        $until = '';
    }
    if (trim($_POST['stattype']) == 'day') {
        $since = '';
    }
    if (trim($_POST['stattype']) == 'period') {
        $since = '';
        $until = '';
    }
}
?>
<div class="row">
	<div class="col-lg-12">

		<form name="statform" id="statform" method="post" action="<?php 
echo URL;
Exemple #2
0
    $smarty->assign('department', $department);
    $smarty->assign('accounts', $department_account);
    if ($department_id == "") {
        $admin_name = '超级管理员';
    }
    $smarty->assign('admin_name', $admin_name);
    $res['main'] = $smarty->fetch('account_score.htm');
    die($json->encode($res));
} elseif ($_REQUEST['act'] == 'get_score') {
    $user_id = $_GET['user_id'];
    // 帐号使用者
    $department_id = $_SESSION['role_id'];
    if ($department_id == "") {
        $admin_name = "超级管理员";
    }
    $employees = get_employees($department_id);
    //  指部门登陆本系统者所属部门id
    $sql_select = 'SELECT a.user,a.account_id,a.user_name,t.type_name,a.subject, a.url,FROM_UNIXTIME(a.account_updatetime,"%Y年%m月%d日%H时") AS account_updatetime,a.prescore,a.score FROM ' . $GLOBALS['ecs']->table('account') . ' AS a LEFT JOIN ' . $GLOBALS['ecs']->table('account_type') . 'AS t ON a.type_id=t.type_id' . " WHERE a.user={$user_id}";
    $accounts = $GLOBALS['db']->getAll($sql_select);
    $smarty->assign('accounts', $accounts);
    $smarty->assign('admin_name', $admin_name);
    $smarty->assign('employees', $employees);
    //部门员工
    $res['main'] = $smarty->fetch('account_score.htm');
    die($json->encode($res));
} elseif ($_REQUEST['act'] == 'score_info') {
    $account_id = $_GET['account_id'];
    //需要查看的帐号id
    $sql_select = 'SELECT u.user_name AS admin_name,a.user_name FROM ' . $GLOBALS['ecs']->table('account') . ' AS a LEFT JOIN ' . $GLOBALS['ecs']->table('admin_user') . ' AS u ON a.user=u.user_id ' . " WHERE a.account_id={$account_id} ";
    //帐号管理员与用户名
    $info = $GLOBALS['db']->getAll($sql_select);