sai now in a working state
This commit is contained in:
parent
6a8ae5479a
commit
e68c4fed17
@ -5,9 +5,13 @@ $autoload->registerFolder(dirname(__FILE__).'/sai','SYSTEM\SAI');
|
||||
|
||||
$autoload->registerFolder(dirname(__FILE__).'/page','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/page/default_page','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/page/login_page','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/page/default_module','SYSTEM\SAI');
|
||||
//$autoload->registerFolder(dirname(__FILE__).'/page/login_page','SYSTEM\SAI');
|
||||
|
||||
$autoload->registerFolder(dirname(__FILE__).'/modules','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/modules/badge_creator','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_sai','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_login','SYSTEM\SAI');
|
||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_error','SYSTEM\SAI');
|
||||
//$autoload->registerFolder(dirname(__FILE__).'/modules/badge_creator','SYSTEM\SAI');
|
||||
|
||||
require_once dirname(__FILE__).'/modules/register_modules.php';
|
||||
@ -1,151 +0,0 @@
|
||||
|
||||
|
||||
/* global variables */
|
||||
|
||||
var fill = "#c7cee0";
|
||||
var stroke = "#112761";
|
||||
var strokeWidth = 0.7;
|
||||
var shape = "circle"; // shield,circle
|
||||
var icon = "dasense/page/default_developer/icons/red_dark/xhdpi/ic_action_achievement.png";
|
||||
|
||||
var iconX = 19;
|
||||
var iconY = 20;
|
||||
|
||||
|
||||
/* jQuery on document ready */
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$("input[name=background-color]").val(fill);
|
||||
$("input[name=stroke-color]").val(stroke);
|
||||
$("input[name=stroke-width]").val(strokeWidth);
|
||||
$("input[name=file-url]").val(icon);
|
||||
$("input[name=iconx]").val(iconX);
|
||||
$("input[name=icony]").val(iconY);
|
||||
$("input[name=shape]").filter("[value="+shape+"]").attr('checked', true);
|
||||
|
||||
drawBadge();
|
||||
|
||||
$("form input").change(function() {
|
||||
updateValues();
|
||||
drawBadge();
|
||||
});
|
||||
|
||||
$("form .btn-submit").click(function() {
|
||||
updateValues();
|
||||
drawBadge();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function updateValues() {
|
||||
fill = $("input[name=background-color]").val();
|
||||
stroke = $("input[name=stroke-color]").val();
|
||||
strokeWidth = $("input[name=stroke-width]").val();
|
||||
shape = $("input[name=shape]:checked").val();
|
||||
icon = $("input[name=file-url]").val();
|
||||
iconX = $("input[name=iconx]").val();
|
||||
iconY = $("input[name=icony]").val();
|
||||
}
|
||||
|
||||
function drawBadge() {
|
||||
var c = $("#badge")[0];
|
||||
var ctx = c.getContext("2d");
|
||||
|
||||
if(shape == 'shield') {
|
||||
//iconY = 30;
|
||||
//iconY = parseInt(iconY) + 10;
|
||||
drawShield(ctx);
|
||||
}
|
||||
else if (shape == 'circle') {
|
||||
//iconY = 20;
|
||||
//iconY = parseInt(iconY) - 10;
|
||||
strokeWidth *= 12;
|
||||
drawCircle(ctx);
|
||||
strokeWidth /= 12;
|
||||
}
|
||||
|
||||
$("input[name=iconx]").val(iconX);
|
||||
$("input[name=icony]").val(iconY);
|
||||
|
||||
var img = new Image();
|
||||
img.onload = function() {
|
||||
ctx.drawImage(img, iconX, iconY);
|
||||
onFinish();
|
||||
}
|
||||
img.src = icon;
|
||||
}
|
||||
|
||||
function onFinish() {
|
||||
var c = $("#badge")[0];
|
||||
var ctx = c.getContext("2d");
|
||||
ctx.restore();
|
||||
ctx.restore();
|
||||
ctx.save();
|
||||
$("a.btn-submit").attr('href', c.toDataURL());
|
||||
}
|
||||
|
||||
function drawShield(ctx) {
|
||||
ctx.canvas.height = 120;
|
||||
ctx.canvas.width = 105;
|
||||
clearCanvas(ctx);
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(0,0);
|
||||
ctx.lineTo(543,0);
|
||||
ctx.lineTo(543,623);
|
||||
ctx.lineTo(0,623);
|
||||
ctx.closePath();
|
||||
ctx.clip();
|
||||
ctx.translate(0,-5);
|
||||
ctx.scale(12,12);
|
||||
ctx.save();
|
||||
ctx.fillStyle = fill;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(4.25,1.34);
|
||||
//ctx.bezierCurveTo(2.9985,1.7142367,1.747,2.0902233,0.4955,2.46621);
|
||||
//ctx.bezierCurveTo(0.58758835,5.2587502,1.2884488,8.6654921,4.25,9.66175);
|
||||
//ctx.bezierCurveTo(7.2442172,8.6940151,7.8773651,5.2291438,8.0045,2.46621);
|
||||
//ctx.bezierCurveTo(6.753,2.0902233,5.5015,1.7142367,4.25,1.33825);
|
||||
ctx.bezierCurveTo(3,1.7,1.75,2,0.5,2.5);
|
||||
ctx.bezierCurveTo(0.6,5.26,1.29,8.67,4.25,9.66);
|
||||
ctx.bezierCurveTo(7.24,8.69,7.88,5.23,8,2.47);
|
||||
ctx.bezierCurveTo(6.75,2,5.5,1.71,4.25,1.34);
|
||||
ctx.closePath();
|
||||
ctx.fill();
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = strokeWidth;
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
function drawCircle(ctx) {
|
||||
ctx.canvas.height = 100;
|
||||
clearCanvas(ctx);
|
||||
ctx.save();
|
||||
//ctx.translate(20,0);
|
||||
ctx.beginPath();
|
||||
ctx.arc(50,50,40,0,2*Math.PI);
|
||||
ctx.fillStyle = fill;
|
||||
ctx.fill();
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = strokeWidth;
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
function clearCanvas(ctx) {
|
||||
var c = $("#badge")[0];
|
||||
// Store the current transformation matrix
|
||||
ctx.save();
|
||||
|
||||
// Use the identity matrix while clearing the canvas
|
||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||
ctx.clearRect(0, 0, c.width, c.height);
|
||||
|
||||
// Restore the transform
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
@ -1,128 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Badge Creator</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link href="dasense/page/default_developer/css/libs/jquery.miniColors.css" rel="stylesheet" />
|
||||
<style type="text/css">
|
||||
|
||||
/* Custom container */
|
||||
.container-narrow {
|
||||
|
||||
}
|
||||
|
||||
.jumbotron {
|
||||
margin: 40px 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.jumbotron h1 {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
.jumbotron .btn {
|
||||
font-size: 21px;
|
||||
padding: 14px 24px;
|
||||
}
|
||||
|
||||
form label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
form label.radio {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
form fieldset {
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
span.minicolors {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container-narrow">
|
||||
|
||||
<div class="masthead">
|
||||
|
||||
<h3 class="muted">Badge Creator 1.0</h3>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
<div class="span5">
|
||||
<form>
|
||||
<legend>Design</legend>
|
||||
<label>Shape</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="shape" id="shape-circle" value="circle" checked>
|
||||
Circle
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="shape" id="shape-shield" value="shield">
|
||||
Shield
|
||||
</label>
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<div class="span2">
|
||||
<label>Background color</label>
|
||||
<input type="minicolors" name="background-color" />
|
||||
</div>
|
||||
<div class="span2">
|
||||
<label>Stroke color</label>
|
||||
<input type="minicolors" name="stroke-color" />
|
||||
</div>
|
||||
</div>
|
||||
<label>Stroke width</label>
|
||||
<input type="text" name="stroke-width" class="input-mini">
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>Icon</legend>
|
||||
<label>File URL</label>
|
||||
<input type="text" name="file-url" style="width:100%;">
|
||||
<span class="help-block">e.g. <code>icons/red_dark/xhdpi/ic_action_achievement.png</code></span>
|
||||
<div class="row">
|
||||
<div class="span2">
|
||||
<label>x-position</label>
|
||||
<input type="text" name="iconx" class="input-small">
|
||||
</div>
|
||||
<div class="span2">
|
||||
<label>y-position</label>
|
||||
<input type="text" name="icony" class="input-small">
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Preview</legend>
|
||||
<canvas id="badge" width="100" height="100"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<a class="btn btn-submit btn-primary" href="#"><i class="icon-arrow-down icon-white"></i> Download</a>
|
||||
<p>
|
||||
<small>Right-click → Save Link as</small>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
${js}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_badge_creator extends \SYSTEM\SAI\SaiModule {
|
||||
|
||||
|
||||
public static function html_js(){ return '<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'sai/page/default_page/js/libs/jquery.miniColors.js').'"></script>'.
|
||||
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'sai/modules/badge_creator/badgecreator.js').'"></script>';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){
|
||||
return \SYSTEM\PAGE\replace::replaceFile( \SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'sai/modules/badge_creator/badgecreator.tpl'),
|
||||
array( 'js' => self::html_js()));}
|
||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_dasense_badge_creator">Badge Creator</a></li>';}
|
||||
}
|
||||
@ -1,16 +1,10 @@
|
||||
<?php
|
||||
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_sys');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_api');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_page');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_sai');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_login');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_error');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_security');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_docu');
|
||||
|
||||
//TODO extern, namespace
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_api_reference');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_badge_creator');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_bonusarea_creator');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_monitoring');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_push_message');
|
||||
\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_dasense_text_handler');
|
||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_sys');
|
||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_api');
|
||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_page');
|
||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_security');
|
||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_docu');
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_api_reference extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'API Reference';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="apireference">API Reference</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_bonusarea_creator extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="bonusareacreator">BonusArea Creator</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_monitoring extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="monitoring">Monitoring</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_push_message extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="pushmessage">Push Message</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_dasense_text_handler extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="texthandler">Text Handler</a></li>';}
|
||||
}
|
||||
@ -1,95 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_api extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){
|
||||
$con = new \SYSTEM\DB\Connection(new \DBD\system());
|
||||
$res = $con->query('SELECT * FROM '.\DBD\APITable::NAME);
|
||||
|
||||
$tree = array();
|
||||
while($row = $res->next()){
|
||||
$tree[] = $row;}
|
||||
|
||||
$tree = self::buildTree($tree, -1);
|
||||
|
||||
$html = self::htmltree($tree,'http://www.da-sense.de/test/api.php?');
|
||||
return $html;
|
||||
}
|
||||
|
||||
private static function htmlTree($tree,$url, $url_rec = null){
|
||||
/*echo "<pre>";
|
||||
print_r($tree);
|
||||
echo "</pre>";
|
||||
die();*/
|
||||
$result = '';
|
||||
if( \is_array($tree) &&
|
||||
\count($tree) > 0 &&
|
||||
\is_array($tree['com'])){
|
||||
|
||||
foreach($tree['com'] as $root){
|
||||
//print_r($root);
|
||||
$url_rec_new = ($root['node'][\DBD\APITable::FIELD_PARENTVALUE] ? $root['node'][\DBD\APITable::FIELD_PARENTVALUE].'&' : '').
|
||||
$root['node'][\DBD\APITable::FIELD_NAME].'=';
|
||||
|
||||
//print_r($url_rec_new);
|
||||
//echo '</br>';
|
||||
|
||||
$result .= '<ul><li>'.
|
||||
$root['node'][\DBD\APITable::FIELD_NAME].' '.
|
||||
'</br>'.
|
||||
'<a href="'.$url.$url_rec.$url_rec_new.($root['node'][\DBD\APITable::FIELD_ALLOWEDVALUES] == 'FLAG' ? '1' : '${COM}').'">'.
|
||||
$url.$url_rec.$url_rec_new.($root['node'][\DBD\APITable::FIELD_ALLOWEDVALUES] == 'FLAG' ? '1' : '${COM}').'</a>';
|
||||
|
||||
if(\is_array($root['par'])){
|
||||
|
||||
foreach($root['par'] as $parentval => $param){
|
||||
$url_rec_new_par = ($parentval ? $parentval : ($root['node'][\DBD\APITable::FIELD_ALLOWEDVALUES] == 'FLAG' ? '1' : '${COM}'));
|
||||
foreach($param as $par){
|
||||
$url_rec_new_par .= '&'.$par[\DBD\APITable::FIELD_NAME].'=${'.$par[\DBD\APITable::FIELD_ALLOWEDVALUES].'}';
|
||||
}
|
||||
$result .= '</br>'.
|
||||
'<a href="'.$url.$url_rec.$url_rec_new.$url_rec_new_par.'">'.$url.$url_rec.$url_rec_new.$url_rec_new_par.'</a>';
|
||||
}
|
||||
}
|
||||
/*echo "<pre>";
|
||||
print_r($root['tree']);
|
||||
echo "</pre>";*/
|
||||
$result .= self::htmlTree($root['tree'],$url, $url_rec.$url_rec_new).
|
||||
'</li></ul>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function buildTree($dbtree, $parentid){
|
||||
$result = array();
|
||||
foreach($dbtree as $node){
|
||||
if( $node[\DBD\APITable::FIELD_PARENTID] == $parentid &&
|
||||
(!$node[\DBD\APITable::FIELD_FLAG] || $node[\DBD\APITable::FIELD_ALLOWEDVALUES] == 'FLAG')){
|
||||
/*if($node[\DBD\APITable::FIELD_FLAG] && $node[\DBD\APITable::FIELD_ALLOWEDVALUES] != 'FLAG'){
|
||||
$result['par'][$node[\DBD\APITable::FIELD_PARENTVALUE]][] = $node;
|
||||
} else {
|
||||
$result['com'][] = array('tree' => self::buildTree($dbtree,$node[\DBD\APITable::FIELD_ID]),'node' => $node);}*/
|
||||
$pars = array();
|
||||
foreach($dbtree as $node2){
|
||||
if( $node2[\DBD\APITable::FIELD_PARENTID] == $node[\DBD\APITable::FIELD_ID] &&
|
||||
$node2[\DBD\APITable::FIELD_FLAG] && $node2[\DBD\APITable::FIELD_ALLOWEDVALUES] != 'FLAG'){
|
||||
$pars[$node2[\DBD\APITable::FIELD_PARENTVALUE]][] = $node2;
|
||||
}
|
||||
}
|
||||
$result['com'][] = array('tree' => self::buildTree($dbtree,$node[\DBD\APITable::FIELD_ID]),
|
||||
'node' => $node,
|
||||
'par' => $pars);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_api">SYS API</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_docu extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="documentation">Documentation</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS Error';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="SYS Error">SYS Error</a></li>';}
|
||||
}
|
||||
41
sai/modules/saimod_sys_error/saimod_sys_error.php
Normal file
41
sai/modules/saimod_sys_error/saimod_sys_error.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_content(){
|
||||
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||
$res = $con->query('SELECT * FROM system.sys_log ORDER BY time DESC LIMIT 100;');
|
||||
|
||||
|
||||
$now = microtime(true);
|
||||
|
||||
$result = '<table class="table table-hover table-condensed" style="position:absolute; left:0;overflow: auto;">'.
|
||||
'<tr>'.'<th>'.'time ago in sec'.'</th>'.'<th>'.'time'.'</th>'.'<th>'.'class'.'</th>'.'<th>'.'message'.'</th>'.'<th>'.'code'.'</th>'.'<th>'.'file'.'</th>'.'<th>'.'line'.'</th>'.'<th>'.'ip'.'</th>'.'<th>'.'querytime'.'</tr>';
|
||||
while($r = $res->next()){
|
||||
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</tr>';
|
||||
}
|
||||
$result .= '</table>';
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
private static function tablerow_class($class){
|
||||
switch($class){
|
||||
case 'SYSTEM\LOG\INFO': case 'INFO':
|
||||
return 'success';
|
||||
case 'SYSTEM\LOG\DEPRECATED': case 'DEPRECATED':
|
||||
return 'info';
|
||||
case 'SYSTEM\LOG\ERROR': case 'ERROR':
|
||||
return 'error';
|
||||
case 'SYSTEM\LOG\WARNING': case 'WARNING':
|
||||
return 'warning';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_error">SYS Error</a></li>';}
|
||||
public static function right_public(){return false;}
|
||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||
}
|
||||
18
sai/modules/saimod_sys_login/login.tpl
Normal file
18
sai/modules/saimod_sys_login/login.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
Please login for developer access.
|
||||
</br>
|
||||
<font color="red">${message}</font>
|
||||
|
||||
<form id='login' action='?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_login' method='post' accept-charset='UTF-8'>
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<input type='hidden' name='submitted' id='submitted' value='1'/>
|
||||
|
||||
<label for='username' >UserName:</label>
|
||||
<input type='text' name='username' id='username' maxlength="50" />
|
||||
|
||||
<label for='password' >Password:</label>
|
||||
<input type='password' name='password' id='password' maxlength="50" />
|
||||
|
||||
<input type='submit' name='Submit' value='Submit' />
|
||||
</fieldset>
|
||||
</form>
|
||||
1
sai/modules/saimod_sys_login/login_success.tpl
Normal file
1
sai/modules/saimod_sys_login/login_success.tpl
Normal file
@ -0,0 +1 @@
|
||||
Login successful.
|
||||
19
sai/modules/saimod_sys_login/saimod_sys_login.php
Normal file
19
sai/modules/saimod_sys_login/saimod_sys_login.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_login extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_content(){
|
||||
|
||||
if( isset($_POST['username']) && isset($_POST['password']) &&
|
||||
\SYSTEM\SECURITY\Security::login(\SYSTEM\system::getSystemDBInfo(), $_POST['username'], sha1($_POST['password']), md5($_POST['password']))){
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/login_success.tpl'), array());}
|
||||
|
||||
$vars = array();
|
||||
$vars['message'] = \SYSTEM\SECURITY\Security::isLoggedIn() ? 'You are already logged in! Maybe you dont have the required rights ;-).' : 'Not logged in!';
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/login.tpl'), $vars);
|
||||
}
|
||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_login">SYS Login</a></li>';}
|
||||
public static function right_public(){return true;}
|
||||
public static function right_right(){}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_page extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS Page';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="SYS PAGE">SYS PAGE</a></li>';}
|
||||
}
|
||||
58
sai/modules/saimod_sys_sai/carousel.tpl
Normal file
58
sai/modules/saimod_sys_sai/carousel.tpl
Normal file
@ -0,0 +1,58 @@
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Design.Simple.Fast.Reliable.Innovative.</h3>
|
||||
<h4 class="text-info">We write awesome code.</h4>
|
||||
</div>
|
||||
<br>
|
||||
<div id="myCarousel" class="carousel slide">
|
||||
<!-- Carousel items -->
|
||||
<div class="carousel-inner">
|
||||
<div class="active item">
|
||||
<img class="carousel-img" src="dasense/page/default_developer/img/carousel/webseite.jpg" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>TK Forschungspraktikum WS 2012/2013</h4>
|
||||
<p>The Team</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img class="carousel-img" src="dasense/page/default_developer/img/carousel/verteidigung_immanuel.jpg" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>Project head: "Hööööy sieee.." ;-D</h4>
|
||||
<p>Verteidigung Immanuel (December 2012)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img class="carousel-img" src="dasense/page/default_developer/img/carousel/webseite.jpg" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>App: Noisemap</h4>
|
||||
<p>Version 3.0 of Noisemap is now available for <a href="https://play.google.com/store/apps/details?id=de.tudarmstadt.tk.noisemap">Android</a> and iOS</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img class="carousel-img" src="dasense/page/default_developer/img/carousel/webseite.jpg" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>Website: <a href="http://www.da-sense.de">da-sense.de</a></h4>
|
||||
<p><em>da_sense</em> platform with new design</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img class="carousel-img" src="dasense/page/default_developer/img/carousel/echo_noisemap.jpg" alt="">
|
||||
<div class="carousel-caption">
|
||||
<h4>Press: <a href="http://www.echo-online.de/region/darmstadt/Smartphone-App-Noisemap-ermittelt-Laermdaten;art1231,3553997" target="_blank">Echo Article</a></h4>
|
||||
<p>>> Smartphone-App „Noisemap“ ermittelt Lärmdaten <<</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<embed type="application/x-shockwave-flash" src="http://www.1730live.de/typo3conf/ext/rgmediaimages/res/mediaplayer.swf" width="1200" height="650"
|
||||
id="mpl" quality="high" allowscriptaccess="always" allowfullscreen="true" wmode="transparent"
|
||||
flashvars="file=http://87.106.73.176/_1730live/videos/20130115_learm_app_FLV_MSC.flv&width=1200&height=650&frontcolor=0x#FFFFFF&lightcolor=0x#FFFFFF&screencolor=0x#FFFFFF&image=http://www.1730live.de/fileadmin/templates/main/bilder/jlw_startbild_neu3.jpg&showstop=true&autostart=false">
|
||||
<div class="carousel-caption">
|
||||
<h4>Media: <a href="http://www.1730live.de/aktuell/neu/news-details/datum/2013/01/15/laerm-app-entwickelt.html" target="_blank">Sat1 Video - "Lärm-App entwickelt"</a></h4>
|
||||
<p>>> In Darmstadt hat ein Forscherteam der Technischen Universität eine App entwickelt, mit der Smartphone-Besitzer Lärmdaten sammeln und so Messwerte für eine Lärmkarte liefern. <<</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Carousel nav -->
|
||||
<a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
|
||||
<a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
|
||||
</div>
|
||||
10
sai/modules/saimod_sys_sai/saimod_sys_sai.php
Normal file
10
sai/modules/saimod_sys_sai/saimod_sys_sai.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_sai extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_content(){return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_sai/carousel.tpl'), array());}
|
||||
public static function html_li_menu(){return '<li class="active"><a href="#" id=".SYSTEM.SAI.saimod_sys_sai">SYS SAI</a></li>';}
|
||||
public static function right_public(){return true;}
|
||||
public static function right_right(){}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_security extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS Security';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="SYS Security">SYS Security</a></li>';}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_sys extends \SYSTEM\SAI\SaiModule {
|
||||
public static function html_js(){ return '';}
|
||||
public static function html_css(){return '';}
|
||||
public static function html_content(){return 'SYS';}
|
||||
public static function html_li_menu(){return '<li><a href="#" id="SYS">SYS</a></li>';}
|
||||
}
|
||||
26
sai/page/default_module/default_module.php
Normal file
26
sai/page/default_module/default_module.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class default_module extends \SYSTEM\PAGE\Page {
|
||||
|
||||
private $module = null;
|
||||
private $post_get = null;
|
||||
|
||||
public function __construct($module,$post_get){
|
||||
$this->module = $module;
|
||||
$this->post_get = $post_get;}
|
||||
|
||||
public function html(){
|
||||
if($this->module != null){
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
if( $this->module &&
|
||||
\array_search($this->module, $mods) !== false &&
|
||||
( \call_user_func(array($this->module, 'right_public')) ||
|
||||
\call_user_func(array($this->module, 'right_right')))){
|
||||
return \call_user_func(array($this->module, 'html_content'),array($this->post_get));}
|
||||
}
|
||||
|
||||
return "Could not find Module";
|
||||
}
|
||||
}
|
||||
@ -3,54 +3,32 @@
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class default_page extends \SYSTEM\PAGE\Page {
|
||||
|
||||
private $module = NULL;
|
||||
private $pg = NULL;
|
||||
|
||||
public function __construct($module = NULL, $pg = NULL){
|
||||
$this->module = \str_replace('.', '\\', $module);
|
||||
$this->pg = $pg;}
|
||||
|
||||
private function menu(){
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
|
||||
private function menu(){
|
||||
$result = '';
|
||||
|
||||
$result = '<li><a href="#" id="SAI">SAI</a></li>';
|
||||
foreach($mods as $mod){
|
||||
$result .= \call_user_func(array($mod, 'html_li_menu'));}
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
foreach($mods as $mod){
|
||||
if(\call_user_func(array($mod, 'right_public')) ||
|
||||
\call_user_func(array($mod, 'right_right'))){
|
||||
$result .= \call_user_func(array($mod, 'html_li_menu'));}
|
||||
}
|
||||
return $result.'</ul>';
|
||||
}
|
||||
|
||||
private function content(){
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
if( $this->module &&
|
||||
\array_search($this->module, $mods) !== false){
|
||||
return \call_user_func(array($this->module, 'html_content'),array($this->pg));}
|
||||
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'page/default_page/carousel.tpl'), array());
|
||||
}
|
||||
|
||||
private function css(){
|
||||
$result = '<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/css/libs/bootstrap.min.css').'" type="text/css" />'.
|
||||
'<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/css/index.css').'" type="text/css" />';
|
||||
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
if( $this->module &&
|
||||
\array_search($this->module, $mods) !== false){
|
||||
$result .= \call_user_func(array($this->module, 'html_css'));}
|
||||
|
||||
'<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/css/index.css').'" type="text/css" />';
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function js(){
|
||||
//if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo() , \SYSTEM\SECURITY\RIGHTS::SYS_SAI)){
|
||||
// $login = new \SYSTEM\SAI\login_page();
|
||||
// return $login->html();}
|
||||
$result = '<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/js/libs/jquery.min.js').'" type="text/javascript"></script>'.
|
||||
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/js/libs/bootstrap.min.js').'" type="text/javascript"></script>'.
|
||||
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/js/index.js').'" type="text/javascript"></script>';
|
||||
|
||||
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||
if( $this->module &&
|
||||
\array_search($this->module, $mods) !== false){
|
||||
$result .= \call_user_func(array($this->module, 'html_js'));}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -62,11 +40,7 @@ class default_page extends \SYSTEM\PAGE\Page {
|
||||
|
||||
$vars['menu'] = $this->menu();
|
||||
$vars['navimg'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG);
|
||||
|
||||
//TODO
|
||||
new \SYSTEM\LOG\DEPRECATED();
|
||||
if($this->module != NULL){
|
||||
return $this->content();}
|
||||
|
||||
|
||||
//$vars['PATH_IMG'] = SYSTEM\WEBPATH(new PPAGE(),'default_developer/img/');
|
||||
//$vars['PATH_LIB'] = SYSTEM\WEBPATH(new PLIB());
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
// initialize content
|
||||
$('div#content-wrapper').load('./?action=developer&sai_mod=SAI', function() {
|
||||
$('div#content-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_sai', function() {
|
||||
$('.carousel').carousel();
|
||||
});
|
||||
|
||||
|
||||
@ -1,65 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Account: Login</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Account: Push Message</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Account: Registration</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Data: Upload</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Data: Series</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Achievements</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Badges</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Bonus Areas</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Ranking</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Statistics</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Incentive systems: Titles</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,58 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | REST API Reference 3.0</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
|
||||
<link href="dasense/page/default_developer/css/apireference.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">REST API Reference 3.0</h3>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div id="div-nav" class="span2">
|
||||
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Overview</li>
|
||||
<li class="active"><a href="#" id="overview_request">Request format</a></li>
|
||||
<li><a href="#" id="overview_response">Response format</a></li>
|
||||
<li><a href="#" id="overview_statuscode">Status codes</a></li>
|
||||
|
||||
<li class="nav-header">Account</li>
|
||||
<li><a href="#" id="account_login">Login</a></li>
|
||||
<li><a href="#" id="account_registration">Registration</a></li>
|
||||
<li><a href="#" id="account_push">Push Service</a></li>
|
||||
|
||||
<li class="nav-header">Data</li>
|
||||
<li><a href="#" id="data_acquisition">Upload</a></li>
|
||||
<li><a href="#" id="data_series">Measurement Series</a></li>
|
||||
|
||||
<li class="nav-header">Incentive Systems</li>
|
||||
<li><a href="#" id="incentive_statistics">Statistics</a></li>
|
||||
<li><a href="#" id="incentive_achievements">Achievements</a></li>
|
||||
<li><a href="#" id="incentive_badges">Badges</a></li>
|
||||
<li><a href="#" id="incentive_ranking">Ranking</a></li>
|
||||
<li><a href="#" id="incentive_titles">Titles</a></li>
|
||||
<li><a href="#" id="incentive_bonusareas">Bonus areas</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div id="div-content" class="span10"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="dasense/page/default_developer/js/apireference.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Overview: Request format</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Overview: Response format</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,64 +0,0 @@
|
||||
<div class="span8">
|
||||
<legend>Overview: Status codes</legend>
|
||||
ahfgjasdgh sdgs igh sdghso dghjsghjs ghoishg oij
|
||||
shguioh sowigh sioghsiogh sdghisd ghsg sdbfhgsjdfhgaiosöhfgaOGasdg
|
||||
asdgoshgdhsdghsudfzhgiedjhioerergr
|
||||
herheioghweoirgöioeroihgeoi
|
||||
<p>
|
||||
<br>
|
||||
<pre>?ctrl=account&mthd=login</pre>
|
||||
<br>
|
||||
</p>
|
||||
<p><h5>Required parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>username</td>
|
||||
<td>string</td>
|
||||
<td>Username</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>password</td>
|
||||
<td>SHA1(string)</td>
|
||||
<td>SHA1 encoded password</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>pswdold</td>
|
||||
<td>MD5(string)</td>
|
||||
<td>(Deprecated)<br>
|
||||
MD5 encoded password</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><h5>Optional parameters</h5></p>
|
||||
<table class="table table-striped table-hover table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Parameter</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>locale</td>
|
||||
<td>string</td>
|
||||
<td>Update user's default locale.<br>
|
||||
Available locales: [de,en]
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Example</legend>
|
||||
</div>
|
||||
@ -1,110 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Bonus Area Creator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="dasense/page/default_developer/css/libs/bootstrap-switch.css" rel="stylesheet">
|
||||
<link href="dasense/page/default_developer/css/libs/bootstrap-timepicker.min.css" rel="stylesheet"/>
|
||||
<link href="dasense/page/default_developer/css/libs/datepicker.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Bonus Area Creator 2.0</h3>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="row-fluid">
|
||||
<div class="span8">
|
||||
<div id="map_canvas" style="width:100%; height:695px"></div>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<legend>Bonus Area</legend>
|
||||
<form>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Coordinates</label>
|
||||
<span class="muted" id="field_coords">(49.123123, 8.123125)</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Radius</label>
|
||||
<span class="muted" id="field_radius">500.00 m</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Exploration</label>
|
||||
<span class="muted" id="field_exploration">34.90 %</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Formatted address</label>
|
||||
<span class="muted" id="field_address">Luisenplatz, Darmstadt</span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputLabel">Label</label>
|
||||
<div class="controls">
|
||||
<input class="input-xlarge" type="text" id="inputLabel" placeholder="Required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputMultiplier">Multiplier</label>
|
||||
<div class="controls input-append">
|
||||
<input class="input-xlarge" style="width: 60px" type="number" min="1" max="100" step="0.1" value="1.0" id="inputMultiplier">
|
||||
<span class="add-on">x</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" style="width: 100%">
|
||||
<label class="control-label">Start time</label>
|
||||
<div class="row-fluid controls">
|
||||
<div class="span5">
|
||||
<div class="input-append date" id="datepicker" data-date="01-02-2013" data-date-format="dd-mm-yyyy" style="margin-right: 10px">
|
||||
<input size="16" type="text" style="width: 110px;" value="01-02-2013">
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="span5">
|
||||
<div class="input-append bootstrap-timepicker">
|
||||
<input id="timepicker" data-minute-step="5" data-show-meridian="false" type="text" class="input-small">
|
||||
<span class="add-on"><i class="icon-time"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputDuration">Duration</label>
|
||||
<div class="controls row-fluid">
|
||||
<div class="input-append span3">
|
||||
<input class="input-xlarge" type="number" value="1" min="0" style="width: 40px" id="inputDuration">
|
||||
<span class="add-on">d</span>
|
||||
</div>
|
||||
<div class="input-append span3">
|
||||
<input class="input-xlarge" type="number" value="6" max="23" min="0" style="width: 40px" id="inputDuration">
|
||||
<span class="add-on">h</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">Push Notification to all</label>
|
||||
<div class="switch switch-small">
|
||||
<input type="checkbox">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-submit btn-primary"><i class="icon-plus icon-white"></i> Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="dasense/page/default_developer/js/libs/geoFunctions.js"></script>
|
||||
<script src="dasense/page/default_developer/js/bonusareacreator.js"></script>
|
||||
<script src="dasense/page/default_developer/js/libs/jquery.switch.js"></script>
|
||||
<script src="dasense/page/default_developer/js/libs/bootstrap-timepicker.min.js"></script>
|
||||
<script src="dasense/page/default_developer/js/libs/bootstrap-datepicker.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,14 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<div>TODO client stuff</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,48 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Documentation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Documentation</h3>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div id="div-nav" class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div class="span2">
|
||||
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Server</li>
|
||||
<li class="active"><a href="#" id="server_architecture">Architecture</a></li>
|
||||
<li><a href="#" id="server_database">Database</a></li>
|
||||
<li><a href="#" id="server_incentive">Incentive systems</a></li>
|
||||
<li><a href="#" id="server_queue">Message Queue</a></li>
|
||||
<li><a href="#" id="server_nodejs">Node.js</a></li>
|
||||
<li><a href="#" id="server_push">Push Service</a></li>
|
||||
<li><a href="#" id="server_barea">Cronjob</a></li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="nav nav-list">
|
||||
<li class="nav-header">Client</li>
|
||||
<li><a href="#" id="client_empty">####</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div id="div-content" class="span10"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="dasense/page/default_developer/js/documentation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,3 +0,0 @@
|
||||
<legend>Architecture</legend>
|
||||
<label>@todo</label>
|
||||
<img src="dasense/page/default_developer/img/flow_upload.png" style="width: 80%">
|
||||
@ -1,29 +0,0 @@
|
||||
<legend><img src="dasense/page/default_developer/img/cronjob-logo.png" style="height: 32px"> Cronjob: Bonus Area Creator</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Version</dt>
|
||||
<dd>1.2</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Language</dt>
|
||||
<dd>Java 1.6</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Execution time</dt>
|
||||
<dd>Daily: 9 a.m., 3 p.m.</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Paths</dt>
|
||||
<dd>/home/dasense/cron/bonusarea_cronjob.jar (jar)<br>
|
||||
/home/dasense/cron/bonusarea_cronjob.sh (shell script)<br>
|
||||
/... (config)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Algorithm</dt>
|
||||
<dd>?? Random, based on POIs, around measurement areas of active users ??</dd>
|
||||
</dl>
|
||||
@ -1,78 +0,0 @@
|
||||
<legend><img src="dasense/page/default_developer/img/postgresql-logo.png" style="height: 32px"> Database</legend>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Server</dt>
|
||||
<dd>PostgreSQL 9.2.2<br>Spatial: PostGIS 2.0.2</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Host</dt>
|
||||
<dd>212.72.183.108</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Port</dt>
|
||||
<dd>5432</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Database</dt>
|
||||
<dd>dasense (spatial enabled)</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>User</dt>
|
||||
<dd>dasense</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Website</dt>
|
||||
<dd><a href="http://www.postgresql.org/" target="_blank">http://www.postgresql.org</a></dd>
|
||||
<dd><a href="http://postgis.net/" target="_blank">http://postgis.net</a></dd>
|
||||
</dl>
|
||||
|
||||
<legend>Schemata</legend>
|
||||
|
||||
<p>
|
||||
<dl>
|
||||
<dt>dasense_system</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<caption>@todo: UML-Diagram</caption>
|
||||
<img src="dasense/page/default_developer/img/carousel/webseite.jpg" class="img-rounded">
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl>
|
||||
<dt>dasense_todo</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<caption>@todo: UML-Diagram</caption>
|
||||
<img src="dasense/page/default_developer/img/carousel/webseite.jpg" class="img-rounded">
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl>
|
||||
<dt>dasense_data</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<caption>@todo: UML-Diagram</caption>
|
||||
<img src="dasense/page/default_developer/img/carousel/webseite.jpg" class="img-rounded">
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl>
|
||||
<dt>dasense_data_processed</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<caption>@todo: UML-Diagram</caption>
|
||||
<img src="dasense/page/default_developer/img/carousel/webseite.jpg" class="img-rounded">
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl>
|
||||
<dt>dasense_definitions</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<caption>@todo: UML-Diagram</caption>
|
||||
<img src="dasense/page/default_developer/img/carousel/webseite.jpg" class="img-rounded">
|
||||
</p>
|
||||
@ -1,220 +0,0 @@
|
||||
<legend>Incentive systems</legend>
|
||||
<p>Incentive systems are features with the aim to motivate user to use Noisemap and increase data quantity. But some of them also influence data quality.
|
||||
</p><br>
|
||||
<legend>Statistics</legend>
|
||||
Statistics give a complete feedback of user's measurement behaviour.
|
||||
<dl class="dl-horizontal">
|
||||
<dt># Data</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt># Series</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Total time</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Total distance</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Avg. Speed</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Bonus Areas</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Exploration factor</dt>
|
||||
<dd>...</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Daytime behaviour</dt>
|
||||
<dd>... + graph sample</dd>
|
||||
</dl>
|
||||
<br>
|
||||
<legend>Achievements</legend>
|
||||
Achievements are level-based honours for specific measurement behaviour of users.<br>
|
||||
@todo: generate from database
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Expert</th>
|
||||
<th>Traveler</th>
|
||||
<th>Routinier</th>
|
||||
<th>Follower</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="warning">
|
||||
<td>Description</td>
|
||||
<td># data</td>
|
||||
<td>distance</td>
|
||||
<td># consecutive days</td>
|
||||
<td># data within bonus area</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><i class="icon-star"></i></td>
|
||||
<td>> 100</td>
|
||||
<td>> 1000m</td>
|
||||
<td>> 2d</td>
|
||||
<td>> 50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span><i class="icon-star"></span><span><i class="icon-star"></span></td>
|
||||
<td>...</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<legend>Badges</legend>
|
||||
Badges are unique honours for special measurement activities.<br>
|
||||
@todo: generate from database
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:32px;">Badge</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><img src="dasense/page/default_developer/img/badge.png" style="width: 28px; height:28px;"></td>
|
||||
<td>Newbie</td>
|
||||
<td>First measurement series</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="dasense/page/default_developer/img/badge.png" style="width: 28px; height:28px;"></td>
|
||||
<td>Tourist</td>
|
||||
<td>Visit more than two countries</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><img src="dasense/page/default_developer/img/badge.png" style="width: 28px; height:28px;"></td>
|
||||
<td>...</td>
|
||||
<td>...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<legend>Point system</legend>
|
||||
<p>Measurement data will be rewarded by points. These points are used for temporal (cf. global ranking) and
|
||||
location-based (cf. Titles) ranking.</p>
|
||||
|
||||
<caption>Data points</caption>
|
||||
<pre>P = 1 + 1</pre>
|
||||
|
||||
<caption>Series points</caption>
|
||||
<pre>P = 1 + 1</pre>
|
||||
|
||||
<caption>Exploration factor</caption>
|
||||
<pre>P = 1 + 1</pre>
|
||||
|
||||
<caption>Bonus Area multiplier</caption>
|
||||
<pre>P = 1 + 1</pre>
|
||||
|
||||
<caption>Accuracy factor</caption>
|
||||
<pre>P = 1 + 1</pre>
|
||||
|
||||
<br>
|
||||
<legend>Ranking</legend>
|
||||
The ranking shows the best global <i>"Noisemappers"</i> in a specific time range.
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Criterium</dt>
|
||||
<dd>Points (descending)</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Time range</dt>
|
||||
<dd>Total</dd>
|
||||
<dd>Monthly</dd>
|
||||
<dd>Weekly</dd>
|
||||
<dd>Daily</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Location</dt>
|
||||
<dd>Worldwide</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<br>
|
||||
<legend>Titles</legend>
|
||||
Titles are location-based incentive ranking system, i.e. users get points for specific locality (e.g. countries, cities) when they measured inside the corresponding locality.
|
||||
The best <i>"Noisemappers"</i> of a locality obtain a special title (e.g. Mayor, President).
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Criterium</dt>
|
||||
<dd>Points (descending)</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Ranking</dt>
|
||||
<dd>Top 5</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Locality</dt>
|
||||
<dd>World</dd>
|
||||
<dd>Continents</dd>
|
||||
<dd>Countries</dd>
|
||||
<dd>Cities with more than 100.000 inhabitants</dd>
|
||||
</dl>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>World</th>
|
||||
<th>Continent</th>
|
||||
<th>Country</th>
|
||||
<th>City (> 100.000 pop.)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Available Title</td>
|
||||
<td>God</td>
|
||||
<td>?</td>
|
||||
<td>President,<br>Vice-President</td>
|
||||
<td>Mayor</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Polygon Coverage</td>
|
||||
<td>100%</td>
|
||||
<td>100%</td>
|
||||
<td>100%</td>
|
||||
<td>92%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Polygon data based on OSM:
|
||||
<ul>
|
||||
<li><a href="http://openstreetmap.de" target="_blank">http://openstreetmap.de</a></li>
|
||||
<li><a href="http://wiki.openstreetmap.org/wiki/Nominatim" target="_blank">http://wiki.openstreetmap.org/wiki/Nominatim</a></li>
|
||||
<li><a href="http://nominatim.openstreetmap.org/" target="_blank">http://nominatim.openstreetmap.org/</a></li>
|
||||
<li><a href="http://www.naturalearthdata.com/downloads/10m-cultural-vectors/" target="_blank">http://www.naturalearthdata.com/downloads/10m-cultural-vectors</a></li>
|
||||
</ul>
|
||||
Locality hierarchy, capitals, population based on
|
||||
<ul>
|
||||
<li><a href="http://unstats.un.org/unsd/demographic/products/dyb/dyb2011.htm" target="_blank">http://unstats.un.org/unsd/demographic/products/dyb/dyb2011.htm</a></li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<legend>Bonus Areas</legend>
|
||||
Bonus areas are pre-defined circular areas. If a user measures inside these areas, his points for the measurement data will be multiplied with a specific factor defining by the bonus area.
|
||||
@ -1,62 +0,0 @@
|
||||
<legend><img src="dasense/page/default_developer/img/nodejs-logo.png" style="height: 32px"></legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Server</dt>
|
||||
<dd>Node.js 0.8.18</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Description</dt>
|
||||
<dd>Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Website</dt>
|
||||
<dd><a href="http://nodejs.org" target="_blank">http://nodejs.org</a></dd>
|
||||
</dl>
|
||||
|
||||
<legend>Plugins</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>AMQP</dt>
|
||||
<dd><a href="https://github.com/postwait/node-amqp" target="_blank">amqp</a></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>PostgreSQL</dt>
|
||||
<dd><a href="https://github.com/brianc/node-postgres" target="_blank">pg</a></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>GCM</dt>
|
||||
<dd><a href="https://github.com/ToothlessGear/node-gcm" target="_blank">node-gcm</a></dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>APNS</dt>
|
||||
<dd><a href="https://github.com/argon/node-apn" target="_blank">apn</a></dd>
|
||||
</dl>
|
||||
|
||||
<legend>Modules</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Points</dt>
|
||||
<dd>Evaluate points</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Titles</dt>
|
||||
<dd>Evaluate titles</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Push Msg</dt>
|
||||
<dd>Send push notification to specified users</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>...</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<legend>Scripts</legend>
|
||||
@ -1,67 +0,0 @@
|
||||
<legend><img src="dasense/page/default_developer/img/gcm-logo.png" style="height: 32px"> GCM</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>Google Cloud Messaging</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>OS</dt>
|
||||
<dd>Android</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Account</dt>
|
||||
<dd>smartcivilsecurity@googlemail.com</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>API-Key</dt>
|
||||
<dd>#####</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Website</dt>
|
||||
<dd><a href="http://developer.android.com/google/gcm/index.html" target="_blank">http://developer.android.com/google/gcm/index.html</a></dd>
|
||||
</dl>
|
||||
|
||||
<pre>
|
||||
@todo: Message formats
|
||||
</pre>
|
||||
<br>
|
||||
<legend><img src="dasense/page/default_developer/img/apns.png" style="height: 32px"> APNS</legend>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Name</dt>
|
||||
<dd>Apple Push Notification Service</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>OS</dt>
|
||||
<dd>iOS</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Account</dt>
|
||||
<dd>smartcivilsecurity@googlemail.com</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Certificate</dt>
|
||||
<dd>#####</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Key</dt>
|
||||
<dd>#####</dd>
|
||||
</dl>
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Website</dt>
|
||||
<dd><a href="http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html" target="_blank">
|
||||
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html</a></dd>
|
||||
</dl>
|
||||
|
||||
<pre>
|
||||
@todo: Message formats
|
||||
</pre>
|
||||
@ -1,60 +0,0 @@
|
||||
<legend><img src="dasense/page/default_developer/img/rabbitmq-logo.jpg" style="height: 32px"> Message Queue</legend>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Server</dt>
|
||||
<dd>RabbitMQ 3.0.2</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Protocol</dt>
|
||||
<dd>AMQP</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>URL</dt>
|
||||
<dd>amqp://<user>:<password>@212.72.183.108:5672/</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Virtual host</dt>
|
||||
<dd>/</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>User</dt>
|
||||
<dd>guest (default)</dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>WebUI</dt>
|
||||
<dd><a href="http://212.72.183.108:15672" target="_blank">http://212.72.183.108:15672</a></dd>
|
||||
</dl>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>Website</dt>
|
||||
<dd><a href="http://www.rabbitmq.com" target="_blank">http://www.rabbitmq.com</a></dd>
|
||||
</dl>
|
||||
|
||||
<legend>Queues</legend>
|
||||
<p>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>incentive</dt>
|
||||
<dd>Incentive stuff</dd>
|
||||
</dl>
|
||||
<pre>
|
||||
@todo: Message format
|
||||
</pre>
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>pushmsg</dt>
|
||||
<dd>Push messages</dd>
|
||||
</dl>
|
||||
<pre>
|
||||
@todo: Message format
|
||||
</pre>
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<dl class="dl-horizontal">
|
||||
<dt>imggen</dt>
|
||||
<dd>Image generation (Map preview with user's measured values)</dd>
|
||||
</dl>
|
||||
<pre>
|
||||
@todo: Message format
|
||||
</pre>
|
||||
</p>
|
||||
@ -1,73 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Monitoring</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Monitoring</h3>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="tabbable tabs-left">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#overview" data-toggle="tab">Overview</a></li>
|
||||
<li><a href="#queue" data-toggle="tab">Queues</a></li>
|
||||
<li><a href="#error" data-toggle="tab">Errors</a></li>
|
||||
<li><a href="#log" data-toggle="tab">Logs</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="overview">
|
||||
<table class="table table-striped table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 200px;">Registrated users</td>
|
||||
<td>345</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OS</td>
|
||||
<td>Android: 200 (58%)<br>iOS: 145 (42%)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Measurements<br>Series</td>
|
||||
<td>123.456<br>456</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Continent<br>Country<br>City</td>
|
||||
<td>2<br>12<br>123</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>...</td>
|
||||
<td>..</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="queue">
|
||||
<iframe src="http://212.72.183.108:15672" style="width: 100%; min-height: 1600px; overflow:hidden;" frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="error">
|
||||
Errors
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="log">
|
||||
Logs
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="dasense/page/default_developer/js/monitoring.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,148 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Push Message</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Push Message</h3>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal">
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label">To</label>
|
||||
<div class="controls">
|
||||
<select id="select-to">
|
||||
<option value="users">Single User / Group</option>
|
||||
<option value="os">OS</option>
|
||||
<option value="all">All</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="element-os" class="control-group">
|
||||
<label class="control-label">OS</label>
|
||||
<div class="controls">
|
||||
<select>
|
||||
<option>Android</option>
|
||||
<option>iOS</option>
|
||||
</select>
|
||||
<span class="help-block">All receivers with specified OS will received this message.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="element-users" class="control-group">
|
||||
<label class="control-label">Receivers</label>
|
||||
<div class="controls">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 30px"><i class="icon-ok"></i></th>
|
||||
<th style="width: 24px">#</th>
|
||||
<th style="width: 24px"></th>
|
||||
<th style="width: 150px">Username</th>
|
||||
<th style="width: 100px">OS</th>
|
||||
<th>E-Mail</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><input type="checkbox" style="vertical-align: top"></td>
|
||||
<td>1</td>
|
||||
<td><img src="dasense/page/default_developer/img/flag_de.png" style="width: 24px"></td>
|
||||
<td>Chris</td>
|
||||
<td>Android</td>
|
||||
<td>christian.meurisch@googlemail.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" style="vertical-align: top"></td>
|
||||
<td>2</td>
|
||||
<td><img src="dasense/page/default_developer/img/flag_en.png" style="width: 24px"></td>
|
||||
<td>Sam Sampleman</td>
|
||||
<td>iOS</td>
|
||||
<td>sam.sampleman@googlemail.com</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" style="vertical-align: top"></td>
|
||||
<td>3</td>
|
||||
<td></td>
|
||||
<td>...</td>
|
||||
<td>...</td>
|
||||
<td>...</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="element-msg-type" class="control-group">
|
||||
<label class="control-label">Message type</label>
|
||||
<div class="controls">
|
||||
<div class="tabbable">
|
||||
<ul id="msg-type-header" class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab">News</a></li>
|
||||
<li><a href="#tab2" data-toggle="tab">Others</a></li>
|
||||
</ul>
|
||||
<div id="msg-type-content" class="tab-content">
|
||||
<div class="tab-pane active" id="tab1">
|
||||
<div class="row-fluid">
|
||||
<div class="span6 input-prepend">
|
||||
<span class="add-on">de</span>
|
||||
<input class="span2" id="prependedInput" type="text" placeholder="Title" style="width: 80%;">
|
||||
</div>
|
||||
<div class="span6 input-prepend">
|
||||
<span class="add-on">en</span>
|
||||
<input class="span2" id="prependedInput" type="text" placeholder="Title" style="width: 80%;">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row-fluid">
|
||||
<div class="span6 input-prepend">
|
||||
<span class="add-on">de</span>
|
||||
<textarea class="span2" id="prependedInput" rows="4" placeholder="Message" style="width: 80%;"></textarea>
|
||||
</div>
|
||||
<div class="span6 input-prepend">
|
||||
<span class="add-on">en</span>
|
||||
<textarea class="span2" id="prependedInput" rows="4" placeholder="Message" style="width: 80%;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab2">
|
||||
... some other message ...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="element-settings" class="control-group">
|
||||
<label class="control-label">Settings</label>
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" checked> Retry
|
||||
</label>
|
||||
|
||||
<span class="help-block">Here you can specify delivery settings.</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-primary"><i class="icon-envelope icon-white"></i> Send</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="dasense/page/default_developer/js/pushmessage.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,25 +0,0 @@
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputOS">OS</label>
|
||||
<div class="controls">
|
||||
<select>
|
||||
<option>Android</option>
|
||||
<option>iOS</option>
|
||||
</select>
|
||||
</div>
|
||||
<br>
|
||||
<label class="control-label" for="inputLanguage">Language</label>
|
||||
<div class="controls">
|
||||
<select>
|
||||
<option>German</option>
|
||||
<option>English</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-submit btn-primary"><i class="icon-arrow-down icon-white"></i> Export</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -1,45 +0,0 @@
|
||||
<form class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputIdentifier">Identifier</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputEmail" placeholder="Required">
|
||||
<span class="help-block">General database identifier. No space allowed.</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputTextDE">Text<br>(german)</label>
|
||||
<div class="controls">
|
||||
<textarea rows="3" placeholder="Required"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputTextEN">Text<br>(english)</label>
|
||||
<div class="controls">
|
||||
<textarea rows="3" placeholder="Required"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputAndroidIdentifier">Android Identifier</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputPassword" placeholder="Optional">
|
||||
<span class="help-block">Android identifier. No space allowed.<br>If you fill out the field, this entry will be exported for Android XML.</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="inputIOSIdentifier">iOS Identifier</label>
|
||||
<div class="controls">
|
||||
<input type="text" id="inputPassword" placeholder="Optional">
|
||||
<span class="help-block">iOS identifier. No space allowed.<br>If you fill out the field, this entry will be exported for iOS XML.</span>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<button type="submit" class="btn btn-submit btn-primary"><i class="icon-plus icon-white"></i> Create</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@ -1,28 +0,0 @@
|
||||
<!--
|
||||
To change this template, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Text Handler</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="main">
|
||||
<div class="masthead">
|
||||
<h3 class="muted">Text Handler</h3>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="tabbable tabs-left">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active" id="import"><a href="#">Import</a></li>
|
||||
<li id="export"><a href="#">Export</a></li>
|
||||
</ul>
|
||||
<div class="tab-content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="dasense/page/default_developer/js/texthandler.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>da_sense | Developer Center</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link rel="icon" type="image/png" href="${navimg}" />
|
||||
${css}
|
||||
${js}
|
||||
</head>
|
||||
<body>
|
||||
<div id="developer-navbar" class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<div class="brand-logo">
|
||||
<img src="${navimg}" height="24" width="24">
|
||||
</div>
|
||||
<a class="brand" href="#">developer</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div id="content-wrapper">
|
||||
Not logged in or missing rights. Please login a valid account!
|
||||
|
||||
<form id='login' action='#' method='post' accept-charset='UTF-8'>
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<input type='hidden' name='submitted' id='submitted' value='1'/>
|
||||
|
||||
<label for='username' >UserName:</label>
|
||||
<input type='text' name='username' id='username' maxlength="50" />
|
||||
|
||||
<label for='password' >Password:</label>
|
||||
<input type='password' name='password' id='password' maxlength="50" />
|
||||
|
||||
<input type='submit' name='Submit' value='Submit' />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="footer">
|
||||
<p>© <a href="http://www.da-sense.de" target="_blank">da_sense</a>, TU Darmstadt 2013</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class login_page extends \SYSTEM\PAGE\Page {
|
||||
public function html(){
|
||||
|
||||
if( isset($_POST['username']) && isset($_POST['password']) &&
|
||||
\SYSTEM\SECURITY\Security::login(\SYSTEM\system::getSystemDBInfo(), $_POST['username'], sha1($_POST['password']), md5($_POST['password']))){
|
||||
//TODO connection
|
||||
new \SYSTEM\LOG\DEPRECATED("connection");
|
||||
$default = new \SYSTEM\SAI\default_page();
|
||||
return $default->html();
|
||||
}
|
||||
|
||||
$vars = array();
|
||||
$vars['js'] = '<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/css/libs/bootstrap.min.css').'" type="text/css" />'.
|
||||
'<link rel="stylesheet" href="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/css/index.css').'" type="text/css" />';
|
||||
$vars['css'] = '<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/js/libs/jquery.min.js').'" type="text/javascript"></script>'.
|
||||
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/default_page/js/libs/bootstrap.min.js').'" type="text/javascript"></script>';
|
||||
$vars['navimg'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG);
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'page/login_page/login.tpl'), $vars);
|
||||
}
|
||||
}
|
||||
@ -2,17 +2,15 @@
|
||||
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
abstract class SaiModule {
|
||||
public static function html_js(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
public static function html_css(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
abstract class SaiModule {
|
||||
public static function html_content(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
public static function html_li_menu(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
//true or false -> if true no call to right_right()
|
||||
public static function right_public(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
//check your rights here -> returns true or false
|
||||
public static function right_right(){
|
||||
throw new RuntimeException("Unimplemented!");}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class sai {
|
||||
private function __construct(){}
|
||||
private function __clone(){}
|
||||
|
||||
public function register($module){
|
||||
public function register($module){
|
||||
if( !\class_exists($module) ||
|
||||
!\is_array($parents = \class_parents($module)) ||
|
||||
!\array_search('SYSTEM\SAI\SaiModule', $parents)){
|
||||
|
||||
@ -1,16 +1,17 @@
|
||||
<?php
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
define('SAI_MOD_POSTFIELD','sai_mod');
|
||||
|
||||
class saigui extends \SYSTEM\PAGE\Page {
|
||||
|
||||
public function html(){
|
||||
|
||||
if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo() , \SYSTEM\SECURITY\RIGHTS::SYS_SAI)){
|
||||
$login = new \SYSTEM\SAI\login_page();
|
||||
return $login->html();}
|
||||
|
||||
$pg = array_merge($_POST,$_GET);
|
||||
$sai = new \SYSTEM\SAI\default_page ((isset($pg['sai_mod']) ? $pg['sai_mod'] : null),$pg);
|
||||
if(isset($pg[SAI_MOD_POSTFIELD])){
|
||||
$mod = new \SYSTEM\SAI\default_module(\str_replace('.', '\\', $pg[SAI_MOD_POSTFIELD]),$pg);
|
||||
return $mod->html();}
|
||||
|
||||
$sai = new \SYSTEM\SAI\default_page();
|
||||
return $sai->html();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user