blob: 8a1ccc32c240158f3c5c9774ab3746b89bceee3f [file] [log] [blame]
Radek Krejci469aab82012-07-22 18:42:20 +02001<?php
2
3if (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
17if (!isset($_POST['nsid'])) {
18 /* no session related information known - redirect to the login page */
19 header('Location: ./login.php');
20 die();
21}
22
23?>