forked from edwardjrp/license_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
products_suite_maintcontent_events.php
executable file
·161 lines (134 loc) · 5.58 KB
/
products_suite_maintcontent_events.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
// //Events @1-F81417CB
//products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow @7-803BAFB6
function products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow(& $sender)
{
$products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow
//Custom Code @8-2A29BDB7
// -------------------------
// Write your own code here.
$remove = array("guid","tab");
$querystring = CCGetQueryString("QueryString",$remove);
if (strlen($querystring) > 0)
$newlink = "?".$querystring;
else
$newlink = $querystring;
$sender->setValue($newlink);
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow @7-7EF5F637
return $products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow;
}
//End Close products_suite_maintcontent_alm_product_suites_lbgoback_BeforeShow
//Used because the last_user_id query on afterinsert was not working
$lastguid = "";
//products_suite_maintcontent_alm_product_suites_BeforeInsert @2-023F7506
function products_suite_maintcontent_alm_product_suites_BeforeInsert(& $sender)
{
$products_suite_maintcontent_alm_product_suites_BeforeInsert = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_alm_product_suites_BeforeInsert
//Custom Code @30-2A29BDB7
// -------------------------
// Write your own code here.
$guid = uuid_create();
global $lastguid;
$lastguid = $guid;
$products_suite_maintcontent->alm_product_suites->created_iduser->SetValue(CCGetUserID());
$products_suite_maintcontent->alm_product_suites->hidguid->SetValue($guid);
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_alm_product_suites_BeforeInsert @2-29050226
return $products_suite_maintcontent_alm_product_suites_BeforeInsert;
}
//End Close products_suite_maintcontent_alm_product_suites_BeforeInsert
//products_suite_maintcontent_alm_product_suites_BeforeUpdate @2-41BBA315
function products_suite_maintcontent_alm_product_suites_BeforeUpdate(& $sender)
{
$products_suite_maintcontent_alm_product_suites_BeforeUpdate = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_alm_product_suites_BeforeUpdate
//Custom Code @31-2A29BDB7
// -------------------------
// Write your own code here.
$products_suite_maintcontent->alm_product_suites->modified_iduser->SetValue(CCGetUserID());
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_alm_product_suites_BeforeUpdate @2-E62CC3A9
return $products_suite_maintcontent_alm_product_suites_BeforeUpdate;
}
//End Close products_suite_maintcontent_alm_product_suites_BeforeUpdate
//products_suite_maintcontent_alm_product_suites_AfterUpdate @2-D08C1291
function products_suite_maintcontent_alm_product_suites_AfterUpdate(& $sender)
{
$products_suite_maintcontent_alm_product_suites_AfterUpdate = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_alm_product_suites_AfterUpdate
//Custom Code @32-2A29BDB7
// -------------------------
// Write your own code here.
//Show message alert after saving information
CCSetSession("showalert","show");
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_alm_product_suites_AfterUpdate @2-E252FBC7
return $products_suite_maintcontent_alm_product_suites_AfterUpdate;
}
//End Close products_suite_maintcontent_alm_product_suites_AfterUpdate
//products_suite_maintcontent_alm_product_suites_AfterInsert @2-2C521102
function products_suite_maintcontent_alm_product_suites_AfterInsert(& $sender)
{
$products_suite_maintcontent_alm_product_suites_AfterInsert = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_alm_product_suites_AfterInsert
//Custom Code @33-2A29BDB7
// -------------------------
// Write your own code here.
//Show message alert after saving information
CCSetSession("showalert","show");
global $lastguid;
global $FileName;
global $Redirect;
$Redirect = $FileName."?guid=$lastguid";
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_alm_product_suites_AfterInsert @2-2D7B3A48
return $products_suite_maintcontent_alm_product_suites_AfterInsert;
}
//End Close products_suite_maintcontent_alm_product_suites_AfterInsert
//products_suite_maintcontent_BeforeShow @1-27F358BB
function products_suite_maintcontent_BeforeShow(& $sender)
{
$products_suite_maintcontent_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $products_suite_maintcontent; //Compatibility
//End products_suite_maintcontent_BeforeShow
//Custom Code @14-2A29BDB7
// -------------------------
// Write your own code here.
//Settingup saved message popup
global $MainPage;
$showalert = CCGetSession("showalert","hide");
$MainPage->Attributes->SetValue("showalert",$showalert);
if ($showalert == "show")
CCSetSession("showalert","hide");
// -------------------------
//End Custom Code
//Close products_suite_maintcontent_BeforeShow @1-CA363294
return $products_suite_maintcontent_BeforeShow;
}
//End Close products_suite_maintcontent_BeforeShow
?>