-
Notifications
You must be signed in to change notification settings - Fork 1
/
Assign_Rooms_edit.php
111 lines (80 loc) · 2.63 KB
/
Assign_Rooms_edit.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
require_once("classes/searchclause.php");
require_once("include/Assign_Rooms_variables.php");
require_once('include/xtempl.php');
require_once('classes/editpage.php');
add_nocache_headers();
if( !EditPage::processEditPageSecurity( $strTableName ) )
return;
EditPage::handleBrokenRequest();
// render all necessary layouts
// parse control parameters
$pageMode = EditPage::readEditModeFromRequest();
$xt = new Xtempl();
$id = postvalue_number("id");
$id = intval($id) == 0 ? 1 : $id;
// $keys could not be set properly if editid params were no passed
$keys = array();
$keys["organization_id"] = postvalue("editid1");
$keys["unee_t_mefe_user_id"] = postvalue("editid2");
$keys["unee_t_level_3_id"] = postvalue("editid3");
$keys["unee_t_user_type_id"] = postvalue("editid4");
//array of params for classes
$params = array();
$params["id"] = $id;
$params["xt"] = &$xt;
$params["keys"] = $keys;
$params["mode"] = $pageMode;
$params["pageType"] = PAGE_EDIT;
$params["pageName"] = postvalue("page");
$params["tName"] = $strTableName;
$params["action"] = postvalue("a");
$params["selectedFields"] = postvalue("fields");
;
$params["captchaName"] = "captcha_1209xre";
$params["captchaValue"] = postvalue("value_captcha_1209xre_" . $id);
$params["selection"] = postvalue("selection");
$params["rowIds"] = my_json_decode( postvalue("rowIds") );
$params["masterTable"] = postvalue("mastertable");
// locking parameters
$params["lockingAction"] = postvalue("action");
$params["lockingSid"] = postvalue("sid");
$params["lockingKeys"] = postvalue("keys");
$params["lockingStart"] = postvalue("startEdit");
if( $pageMode == EDIT_INLINE )
{
$params["screenWidth"] = postvalue("screenWidth");
$params["screenHeight"] = postvalue("screenHeight");
$params["orientation"] = postvalue("orientation");
}
if( $pageMode == EDIT_DASHBOARD )
{
$params["dashElementName"] = postvalue("dashelement");
$params["dashTName"] = postvalue("table");
if( postvalue("mapRefresh") )
{
$params["mapRefresh"] = true;
$params["vpCoordinates"] = my_json_decode( postvalue("vpCoordinates") );
}
}
if(( $pageMode == EDIT_POPUP || $pageMode == EDIT_INLINE ) && postvalue("dashTName"))
{
$params["dashTName"] = postvalue("dashTName");
$params["dashElementName"] = postvalue("dashelement");
}
if( $params["masterTable"] )
{
$params["masterKeysReq"] = EditPage::processMasterKeys();
}
$pageObject = EditPage::EditPageFactory($params);
if( $pageObject->isLockingRequest() )
{
$pageObject->doLockingAction();
exit();
}
$pageObject->init();
$pageObject->process();
?>