forked from edwardjrp/license_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contacts_holidays_list_events.php
105 lines (88 loc) · 3.53 KB
/
contacts_holidays_list_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
<?php
// //Events @1-F81417CB
//contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow @18-A9CD93B6
function contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow(& $sender)
{
$contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $contacts_holidays_list; //Compatibility
//End contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow
//Custom Code @20-2A29BDB7
// -------------------------
// Write your own code here.
switch (CCGetGroupID()) {
case 3:
case 4:
$contacts_holidays_list->alm_customers_contacts_ho->pndeletebutton->Visible = true;
break;
default:
$contacts_holidays_list->alm_customers_contacts_ho->pndeletebutton->Visible = false;
break;
}
// -------------------------
//End Custom Code
//Close contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow @18-E4DE0546
return $contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow;
}
//End Close contacts_holidays_list_alm_customers_contacts_ho_pndeletebutton_BeforeShow
//contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow @5-28CCDA05
function contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow(& $sender)
{
$contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $contacts_holidays_list; //Compatibility
//End contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow
//Set Row Style @10-982C9472
$styles = array("Row", "AltRow");
if (count($styles)) {
$Style = $styles[($Component->RowNumber - 1) % count($styles)];
if (strlen($Style) && !strpos($Style, "="))
$Style = (strpos($Style, ":") ? 'style="' : 'class="'). $Style . '"';
$Component->Attributes->SetValue("rowStyle", $Style);
}
//End Set Row Style
//Custom Code @21-2A29BDB7
// -------------------------
// Write your own code here.
global $FileName;
$querystring = CCGetQueryString("QueryString",array());
$guid = $contacts_holidays_list->alm_customers_contacts_ho->guid->GetValue();
$deleteurl = $FileName."?$querystring&del_guid=$guid&o=delrecord";
$contacts_holidays_list->alm_customers_contacts_ho->lbdelete->SetValue($deleteurl);
// -------------------------
//End Custom Code
//Close contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow @5-E3EAF84F
return $contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow;
}
//End Close contacts_holidays_list_alm_customers_contacts_ho_BeforeShowRow
//contacts_holidays_list_BeforeShow @1-1A87A8FA
function contacts_holidays_list_BeforeShow(& $sender)
{
$contacts_holidays_list_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $contacts_holidays_list; //Compatibility
//End contacts_holidays_list_BeforeShow
//Custom Code @22-2A29BDB7
// -------------------------
// Write your own code here.
$del_guid = CCGetFromGet("del_guid","");
$o = CCGetFromGet("o","");
if ( ($o == "delrecord") && (strlen($del_guid) > 0) ) {
global $FileName;
$params["guid"] = $del_guid;
$customers = new Customers();
$customers->deleteHolidaysByGuid($params);
$querystring = CCGetQueryString("QueryString",array("o","del_guid"));
//Forcing redirect
header("Location: $FileName?$querystring");
}
// -------------------------
//End Custom Code
//Close contacts_holidays_list_BeforeShow @1-2AE37F02
return $contacts_holidays_list_BeforeShow;
}
//End Close contacts_holidays_list_BeforeShow
?>