Easy-HotSpot/index.php
2018-07-09 12:14:27 +05:30

31 lines
975 B
PHP

<!DOCTYPE html>
<html lang="en">
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<?php
//Start session
if ( !isset($_SESSION) ) session_start();
//Check whether the session variables present or not, and assign them to Ordinary variables, if present.
if (!isset($_SESSION['user_level']) || (trim($_SESSION['user_level']) == '' || (trim($_SESSION['user_level']) >= 4))) {
header("location:login.php");
}
?>
<?php if ( !isset($_SESSION) ) session_start(); ?>
<?php error_reporting(E_ALL);
ini_set('display_errors', 1); ?>
<?php include('header.php'); ?>
<?php include('dbconfig.php'); ?>
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2/Autoload.php';
require_once 'config.php';
try {
$util = new RouterOS\Util($client = new RouterOS\Client("$host", "$user", "$pass"));
$printRequest = new RouterOS\Request('/ip/hotspot/user/print');
include_once('home.php');
}
catch (Exception $e) {
include_once('settings.php');
}
?>