Ejemplo n.º 1
0
 $validationMsgHtml .= "</div>\n";
 // If the user is at a REAL hotspot, login the user and give him his sign-up minutes right away
 $session = Session::getObject();
 $gw_id = $session->get(SESS_GW_ID_VAR);
 $gw_address = $session->get(SESS_GW_ADDRESS_VAR);
 $gw_port = $session->get(SESS_GW_PORT_VAR);
 $mac = $session->get(SESS_USER_MAC_VAR);
 if ($gw_id && $gw_address && $gw_port) {
     // Make sure the user IDs match
     if ($created_user->getId() == $authenticated_user->getId()) {
         $token = $created_user->generateConnectionToken($mac);
         $redirURL = "http://" . $gw_address . ":" . $gw_port . "/wifidog/auth?token=" . $token;
     } else {
         $redirURL = BASE_NON_SSL_PATH;
     }
     MainUI::redirect($redirURL, 0);
 }
 // Set section of Smarty template
 $smarty->assign('sectionTOOLCONTENT', false);
 $smarty->assign('sectionMAINCONTENT', true);
 // Compile HTML code
 $htmlMainContent = $smarty->fetch("templates/sites/signup.tpl");
 /*
  * Render output (siggess message)
  */
 $ui = MainUI::getObject();
 $ui->addContent('left_area_middle', $htmlToolContent);
 $ui->addContent('main_area_middle', $htmlMainContent);
 // $ui->addContent('page_header', $validationMsgHtml);
 $ui->addContent('main_area_top', $validationMsgHtml);
 $ui->display();
Ejemplo n.º 2
0
    $gw_address = $_REQUEST['gw_address'];
    $session->set(SESS_GW_ADDRESS_VAR, $_REQUEST['gw_address']);
}
if (isset($_REQUEST["gw_port"])) {
    $gw_port = $_REQUEST['gw_port'];
    $session->set(SESS_GW_PORT_VAR, $_REQUEST['gw_port']);
}
if (isset($_REQUEST["gw_id"])) {
    $gw_id = $_REQUEST['gw_id'];
    $session->set(SESS_GW_ID_VAR, $_REQUEST['gw_id']);
}
if (isset($_REQUEST["logout"])) {
    $logout = $_REQUEST['logout'];
}
if (isset($_REQUEST["form_signup"])) {
    MainUI::redirect(BASE_URL_PATH . "signup.php");
    exit;
}
if (isset($_REQUEST["mac"])) {
    $session->set(SESS_USER_MAC_VAR, $_REQUEST['mac']);
    $mac = $_REQUEST['mac'];
}
/*
 * Store original URL typed by user
 */
if (!empty($_REQUEST['url'])) {
    $session->set(SESS_ORIGINAL_URL_VAR, $_REQUEST['url']);
}
/*
 * Start general request parameter processing section
 */