-
Notifications
You must be signed in to change notification settings - Fork 0
/
account.common.php
85 lines (66 loc) · 2.54 KB
/
account.common.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/*******************************************************************************
* account.common.php
* account参数信息文件
* account parameter file
* 功能描述
检查用户权限
初始化语言变量
初始化xajax类
预定义xajaxGrid中需要使用的一些参数
* Function Desc
authority
initialize localization class
initialize xajax class
define xajaxGrid parameters
registed function:
* call these function by xajax_ + funcionname
* such as xajax_init()
showGrid
add show account add form
save save account information
edit show account edit form
update update account information
delete delete an account
showDetail show detail information about an account
return null for now
init init html page
* Revision 0.045 2007/10/17 15:25:00 modified by solo
* Desc: page created
********************************************************************************/
header('Content-Type: text/html; charset=utf-8');
header('Expires: Sat, 01 Jan 2000 00:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0',false);
header('Pragma: no-cache');
session_cache_limiter('public, no-store');
session_set_cookie_params(0);
if (!session_id()) session_start();
setcookie('PHPSESSID', session_id());
require_once ('include/localization.class.php');
if (!isset($_SESSION['curuser'])){
header("Location: index.php");
}
if ($_SESSION['curuser']['usertype'] != 'admin' && $_SESSION['curuser']['usertype'] != 'reseller' && $_SESSION['curuser']['usertype'] != 'groupadmin' &&
$_SESSION['curuser']['usertype'] != 'technicaladmin') {
if ($_SESSION['curuser']['usertype'] == 'supervisor' || $_SESSION['curuser']['usertype'] == 'hrsupervisor')
header("Location: checkout.php");
else
header("Location: systemstatus.php");
}
require_once ("include/xajax.inc.php");
$GLOBALS['locate']=new Localization($_SESSION['curuser']['country'],$_SESSION['curuser']['language'],'account');
$xajax = new xajax("account.server.php");
$xajax->registerFunction("showGrid");
$xajax->registerFunction("add");
$xajax->registerFunction("save");
$xajax->registerFunction("edit");
$xajax->registerFunction("update");
$xajax->registerFunction("delete");
$xajax->registerFunction("init");
$xajax->registerFunction("showDetail");
$xajax->registerFunction("searchFormSubmit");
$xajax->registerFunction("setGroup");
define("ROWSXPAGE", 25); // Number of rows show it per page.
define("MAXROWSXPAGE", 50); // Total number of rows show it when click on "Show All" button.
?>