Radek Krejci | 469aab8 | 2012-07-22 18:42:20 +0200 | [diff] [blame^] | 1 | <?php |
| 2 | |
| 3 | if (isset($_POST['action']) && $_POST['action'] == "login") { |
| 4 | apache_setenv("NETCONF_OP", "connect"); |
| 5 | apache_setenv("NETCONF_HOST", "localhost"); |
| 6 | apache_setenv("NETCONF_PORT", "830"); |
| 7 | apache_setenv("NETCONF_USER", $_POST["login"]); |
| 8 | apache_setenv("NETCONF_PASS", $_POST["password"]);
|
| 9 | virtual("/netconf/"); |
| 10 |
|
| 11 | $out = apache_getenv("NETCONF_NSID");
|
| 12 | echo "NSID: ".$out; |
| 13 | |
| 14 | return ;
|
| 15 | } |
| 16 | |
| 17 | if (!isset($_POST['nsid'])) { |
| 18 | /* no session related information known - redirect to the login page */ |
| 19 | header('Location: ./login.php'); |
| 20 | die(); |
| 21 | } |
| 22 | |
| 23 | ?> |