source: branches/web-klask/resultat-inc.php @ 40

Last change on this file since 40 was 40, checked in by g7moreau, 16 years ago
  • Add web-klask project from Kevin Reverchon
File size: 3.3 KB
RevLine 
[40]1<?
2//session_start();
3require('./libInstall.php');
4require('./libDisplay.php');
5require('./ctrl.php');
6
7
8
9if ( $_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
20if ( $_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
28if ( $_GET['section'] == "addSwitch" ) {
29        echo displayResultAddSwitch($_POST['selectIdSwitch'], $_POST['textLocation'], $_POST['textLevel'], $_POST['textPortIgnore'], $_POST['selectIdService']);       
30       
31}
32
33if ( $_GET['section'] == "addPower" ) {
34        echo displayResultAddPower($_POST['textIdPower'], $_POST['textDescPower']);     
35}
36
37if ( $_GET['section'] == "addPowerUser" ) {
38        echo displayResultAddUserPower($_POST['selectUser'], $_POST['selectPower']);   
39}
40
41if ( $_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
51if ( $_GET['section'] == "addSwitchService" ) {
52        echo displayResultAddSwitchService($_POST['selectSwitch'], $_POST['selectService']);
53}
54
55if ( $_GET['section'] == "addPowerService" ) {
56        echo displayResultAddPowerService($_POST['selectPower'], $_POST['selectService']);     
57}
58
59if ( $_GET['section'] == "delUser" ) {
60        echo displayResultDelUser($_POST['selectUser']);       
61       
62}
63
64if ( $_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
74if ( $_GET['section'] == "delSwitch" ) {
75        echo displayResultDelSwitch($_POST['selectSwitch']);   
76}
77
78if ( $_GET['section'] == "delUserSwitchService" ) {
79       
80        echo displayDelUserSwitchService($_POST['checkUserService'], $_POST['checkSwitchService']);     
81}
82
83
84if ( $_GET['section'] == "addDevice" ) {
85        echo displayResultAddDevice($_POST['textHostname'], $_POST['textMac'], $_POST['textIP'], $_POST['selectType']); 
86}
87
88if ( $_GET['section'] == "addNetwork" ) {
89        echo displayResultAddNetwork($_POST['textIdNetwork'], $_POST['textNameNetwork'], $_POST['textInterface'], $_POST['selectRouteur']);     
90}
91
92if ( $_GET['section'] == "delDevice" ) {
93        echo displayResultDelDevice($_POST['selectDevice']);   
94}
95
96if ( $_GET['section'] == "delNetwork" ) {
97        echo displayResultDelNetwork($_POST['selectNetwork']); 
98}
99
100if ( $_GET['section'] == "delPowerUserByAllPower" ) {
101        echo displayResultDelUserPowerBydisplayAllPower($_POST['checkPowerUser']);     
102}
103
104if ( $_GET['section'] == "delPowerService" ) {
105        echo displayResultDelServicePower($_POST['checkPowerService']);
106}
107
108if ( $_GET['section'] == "updateSwitch" ) {
109        echo displayResultUpdateSwitch($_POST['textIdSwitch'], $_POST['textIP'], $_POST['textMac'], $_POST['selectType'], $_POST['textLocation'], $_POST['textLevel'], $_POST['textportIgnore'] );
110}
111
112if ( $_GET['section'] == "klaskSearch" ) {
113        echo displayKlaskSearch($_POST['textIP']);
114}
115
116?>
Note: See TracBrowser for help on using the repository browser.