Example #1
0
if (!session_id()) {
    session_start();
    $session = session_id();
}
header("Cache-control: private");
// Load the configuration settings
require "../config.settings.php";
require "../library/db.php";
// Activate the database
useDatabase($database_username, $database_password, $database_host, $database_name);
require "../library/commonfunctions.php";
/* The settings, inputs, and users are used by all parts of the system */
$setting = new Setting();
$input = new Input();
$user = new User();
$user->loadSession();
$hideheader = $_REQUEST['hideheader'];
?>
<html>
  <head>
    <meta http-equiv="Content-Language" content="en-us">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="css/sipen.css">
    <?php 
include "includes/javascript.php";
?>
  </head>
<?php 
if ($user->level < 1) {
    $hideheader = 1;
Example #2
0
    Header('HTTP/1.0 303 See Other');
    Header('Location: /');
    exit;
}
include 'config.php';
require_once 'user.class.php';
require_once 'utils.php';
require_once 'db.php';
require_once 'quadkey.php';
$action = $_GET['a'];
$time = microtime(true);
$json = array();
$json['result'] = false;
if ($action != 'hash') {
    $UserManager = new User();
    $UserManager->loadSession();
}
switch ($action) {
    // Проверка для Router Scan и других приложений
    case 'hash':
        $json['result'] = true;
        $json['hash']['state'] = false;
        $magic = '3wifi-magic-word';
        if (isset($_GET['check'])) {
            $check = $_GET['check'];
            if (strlen($check) == 32) {
                $json['hash']['data'] = md5($check . ':' . $magic);
                $json['hash']['state'] = true;
            }
        }
        break;