Exemplo n.º 1
0
 /* For Support Contact @
 /*                                    - proquiz@softon.org
 /* version 2.0.0 beta (2 Feb 2011)
 /* Licensed under GPL license:
 /* http://www.gnu.org/licenses/gpl.html
 */
if (file_exists('../config.inc.php')) {
    die('<center>Install Script Disabled.</center>');
}
include_once 'functions.php';
if ($_POST['step'] == 'install') {
    $_SESSION['VALID'] = checkParam($_POST);
    //print_r($_SESSION['VALID']);
    if ($_SESSION['VALID']['status'] == 'yes') {
        $_SESSION['step'] = 3;
        processSetup();
    } else {
        $_SESSION['step'] = 2;
        header('Location:step2.php?error=invalid');
    }
} else {
    header('Location:index.php?error=nodirect');
}
global $i, $c;
function processSetup()
{
    global $i, $c;
    $i = 0;
    $c = 0;
    // Database Connectivity Checking
    if ($error = checkDb($_POST)) {
Exemplo n.º 2
0
             unset($s20Table[$mac]['off']);
             $s20Table[$mac]['st'] = $st;
             $_SESSION['s20Table'] = $s20Table;
             require_once ORVFMS_PATH . "main_page.php";
             displayMainPage($s20Table, $myUrl);
             require_once ORVFMS_PATH . "main_page_scripts.php";
         }
     }
     if ($ip == 0 || $st < 0) {
         require_once ORVFMS_PATH . "setup_page.php";
         displaySetupPage($mac, $s20Table, $myUrl);
     }
 } else {
     if (substr($actionValue, 0, 9) == "procSetup") {
         require_once ORVFMS_PATH . "process_setup.php";
         processSetup($mac, $s20Table, $actionValue);
         require_once ORVFMS_PATH . "main_page.php";
         displayMainPage($s20Table, $myUrl);
         require_once ORVFMS_PATH . "main_page_scripts.php";
     } else {
         if ($actionValue != "back" && $mac != "000000000000" && !array_key_exists('off', $s20Table[$mac])) {
             if ($actionValue == "switch") {
                 $st = $s20Table[$mac]['st'];
                 $newSt = actionAndCheck($mac, $st == 0 ? 1 : 0, $s20Table);
                 $s20Table[$mac]['st'] = $newSt;
                 $swVal = $s20Table[$mac]['switchOffTimer'];
                 if ($st == 0 && $newSt == 1 && $swVal > 0) {
                     $s20Table[$mac]['timerVal'] = $swVal;
                     $s20Table[$mac]['timerAction'] = 0;
                 }
             } else {