if ($updResult > 0) { $res['code'] = "评分成功"; die($json->encode($res)); } } else { $res['code'] = "评分失败"; die($json->encode($res)); } } elseif ($_REQUEST['act'] == 'account_score') { //登录者所属部门 $department_id = $_SESSION['role_id']; $employees = get_employees($department_id); //部门员工列表 $user_id = $employees[0]["user"]; //第一个员工id $department = department_get($department_id); //获取每个部门第一个员工ID 并默认显示 $sql_select = 'SELECT * FROM ' . $GLOBALS['ecs']->table('account'); if ($department_id != "") { $sql_select .= " WHERE department_id={$department_id}"; } $result = $GLOBALS['db']->getAll($sql_select); $smarty->assign('employees', $employees); $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));
$smarty->assign('account_qq', $account_qq); $res['main'] = $smarty->fetch('account_qqgroup.htm'); die($json->encode($res)); } elseif ($_REQUEST['act'] == 'getQqGroup') { $account_qq = qq_get(); $qq = intval($_GET['qq']); $qqgroup = qqGroup_get($qq); //指定qq下的Q群 $account_qq = qq_get(); $smarty->assign('account_qq', $account_qq); $smarty->assign('qq_group', $qqgroup); $res['main'] = $smarty->fetch('account_qqgroup.htm'); die($json->encode($res)); } elseif ($_REQUEST['act'] == 'add_qqgroup') { $account_qq = qq_get(); $department = department_get(); //获取部门 $user_name = user_get(); //Q群使用者 $smarty->assign('account_qq', $account_qq); $smarty->assign('department', $department); $res['main'] = $smarty->fetch('add_qqqroup.htm'); die($json->encode($res)); } elseif ($_REQUEST['act'] == 'insert_qqgroup') { $qq = mysql_real_escape_string($_REQUEST['qq']); //所属QQ $qqgroup = mysql_real_escape_string($_REQUEST['qqgroup']); //Q群帐号 $subject = mysql_real_escape_string($_REQUEST['subject']); //主题 $strAdmin = mysql_real_escape_string($_REQUEST['strAdmin']);