1 | <? |
---|
2 | //session_start(); |
---|
3 | require('./libInstall.php'); |
---|
4 | require('./libDisplay.php'); |
---|
5 | require('./ctrl.php'); |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | if ( $_GET['section'] == "addService" ) { |
---|
10 | if ( $GLOBALS['auth'] == "classic" ) { |
---|
11 | echo displayResultAddService($_POST['textIdService']); |
---|
12 | }else{ |
---|
13 | echo "<h1>Résultat de la Commande</h1>"; |
---|
14 | echo "ADD SERVICE [FAILED]: Your authentification use LDAP<BR>"; |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | } |
---|
19 | |
---|
20 | if ( $_GET['section'] == "addUser" ) { |
---|
21 | if ( $GLOBALS['auth'] == "classic" ) { |
---|
22 | echo displayResultAddUser($_POST['textIdLogin'], $_POST['textPasswdUser'], $_POST['selectIdService'] ); |
---|
23 | }else{ |
---|
24 | echo displayResultAddUser($_POST['textIdLogin'], "", ""); |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | if ( $_GET['section'] == "addSwitch" ) { |
---|
29 | echo displayResultAddSwitch($_POST['selectIdSwitch'], $_POST['textLocation'], $_POST['textLevel'], $_POST['textPortIgnore'], $_POST['selectIdService']); |
---|
30 | |
---|
31 | } |
---|
32 | |
---|
33 | if ( $_GET['section'] == "addPower" ) { |
---|
34 | echo displayResultAddPower($_POST['textIdPower'], $_POST['textDescPower']); |
---|
35 | } |
---|
36 | |
---|
37 | if ( $_GET['section'] == "addPowerUser" ) { |
---|
38 | echo displayResultAddUserPower($_POST['selectUser'], $_POST['selectPower']); |
---|
39 | } |
---|
40 | |
---|
41 | if ( $_GET['section'] == "addUserService" ) { |
---|
42 | |
---|
43 | if ( $GLOBALS['auth'] == "classic" ) { |
---|
44 | echo displayResultAddUserService($_POST['selectUser'], $_POST['selectService']); |
---|
45 | }else{ |
---|
46 | echo "<h1>Résultat de la Commande</h1>"; |
---|
47 | echo "ADD SERVICE FOR USER [FAILED]: Your authentification use LDAP<BR>"; |
---|
48 | } |
---|
49 | } |
---|
50 | |
---|
51 | if ( $_GET['section'] == "addSwitchService" ) { |
---|
52 | echo displayResultAddSwitchService($_POST['selectSwitch'], $_POST['selectService']); |
---|
53 | } |
---|
54 | |
---|
55 | if ( $_GET['section'] == "addPowerService" ) { |
---|
56 | echo displayResultAddPowerService($_POST['selectPower'], $_POST['selectService']); |
---|
57 | } |
---|
58 | |
---|
59 | if ( $_GET['section'] == "delUser" ) { |
---|
60 | echo displayResultDelUser($_POST['selectUser']); |
---|
61 | |
---|
62 | } |
---|
63 | |
---|
64 | if ( $_GET['section'] == "delService" ) { |
---|
65 | if ( $GLOBALS['auth'] == "classic" ) { |
---|
66 | echo displayResultDelService($_POST['selectService']); |
---|
67 | }else{ |
---|
68 | echo "<h1>Résultat de la Commande</h1>"; |
---|
69 | echo "DELETE SERVICE [FAILED]: Your authentification use LDAP<BR>"; |
---|
70 | } |
---|
71 | |
---|
72 | } |
---|
73 | |
---|
74 | if ( $_GET['section'] == "delSwitch" ) { |
---|
75 | echo displayResultDelSwitch($_POST['selectSwitch']); |
---|
76 | } |
---|
77 | |
---|
78 | if ( $_GET['section'] == "delUserSwitchService" ) { |
---|
79 | |
---|
80 | echo displayDelUserSwitchService($_POST['checkUserService'], $_POST['checkSwitchService']); |
---|
81 | } |
---|
82 | |
---|
83 | |
---|
84 | if ( $_GET['section'] == "addDevice" ) { |
---|
85 | echo displayResultAddDevice($_POST['textHostname'], $_POST['textMac'], $_POST['textIP'], $_POST['selectType']); |
---|
86 | } |
---|
87 | |
---|
88 | if ( $_GET['section'] == "addNetwork" ) { |
---|
89 | echo displayResultAddNetwork($_POST['textIdNetwork'], $_POST['textNameNetwork'], $_POST['textInterface'], $_POST['selectRouteur']); |
---|
90 | } |
---|
91 | |
---|
92 | if ( $_GET['section'] == "delDevice" ) { |
---|
93 | echo displayResultDelDevice($_POST['selectDevice']); |
---|
94 | } |
---|
95 | |
---|
96 | if ( $_GET['section'] == "delNetwork" ) { |
---|
97 | echo displayResultDelNetwork($_POST['selectNetwork']); |
---|
98 | } |
---|
99 | |
---|
100 | if ( $_GET['section'] == "delPowerUserByAllPower" ) { |
---|
101 | echo displayResultDelUserPowerBydisplayAllPower($_POST['checkPowerUser']); |
---|
102 | } |
---|
103 | |
---|
104 | if ( $_GET['section'] == "delPowerService" ) { |
---|
105 | echo displayResultDelServicePower($_POST['checkPowerService']); |
---|
106 | } |
---|
107 | |
---|
108 | if ( $_GET['section'] == "updateSwitch" ) { |
---|
109 | echo displayResultUpdateSwitch($_POST['textIdSwitch'], $_POST['textIP'], $_POST['textMac'], $_POST['selectType'], $_POST['textLocation'], $_POST['textLevel'], $_POST['textportIgnore'] ); |
---|
110 | } |
---|
111 | |
---|
112 | if ( $_GET['section'] == "klaskSearch" ) { |
---|
113 | echo displayKlaskSearch($_POST['textIP']); |
---|
114 | } |
---|
115 | |
---|
116 | ?> |
---|