-
Notifications
You must be signed in to change notification settings - Fork 1
/
delete_service.php
85 lines (63 loc) · 1.54 KB
/
delete_service.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
include "layout.class.php";
include "config.php";
include "bartlby-ui.class.php";
$btl=new BartlbyUi($Bartlby_CONF);
if($Bartlby_CONF_Remote == true && $Bartlby_CONF_DBSYNC == false) {
$btl->redirectError("BARTLBY::INSTANCE::IS_REMOTE");
}
$layout= new Layout();
$layout->setTitle("Delete Service");
$layout->set_menu("services");
$layout->Form("fm1", "bartlby_action.php");
$layout->Table("100%");
if($_GET[service_id] == "" || $_GET[service_id]{0} == 's') {
$layout->Form("fm1", "bartlby_action.php");
$layout->Table("100%");
$layout->Tr(
$layout->Td(
array(
0=>'you have choosen a server',
1=>'<input type=button value=back onClick="javascript:history.back();">'
)
)
);
$layout->TableEnd();
$layout->FormEnd();
$layout->display();
exit(1);
}
if($_GET[service_id]) {
$btl->hasServerorServiceRight($_GET[service_id]);
}
$btl->hasRight("action.delete_service");
$global_msg=bartlby_get_service_by_id($btl->RES, $_GET[service_id]);
if($global_msg == false) {
$btl->redirectError("BARTLBY::OBJECT::MISSING");
exit(1);
}
$dlmsg=$btl->finScreen("delete_service1");
$layout->Tr(
$layout->Td(
Array(
0=>Array(
'colspan'=> 2,
'show'=>$dlmsg
)
)
)
);
$layout->Tr(
$layout->Td(
Array(
0=>Array(
'colspan'=> 2,
"align"=>"right",
'show'=>$layout->Field("Subm", "submit", "next->") . $layout->Field("action", "hidden", "delete_service") . $layout->Field("service_id", "hidden", $_GET[service_id])
)
)
)
);
$layout->TableEnd();
$layout->FormEnd();
$layout->display();