[40] | 1 | <? |
---|
| 2 | |
---|
| 3 | require('./conf/config.php'); |
---|
| 4 | require('./ctrl.php'); |
---|
| 5 | require('./libDisplay.php'); |
---|
| 6 | |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | if ( !empty($_GET['section']) ) { |
---|
| 10 | if ( $_GET['section'] == "checkAuth" ) |
---|
| 11 | { |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | $result = auth ($_POST['textIdLogin'], $_POST['textPasswd']) ; |
---|
| 16 | if ( $result == 1 ) { |
---|
| 17 | |
---|
| 18 | $buffer = "<TABLE>"; |
---|
| 19 | $_SESSION['login']=$_POST['textIdLogin']; |
---|
| 20 | $_SESSION['passwd']=$_POST['textPasswd']; |
---|
| 21 | |
---|
| 22 | $buffer .= "<TR><TD>" . contentdefault() . "</TD></TR>" ; |
---|
| 23 | //header('Refresh: 2; url=./index.php'); |
---|
| 24 | $buffer .= "</TABLE>" ; |
---|
| 25 | }else{ |
---|
| 26 | $buffer = "<h1>Authentification</h1>"; |
---|
| 27 | $buffer .= "<TABLE>"; |
---|
| 28 | $buffer .= "<TR><TD>$result</TD></TR>" ; |
---|
| 29 | $buffer .= "</TABLE>" ; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | echo $buffer ; |
---|
| 33 | }else{ |
---|
| 34 | if ( empty($_SESSION['login'])) { |
---|
| 35 | echo "ACCESS DENIED"; |
---|
| 36 | return; |
---|
| 37 | } |
---|
| 38 | if ( $_GET['section'] =="addUser") { |
---|
| 39 | echo displayAddUser(); |
---|
| 40 | }else{ |
---|
| 41 | if ( $_GET['section'] =="addService" ) { |
---|
| 42 | echo displayAddService(); |
---|
| 43 | }else{ |
---|
| 44 | if ( $_GET['section'] =="addSwitch" ) { |
---|
| 45 | echo displayAddSwitch(); |
---|
| 46 | }else{ |
---|
| 47 | if ( $_GET['section'] =="addPower" ) { |
---|
| 48 | echo displayAddPower(); |
---|
| 49 | }else{ |
---|
| 50 | if ( $_GET['section'] =="addPowerUser" ) { |
---|
| 51 | echo displayAddUserPower(); |
---|
| 52 | }else{ |
---|
| 53 | if ( $_GET['section'] =="addUserService" ) { |
---|
| 54 | echo displayAddUserService(); |
---|
| 55 | }else{ |
---|
| 56 | if ( $_GET['section'] =="addSwitchService" ) { |
---|
| 57 | echo displayAddSwitchService(); |
---|
| 58 | }else{ |
---|
| 59 | if ( $_GET['section'] =="addPowerService" ) { |
---|
| 60 | echo displayAddPowerService(); |
---|
| 61 | }else{ |
---|
| 62 | |
---|
| 63 | if ( $_GET['section'] =="allService" ) { |
---|
| 64 | echo displayAllService(); |
---|
| 65 | }else{ |
---|
| 66 | if ( $_GET['section'] =="allSwitch" ) { |
---|
| 67 | echo displayAllSwitch(); |
---|
| 68 | }else{ |
---|
| 69 | if ( $_GET['section'] =="powerUser" ) { |
---|
| 70 | echo displayPowerUser("",""); |
---|
| 71 | }else{ |
---|
| 72 | if ( $_GET['section'] =="powerService" ) { |
---|
| 73 | echo displayPowerService("",""); |
---|
| 74 | }else{ |
---|
| 75 | if ( $_GET['section'] =="delUser") { |
---|
| 76 | echo displayDelUser(); |
---|
| 77 | }else{ |
---|
| 78 | if ( $_GET['section'] =="delPower" ) { |
---|
| 79 | echo displayDelPower(); |
---|
| 80 | }else{ |
---|
| 81 | if ( $_GET['section'] =="delService" ) { |
---|
| 82 | echo displayDelService(); |
---|
| 83 | }else{ |
---|
| 84 | if ( $_GET['section'] =="delSwitch" ) { |
---|
| 85 | echo displayDelSwitch(); |
---|
| 86 | }else{ |
---|
| 87 | if ( $_GET['section'] =="addNetwork" ) { |
---|
| 88 | echo displayAddNetwork(); |
---|
| 89 | }else{ |
---|
| 90 | |
---|
| 91 | if ( $_GET['section'] =="addDevice" ) { |
---|
| 92 | echo displayAddDevice(); |
---|
| 93 | }else{ |
---|
| 94 | if ( $_GET['section'] =="allDevice" ) { |
---|
| 95 | echo displayAllDevice(); |
---|
| 96 | }else{ |
---|
| 97 | if ( $_GET['section'] =="allNetwork" ) { |
---|
| 98 | echo displayAllNetwork(); |
---|
| 99 | }else{ |
---|
| 100 | if ( $_GET['section'] =="delDevice" ) { |
---|
| 101 | echo displayDelDevice(); |
---|
| 102 | }else{ |
---|
| 103 | if ( $_GET['section'] =="delNetwork" ) { |
---|
| 104 | echo displayDelNetwork(); |
---|
| 105 | }else{ |
---|
| 106 | |
---|
| 107 | if ( $_GET['section'] =="genKlaskConf" ) { |
---|
| 108 | echo displayGenKlaskConf(); |
---|
| 109 | }else{ |
---|
| 110 | |
---|
| 111 | if ( $_GET['section'] =="klaskExportdb" ) { |
---|
| 112 | echo displayKlaskExportdb(); |
---|
| 113 | }else{ |
---|
| 114 | if ( $_GET['section'] =="klaskUpdatesw" ) { |
---|
| 115 | echo displayKlaskUpdateSw() ; |
---|
| 116 | }else{ |
---|
| 117 | if ( $_GET['section'] =="klaskUpdatedb" ) { |
---|
| 118 | echo displayKlaskUpdateDb() ; |
---|
| 119 | }else{ |
---|
| 120 | |
---|
| 121 | if ( $_GET['section'] =="klaskExportsw" ) { |
---|
| 122 | echo displayKlaskExportSw() ; |
---|
| 123 | }else{ |
---|
| 124 | if ( $_GET['section'] =="klaskGenmap" ) { |
---|
| 125 | echo displayKlaskGenMap() ; |
---|
| 126 | }else{ |
---|
| 127 | if ( $_GET['section'] =="updateSwitch" ) { |
---|
| 128 | echo displayUpdateSwitch($_GET['switch']); |
---|
| 129 | }else{ |
---|
| 130 | if ( $_GET['section'] =="klaskSearch" ) { |
---|
| 131 | echo displaySearch(); |
---|
| 132 | }else{ |
---|
| 133 | if ( ctrlAuth() == 0 ) { |
---|
| 134 | echo displayAuthUser(); |
---|
| 135 | } |
---|
| 136 | } |
---|
| 137 | } |
---|
| 138 | } |
---|
| 139 | } |
---|
| 140 | } |
---|
| 141 | } |
---|
| 142 | } |
---|
| 143 | } |
---|
| 144 | } |
---|
| 145 | } |
---|
| 146 | } |
---|
| 147 | } |
---|
| 148 | } |
---|
| 149 | } |
---|
| 150 | } |
---|
| 151 | } |
---|
| 152 | } |
---|
| 153 | } |
---|
| 154 | } |
---|
| 155 | } |
---|
| 156 | } |
---|
| 157 | } |
---|
| 158 | } |
---|
| 159 | } |
---|
| 160 | } |
---|
| 161 | } |
---|
| 162 | } |
---|
| 163 | } |
---|
| 164 | } |
---|
| 165 | } |
---|
| 166 | |
---|
| 167 | } |
---|
| 168 | |
---|
| 169 | }else{ |
---|
| 170 | echo contentdefault(); |
---|
| 171 | } |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | ?> |
---|