Example #1
0
<?php

include 'core/init.php';
$template = new Template();
$logs = new Logs();
if (Input::get("action", "GET") == "clear") {
    try {
        Logs::Clear();
        Session::Flash("logs", "success", lang('LOGS_CLEARED'), true);
    } catch (Exception $ex) {
        Session::Flash("logs", "danger", $ex->GetMessage(), true);
    }
    Redirect::To("logs.php");
}
$template->header("Logs");
if (Session::exists('logs')) {
    foreach (Session::Flash('logs') as $error) {
        echo "<div class='alert alert-" . $error['type'] . "' role='alert'>";
        echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>";
        echo "<span class='glyphicon glyphicon-exclamation-sign' aria-hidden='true'></span>";
        echo "&nbsp;" . $error['message'];
        echo "</div>";
    }
}
?>

<div class="messageBox"></div>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><span class="glyphicon glyphicon-alert"></span> <?php 
echo lang("logs");
$cache = 'cache/stats.html';
if (file_exists($cache)) {
    $fromcreation = date('U') - date('U', filemtime($cache));
    //			hours	min		sec
    $time = 1 * 30 * 60;
    //15min
    if ($fromcreation < $time) {
        echo file_get_contents($cache);
        exit;
    }
}
require 'statsModel.php';
require 'templates/template.php';
require 'vendors.php';
$script = '<script type="text/javascript" src="js/awesomechart.js"></script>';
$out = Template::header("Statistics", $script);
$out .= Template::contentStart();
$results = new statsModel();
$stats = $results->getStats();
$out .= "<h1>General Info</h1><br/>";
$out .= "<strong>Total scans: </strong>" . $stats['total'];
$out .= "<strong> Distinct wifis: </strong>" . $stats['totalwifi'] . "<hr/>";
$out .= '<h1>Frequency Statistics</h1><br/>
		<div class="charts_container">
            <canvas id="frequencyCanvas" width="600" height="400">
                Your web-browser does not support the HTML 5 canvas element.
            </canvas>
		</div>';
$datas = "";
$labels = "";
$i = 0;
Example #3
0
<?php

Template::header();
?>

        <!-- Add your site or application content here -->
        <p>Hello world! This is HTML5 Boilerplate.</p>

<?php 
Template::footer();
<?php

require_once 'templates/template.php';
echo Template::header("Index");
echo Template::contentStart();
?>
<h1>Open Wifi Statistics</h1>
<p>This is Open Wifi Statistics project Web Interface.</p>
<h2>Interesting Links</h2>
<p>
	<a href="https://github.com/uberspot/OpenWifiStatistics-web">Web Interface @ Github</a><br/>
	<a href="https://github.com/uberspot/OpenWifiStatistics">Android Client @ Github</a><br/>
	<a href="https://play.google.com/store/apps/details?id=com.ows.OpenWifiStatistics#?t=W251bGwsMSwxLDUwMSwiY29tLm93cy5PcGVuV2lmaVN0YXRpc3RpY3MiXQ..">Android Client @ Google Play</a><br/>
</p>

<?php 
echo Template::contentEnd();
echo Template::footer();
 public function contact()
 {
     $l_oTemplate = new Template();
     $l_oTemplate->header($this->m_sSubject);
     $l_oTemplate->info(['Name' => $this->m_sName, 'Email' => $this->m_sEmail]);
     $l_oTemplate->message('Enquiry', $this->m_sMessage);
     $l_oTemplate->footer();
     $this->m_sMailBody = $l_oTemplate->emailTemplate();
     return $this->submit();
 }
Example #6
0
<?php

/**
 * Author: Rene Kremer
 * Date: 20.08.15
 * Time: 13:27
 * Version 1.0
 *
 * Description: Main App to roll the dices
 */
include 'templates/template.class.php';
include "dice.class.php";
$template = new Template("templates", "img");
$template->header();
$template->head();
// check if first time or reroll
if (isset($_GET["dice"]) || isset($_GET["numberOfDices"])) {
    $dice = new Dice($_GET["dice"], $_GET["numberOfDices"]);
    $value = $_GET["dice"];
} else {
    if (isset($_POST["dice"]) && isset($_POST["dice"])) {
        $dice = new Dice($_POST["dice"], $_POST["numberOfDices"]);
        $value = $_POST["dice"];
    } else {
        //echo file_get_contents("templates/errorWrongDice.tpl");
        return false;
    }
}
if (!$dice->wrongDice && $template->showDice($value)) {
    $dice->roll();
}
Example #7
0
        Session::Flash("usersPage", "success", lang('USERS_ACCOUNT_ACTIVE_SUCCESS'), true);
    } catch (Exception $ex) {
        Session::Flash("usersPage", "danger", $ex->GetMessage(), true);
    }
}
if (Input::get("deactivate") && $user->hasPermission("admin") && Input::get("checkbox")) {
    try {
        foreach (Input::get("checkbox") as $checkbox) {
            $user->deactivate($checkbox);
        }
        Session::Flash("usersPage", "success", lang('USERS_ACCOUNT_DEACTIVE_SUCCESS'), true);
    } catch (Exception $ex) {
        Session::Flash("usersPage", "danger", $ex->GetMessage(), true);
    }
}
$template->header("Users");
if (Session::exists('usersPage')) {
    foreach (Session::Flash('usersPage') as $error) {
        echo "<div class='alert alert-" . $error['type'] . "' role='alert'>";
        echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>";
        echo "<span class='glyphicon glyphicon-exclamation-sign' aria-hidden='true'></span>";
        echo "&nbsp;" . $error['message'];
        echo "</div>";
    }
}
?>
<div class="messageBox"></div>
	<script>
	$(document).ready(function(){
		var editUserModel = $('#editUser');
		var userId;
Example #8
0
<?php

include 'core/init.php';
$posts = new Posts();
$template = new Template();
if (Input::get("action", "GET") == "delete" && Input::Get("id", "GET")) {
    try {
        $posts->delete(Input::Get("id", "GET"));
        Session::Flash("posts", "success", lang('POST_DELETED_SUCCESS'), true);
    } catch (Exception $ex) {
        Session::Flash("posts", "danger", $ex->GetMessage(), true);
    }
    Redirect::To("posts.php");
}
$template->header("Posts");
if (Session::exists('posts')) {
    foreach (Session::Flash('posts') as $error) {
        echo "<div class='alert alert-" . $error['type'] . "' role='alert'>";
        echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>";
        echo "<span class='glyphicon glyphicon-exclamation-sign' aria-hidden='true'></span>";
        echo "&nbsp;" . $error['message'];
        echo "</div>";
    }
}
?>

<div class="messageBox"></div>

<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title"><span class="glyphicon glyphicon-duplicate"></span>  <?php 
Example #9
0
                $user->update(array('fbuserid' => Input::get('fbuserid')), $user->data()->id);
            }
            // Update password
            if (Input::Get("password")) {
                $salt = Hash::salt(32);
                $user->update(array('password' => Hash::make(Input::get('password'), $salt), "salt" => $salt), $user->data()->id);
            }
            Session::Flash("settings", "success", lang('SETTINGS_UPDATED_SUCCESS'), true);
        } catch (Exception $e) {
            echo $e->getMessage();
        }
    } else {
        Session::Flash("settings", "danger", "<ul><li>" . implode("</li><li>", $validation->errors()) . "</li></ul>", false);
    }
}
$template->header("Settings");
if (Session::exists('settings')) {
    foreach (Session::Flash('settings') as $error) {
        echo "<div class='alert alert-" . $error['type'] . "' role='alert'>";
        echo "<a href='#' class='close' data-dismiss='alert' aria-label='close'>&times;</a>";
        echo $error['message'];
        echo "</div>";
    }
}
?>
<div class="messageBox"></div>
<form method='POST' action='' class="settings">
	<div class="row">
		<div class="tabbable tabs-left">
			<div class="col-xs-3">
				<ul class="nav nav-tabs">
<?php

require_once 'statsModel.php';
require_once 'statModel.php';
require_once 'templates/template.php';
$results = new statsModel();
$order = 0;
if (isset($_GET['order'])) {
    $order = $_GET['order'];
}
/* Presentation */
$script = '<script type="text/javascript" src="js/morebutton.js"></script>';
echo Template::header("Results");
echo Template::contentStart();
echo "\n\t<table id='resulttable'>";
switch ($order) {
    case 0:
        echo "<tr><th><a href='?order=2'>Date ↺</a></th>\n\t\t<th>BSSID</th><th>SSID</th>\n\t\t<th><a href='?order=4'>Capabilities ↺</a></th><th>Frequency</th>\n\t\t<th><a href='?order=6'>Power ↺</a></th><th>Provider</th></tr>";
        break;
    case 2:
        echo "<tr><th><a href='?order=3'>Date ↓</a></th>\n\t\t<th>BSSID</th><th>SSID</th>\n\t\t<th><a href='?order=4'>Capabilities ↺</a></th><th>Frequency</th>\n\t\t<th><a href='?order=6'>Power ↺</a></th><th>Provider</th></tr>";
        break;
    case 3:
        echo "<tr><th><a href='?order=2'>Date ↑</a></th>\n\t\t<th>BSSID</th><th>SSID</th>\n\t\t<th><a href='?order=4'>Capabilities ↺</a></th><th>Frequency</th>\n\t\t<th><a href='?order=6'>Power ↺</a></th><th>Provider</th></tr>";
        break;
    case 4:
        echo "<tr><th><a href='?order=2'>Date ↺</a></th>\n\t\t<th>BSSID</th><th>SSID</th>\n\t\t<th><a href='?order=5'>Capabilities ↓</a></th><th>Frequency</th>\n\t\t<th><a href='?order=6'>Power ↺</a></th><th>Provider</th></tr>";
        break;
    case 5:
        echo "<tr><th><a href='?order=2'>Date ↺</a></th>\n\t\t<th>BSSID</th><th>SSID</th>\n\t\t<th><a href='?order=4'>Capabilities ↑</a></th><th>Frequency</th>\n\t\t<th><a href='?order=6'>Power ↺</a></th><th>Provider</th></tr>";
        break;
Example #11
0
<?php

/**
 * Author: Rene Kremer
 * Date: 20.08.15
 * Time: 13:27
 * Version: 1.0
 */
include 'templates/template.class.php';
$template = new Template("templates", "img");
$template->header("header.tpl");
$template->head("head.tpl");
$template->openContent();
$template->setContent('<p>This app rolls a given number of dices</p>

        <form action="rollDice.php" method="post">
        <table>
            <tr>
                <td>Number of Dices:</td>
                <td><input name="numberOfDices" placeholder="Default is 1"/></td>
            </tr>
            </table>
            <table>
            <tr>
            <td><label><input type="radio" name="dice" value="d4"/><img src="img/d4.png" alt="d4"/></label></td>
            <td><label><input type="radio" name="dice" value="d6"/><img src="img/d6.png" alt="d6"/></label></td>
            <td><label><input type="radio" name="dice" value="d8"/><img src="img/d8.png" alt="d8"/></label></td>
            </tr>
            <tr>
            <td/>
            <td><label><input type="radio" name="dice" value="d10"/><img src="img/d10.png" alt="d10"/></label></td>
Example #12
0
<?php

include 'core/init.php';
$template = new Template();
$template->header("Upgrade");
echo "<div class='alert alert-danger'>Note: This upgrade is for version >= 1.5.2 ONLY, if you have old version (<1.5.2) you need to re-install the script.</div>";
try {
    DB::GetInstance()->Query("ALTER TABLE `user_options` ADD COLUMN uniqueLink text");
} catch (Exception $e) {
}
try {
    DB::GetInstance()->Query("ALTER TABLE `fbapps` ADD COLUMN app_auth_link text");
} catch (Exception $e) {
}
try {
    DB::GetInstance()->Query("CREATE TABLE groups_category (\r\n\t\tid integer PRIMARY KEY AUTOINCREMENT,\r\n\t\tuser_id INTEGER,\r\n\t\tfb_id varchar(32),\r\n\t\tgroups text,\r\n\t\tcategory_name varchar(64),\r\n\t\tcreated_at datetime,\r\n\t\tupdated_at datetime\r\n\t)");
} catch (Exception $e) {
}
echo "<div class='alert alert-success'>Your script has been updated to the version 1.6.3</div>";
$template->footer();
Example #13
0
				for (var i in $.goMap.markers) {
					
					var temp = $($.goMap.mapId).data($.goMap.markers[i]);
					
					if(temp.group == group || group == \'all\') {
						markers.push(temp);
					}
				}
				markerclusterer.clearMarkers();
				markerclusterer = new MarkerClusterer($.goMap.map, markers);
				addClusterListeners();
			});
		});
		
    </script>';
$out = Template::header("Map", $script);
$out .= '<div id="map-box"><div id="map"></div></div>';
$out .= '<select id="group">
			<option value="all">Show all wifi spots</option>
			<option value="g1">Show only open</option>
			<option value="g2">Show only wep</option>
			<option value="g3">Show only the rest</option>
			</select>';
$out .= '<img class="img" src="img/1.png" alt="open marker" /> O (OPEN) &bull; 
		<img class="img" src="img/2.png" alt="wep marker" /> W (WEP) &bull; 
		<img class="img" src="img/3.png" alt="other marker" /> S (OTHER SECURE)';
$out .= Template::footer();
$file = fopen($cache, 'w');
fwrite($file, $out);
fclose($file);
echo file_get_contents($cache);