-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice_actions.php
58 lines (54 loc) · 1.52 KB
/
service_actions.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
<?php
require_once('client_utilities.php');
if (is_array($_POST))
{
if(array_key_exists('action',$_POST))
{
$req['service']='service';
$req['action']='list';
$services=call_handler($req);
$req['service']='action';
$req['action']='list';
$actions=call_handler($req);
if ($_POST['action']=='add')
{
$req['service']='service_action';
$req['action']='add';
$req['service_name']=urlencode($_POST['service_name']);
$req['action_name']=urlencode($_POST['action_name']);
$req['function']=urlencode($_POST['function']);
$service_actions=call_handler($req);
}
if ($_POST['action']=='update')
{
$req['service']='service_action';
$req['action']='update';
$req['service_name']=urlencode($_POST['service_name']);
$req['action_name']=urlencode($_POST['action_name']);
$req['function']=urlencode($_POST['function']);
$service_actions=call_handler($req);
}
if ($_POST['action']=='delete')
{
$req['service']='service_action';
$req['action']='delete';
$req['service_name']=urlencode($_POST['service_name']);
$req['action_name']=urlencode($_POST['action_name']);
$service_actions=call_handler($req);
}
//Always show the grid
$req['service_name']=$_POST['service_name'];
$req['service']='service_action';
$req['action']='list';
$service_actions=call_handler($req);
include('views/service_actions_form.php');
}
else //No action
{
$req['service']='service';
$req['action']='list';
$services=call_handler($req);
include('views/service_actions_choose.php');
}
}
?>