Merge branch 'master' of mojotrollz.eu:system
Conflicts: files/sys/system.js
This commit is contained in:
commit
dd3393ba7c
@ -63,7 +63,6 @@ class api {
|
|||||||
$result = \SYSTEM\DBD\SYS_API_TREE::QA(array($group));
|
$result = \SYSTEM\DBD\SYS_API_TREE::QA(array($group));
|
||||||
if(!isset($result) || !is_array($result) || count($result) <= 0){
|
if(!isset($result) || !is_array($result) || count($result) <= 0){
|
||||||
throw new \SYSTEM\LOG\ERROR("Database Tree for Api empty - cannot proced! GROUP: ".$group);}
|
throw new \SYSTEM\LOG\ERROR("Database Tree for Api empty - cannot proced! GROUP: ".$group);}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,37 +3,18 @@
|
|||||||
namespace SYSTEM\API;
|
namespace SYSTEM\API;
|
||||||
|
|
||||||
class api_system extends api_login{
|
class api_system extends api_login{
|
||||||
/*
|
public static function call_cron(){
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (0, 0, -1, NULL, 'call', NULL);
|
return \SYSTEM\CRON\cron::run();}
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (60, 0, 0, 'account', 'action', NULL);
|
|
||||||
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (61,1,60,'login','username','USERNAME');
|
public static function call_text($request,$lang){
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (62,1,60,'login','password_sha','PASSHASH');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (63,1,60,'login','password_md5','PASSHASH');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (64,1,60,'check','rightid','UINT');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (65,1,60,'create','username','USERNAME');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (66,1,60,'create','password_sha','PASSHASH');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (67,1,60,'create','email','EMAIL');
|
|
||||||
INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (68,1,60,'create','locale','LANG');
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*public static function call_account_action_login($username, $password_sha, $password_md5){
|
|
||||||
return \SYSTEM\SECURITY\Security::login($username, $password_sha, $password_md5);}
|
|
||||||
public static function call_account_action_logout(){
|
|
||||||
return \SYSTEM\SECURITY\Security::logout();}
|
|
||||||
public static function call_account_action_isloggedin(){
|
|
||||||
return \SYSTEM\SECURITY\Security::isLoggedIn();}
|
|
||||||
public static function call_account_action_check($rightid){
|
|
||||||
return \SYSTEM\SECURITY\Security::check($rightid);}
|
|
||||||
public static function call_account_action_create($username, $password_sha, $email, $locale){
|
|
||||||
return \SYSTEM\SECURITY\Security::create($username, $password_sha, $email, $locale);}*/
|
|
||||||
|
|
||||||
public static function call_locale($request,$lang){
|
|
||||||
return \SYSTEM\LOG\JsonResult::toString(\SYSTEM\locale::getStrings($request, $lang));}
|
return \SYSTEM\LOG\JsonResult::toString(\SYSTEM\locale::getStrings($request, $lang));}
|
||||||
|
|
||||||
public static function call_files($cat,$id = null){
|
public static function call_files($cat,$id = null){
|
||||||
return \SYSTEM\FILES\files::get($cat, $id, true);}
|
return \SYSTEM\FILES\files::get($cat, $id, true);}
|
||||||
|
|
||||||
|
public static function call_pages($group,$state){
|
||||||
|
return \SYSTEM\PAGE\State::get($group,$state);}
|
||||||
|
|
||||||
public static function static__lang($lang){
|
public static function static__lang($lang){
|
||||||
\SYSTEM\locale::set($lang);}
|
\SYSTEM\locale::set($lang);}
|
||||||
public static function static__result($result){
|
public static function static__result($result){
|
||||||
|
|||||||
2
api/autoload.inc.php
Normal file
2
api/autoload.inc.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\API');
|
||||||
@ -6,35 +6,18 @@ require_once dirname(__FILE__).'/system/autoload.php';
|
|||||||
//Register autoload
|
//Register autoload
|
||||||
\SYSTEM\autoload::register_autoload();
|
\SYSTEM\autoload::register_autoload();
|
||||||
|
|
||||||
//Register system classes
|
//Autoload submodules
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/system','SYSTEM');
|
require_once dirname(__FILE__).'/system/autoload.inc.php';
|
||||||
|
require_once dirname(__FILE__).'/log/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/log/result','SYSTEM\LOG');
|
require_once dirname(__FILE__).'/api/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/log','SYSTEM\LOG');
|
require_once dirname(__FILE__).'/page/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/log/exceptions','SYSTEM\LOG');
|
require_once dirname(__FILE__).'/dbd/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/log/error_handler','SYSTEM\LOG');
|
require_once dirname(__FILE__).'/db/autoload.inc.php';
|
||||||
|
require_once dirname(__FILE__).'/security/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/api','SYSTEM\API');
|
require_once dirname(__FILE__).'/config/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/page','SYSTEM\PAGE');
|
require_once dirname(__FILE__).'/cache/autoload.inc.php';
|
||||||
|
require_once dirname(__FILE__).'/docu/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/dbd/tbl/','SYSTEM\DBD');
|
require_once dirname(__FILE__).'/files/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/dbd/qq/','SYSTEM\DBD');
|
require_once dirname(__FILE__).'/cron/autoload.inc.php';
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/db','SYSTEM\DB');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/db/dbinfo','SYSTEM\DB');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/db/connection','SYSTEM\DB');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/db/result','SYSTEM\DB');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/db/qq','SYSTEM\DB');
|
|
||||||
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/security','SYSTEM\SECURITY');
|
|
||||||
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/config','SYSTEM\CONFIG');
|
|
||||||
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/cache','SYSTEM\CACHE');
|
|
||||||
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/sai','SYSTEM\SAI');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/docu','SYSTEM\DOCU');
|
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/files','SYSTEM\FILES');
|
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/lib/autoload.inc.php';
|
|
||||||
require_once dirname(__FILE__).'/docu/register_sys_docu.php';
|
|
||||||
require_once dirname(__FILE__).'/sai/autoload.inc.php';
|
require_once dirname(__FILE__).'/sai/autoload.inc.php';
|
||||||
|
require_once dirname(__FILE__).'/lib/autoload.inc.php';
|
||||||
2
cache/autoload.inc.php
vendored
Normal file
2
cache/autoload.inc.php
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\CACHE');
|
||||||
2
config/autoload.inc.php
Normal file
2
config/autoload.inc.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\CONFIG');
|
||||||
@ -24,6 +24,8 @@ class config_ids {
|
|||||||
const SYS_CONFIG_LANGS = 21;
|
const SYS_CONFIG_LANGS = 21;
|
||||||
const SYS_CONFIG_DEFAULT_LANG = 22;
|
const SYS_CONFIG_DEFAULT_LANG = 22;
|
||||||
|
|
||||||
|
const SYS_CRON_LOG2SQLITE_PATH = 30;
|
||||||
|
|
||||||
const SYS_SAI_CONFIG_BASEURL = 50;
|
const SYS_SAI_CONFIG_BASEURL = 50;
|
||||||
const SYS_SAI_CONFIG_NAVIMG = 51;
|
const SYS_SAI_CONFIG_NAVIMG = 51;
|
||||||
const SYS_SAI_CONFIG_TITLE = 52;
|
const SYS_SAI_CONFIG_TITLE = 52;
|
||||||
|
|||||||
2
cron/autoload.inc.php
Normal file
2
cron/autoload.inc.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\CRON');
|
||||||
58
cron/cron.php
Normal file
58
cron/cron.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\CRON;
|
||||||
|
|
||||||
|
class cron {
|
||||||
|
public static function check($class){
|
||||||
|
if( !\class_exists($class) ||
|
||||||
|
!\is_array($parents = \class_parents($class)) ||
|
||||||
|
!\array_search('SYSTEM\CRON\cronjob', $parents)){
|
||||||
|
return false;}
|
||||||
|
return true;}
|
||||||
|
|
||||||
|
public static function run(){
|
||||||
|
$crons = \SYSTEM\DBD\SYS_CRON_LIST::QQ();
|
||||||
|
while($cron = $crons->next()){
|
||||||
|
//check module
|
||||||
|
if(!self::check($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS])){
|
||||||
|
self::status($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS], \SYSTEM\CRON\cronstatus::CRON_STATUS_FAIL_CLASS);
|
||||||
|
continue;}
|
||||||
|
//time to execute?
|
||||||
|
if(!\SYSTEM\CRON\crontime::check_now( strtotime($cron[\SYSTEM\DBD\system_cron::FIELD_LAST_RUN]),
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_MIN],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_HOUR],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_DAY],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_DAY_WEEK],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_MONTH])){
|
||||||
|
continue;}
|
||||||
|
//Status is ok?
|
||||||
|
if($cron[\SYSTEM\DBD\system_cron::FIELD_STATUS] != \SYSTEM\CRON\cronstatus::CRON_STATUS_SUCCESFULLY){
|
||||||
|
new \SYSTEM\LOG\CRON('Cron for Class '.$cron[\SYSTEM\DBD\system_cron::FIELD_CLASS].' could not execute cuz Status aint good: '. \SYSTEM\CRON\cronstatus::text($cron[\SYSTEM\DBD\system_cron::FIELD_STATUS]));
|
||||||
|
continue;}
|
||||||
|
//set running
|
||||||
|
self::status($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS], \SYSTEM\CRON\cronstatus::CRON_STATUS_RUNNING);
|
||||||
|
self::status($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS], call_user_func(array($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS],'run')));
|
||||||
|
}
|
||||||
|
return \SYSTEM\LOG\JsonResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function next($class){
|
||||||
|
$cron = \SYSTEM\DBD\SYS_CRON_GET::Q1(array($class));
|
||||||
|
//check module
|
||||||
|
if(!self::check($cron[\SYSTEM\DBD\system_cron::FIELD_CLASS])){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("Given class is not a cronjob");}
|
||||||
|
//time
|
||||||
|
return \SYSTEM\CRON\crontime::next( strtotime($cron[\SYSTEM\DBD\system_cron::FIELD_LAST_RUN]),
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_MIN],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_HOUR],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_DAY],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_DAY_WEEK],
|
||||||
|
$cron[\SYSTEM\DBD\system_cron::FIELD_MONTH]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function status($class, $status){
|
||||||
|
new \SYSTEM\LOG\CRON('Cron Status for Class '.$class.' updated to: '. \SYSTEM\CRON\cronstatus::text($status));
|
||||||
|
return \SYSTEM\DBD\SYS_CRON_UPD::QI(array($status,time(),$class));}
|
||||||
|
|
||||||
|
public static function last_visit(){
|
||||||
|
return \SYSTEM\DBD\SYS_CRON_LAST_VISIT::Q1()['time'];}
|
||||||
|
}
|
||||||
70
cron/cron_log2sqlite.php
Normal file
70
cron/cron_log2sqlite.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\CRON;
|
||||||
|
class cron_log2sqlite extends \SYSTEM\CRON\cronjob{
|
||||||
|
public static function run(){
|
||||||
|
//find oldest value
|
||||||
|
$oldest = \SYSTEM\DBD\SYS_LOG_OLDEST::Q1();
|
||||||
|
list( $now_month, $now_year ) = preg_split( "/ /", date("m Y"));
|
||||||
|
//All fine -> abort
|
||||||
|
if( $oldest['year'] >= $now_year &&
|
||||||
|
$oldest['month'] >= $now_month){
|
||||||
|
return cronstatus::CRON_STATUS_SUCCESFULLY;}
|
||||||
|
|
||||||
|
$filename = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CRON_LOG2SQLITE_PATH).$oldest['year'].'.'.$oldest['month'].'.db';
|
||||||
|
//extract whole month to file
|
||||||
|
$con = new \SYSTEM\DB\Connection(new \SYSTEM\DB\DBInfoSQLite($filename));
|
||||||
|
|
||||||
|
//create table
|
||||||
|
$con->query('CREATE TABLE IF NOT EXISTS `system_log` ('.
|
||||||
|
' `ID` INT(10) NOT NULL,'.
|
||||||
|
' `class` TEXT NOT NULL,'.
|
||||||
|
' `message` TEXT NOT NULL,'.
|
||||||
|
' `code` INT(11) NOT NULL,'.
|
||||||
|
' `file` TEXT NOT NULL,'.
|
||||||
|
' `line` INT(11) NOT NULL,'.
|
||||||
|
' `trace` TEXT NOT NULL,'.
|
||||||
|
' `ip` TEXT NOT NULL,'.
|
||||||
|
' `querytime` DOUBLE NOT NULL,'.
|
||||||
|
' `time` DATETIME NOT NULL,'.
|
||||||
|
' `server_name` CHAR(255) NOT NULL,'.
|
||||||
|
' `server_port` INT(10) NOT NULL,'.
|
||||||
|
' `request_uri` CHAR(255) NOT NULL,'.
|
||||||
|
' `post` TEXT NOT NULL,'.
|
||||||
|
' `http_referer` CHAR(255) NULL DEFAULT NULL,'.
|
||||||
|
' `http_user_agent` TEXT NOT NULL,'.
|
||||||
|
' `user` INT(11) NULL DEFAULT NULL,'.
|
||||||
|
' `thrown` BIT(1) NOT NULL,'.
|
||||||
|
' PRIMARY KEY (`ID`)'.');');
|
||||||
|
|
||||||
|
//write data as trasaction
|
||||||
|
$con->exec('begin transaction');
|
||||||
|
$res = \SYSTEM\DBD\SYS_LOG_MONTH::QQ(array($oldest['month'],$oldest['year']));
|
||||||
|
$i = 0;
|
||||||
|
while($row = $res->next()){
|
||||||
|
set_time_limit(30);
|
||||||
|
$i++;
|
||||||
|
if(!$con->exec('INSERT OR IGNORE INTO '.\SYSTEM\DBD\system_log::NAME_MYS.
|
||||||
|
'(`ID`, `class`, `message`, `code`, `file`, `line`, `trace`, `ip`, `querytime`, `time`,'.
|
||||||
|
' `server_name`, `server_port`, `request_uri`, `post`,'.
|
||||||
|
' `http_referer`, `http_user_agent`, `user`, `thrown`)'.
|
||||||
|
'VALUES ('.$row['ID'].', \''.\SQLite3::escapeString($row['class']).'\', \''.\SQLite3::escapeString($row['message']).'\', '.
|
||||||
|
$row['code'].', \''.\SQLite3::escapeString($row['file']).'\', '.$row['line'].', \''.\SQLite3::escapeString($row['trace']).'\', \''.
|
||||||
|
$row['ip'].'\', '.$row['querytime'].', \''.$row['time'].'\', \''.
|
||||||
|
\SQLite3::escapeString($row['server_name']).'\', '.$row['server_port'].', \''.\SQLite3::escapeString($row['request_uri']).'\', \''.\SQLite3::escapeString($row['post']).'\', \''.
|
||||||
|
\SQLite3::escapeString($row['http_referer']).'\', \''.\SQLite3::escapeString($row['http_user_agent']).'\', '.$row['user'].','.true.');')){
|
||||||
|
new \SYSTEM\LOG\ERROR('failed to insert into log archiev');
|
||||||
|
return cronstatus::CRON_STATUS_FAIL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!$con->exec('end transaction')){
|
||||||
|
new \SYSTEM\LOG\ERROR('failed to insert into log archiev');
|
||||||
|
return cronstatus::CRON_STATUS_FAIL;};
|
||||||
|
|
||||||
|
//delete from database
|
||||||
|
if(!\SYSTEM\DBD\SYS_LOG_MONTH_DEL::QI(array($oldest['month'],$oldest['year']))){
|
||||||
|
new \SYSTEM\LOG\ERROR('failed to delete log entries');
|
||||||
|
return cronstatus::CRON_STATUS_FAIL;}
|
||||||
|
|
||||||
|
return cronstatus::CRON_STATUS_SUCCESFULLY;
|
||||||
|
}
|
||||||
|
}
|
||||||
6
cron/cronjob.php
Normal file
6
cron/cronjob.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\CRON;
|
||||||
|
class cronjob{
|
||||||
|
public static function run(){
|
||||||
|
new \RuntimeException("Unimplemented!");}
|
||||||
|
}
|
||||||
29
cron/cronstatus.php
Normal file
29
cron/cronstatus.php
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\CRON;
|
||||||
|
|
||||||
|
class cronstatus {
|
||||||
|
const CRON_STATUS_SUCCESFULLY = 0;
|
||||||
|
const CRON_STATUS_RUNNING = 1;
|
||||||
|
const CRON_STATUS_FAIL = 2;
|
||||||
|
const CRON_STATUS_FAIL_CLASS = 3;
|
||||||
|
|
||||||
|
const CRON_STATUS_USER_STATES = 99;
|
||||||
|
|
||||||
|
public static function text($status){
|
||||||
|
switch($status){
|
||||||
|
case self::CRON_STATUS_SUCCESFULLY:
|
||||||
|
$status = 'SUCCESFULLY';
|
||||||
|
break;
|
||||||
|
case self::CRON_STATUS_RUNNING:
|
||||||
|
$status = 'RUNNING';
|
||||||
|
break;
|
||||||
|
case self::CRON_STATUS_FAIL:
|
||||||
|
$status = 'FAIL';
|
||||||
|
break;
|
||||||
|
case self::CRON_STATUS_FAIL_CLASS:
|
||||||
|
$status = 'FAIL_CLASS';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $status;
|
||||||
|
}
|
||||||
|
}
|
||||||
58
cron/crontime.php
Normal file
58
cron/crontime.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\CRON;
|
||||||
|
class crontime {
|
||||||
|
public static function next($base_time,$min,$hour,$day,$day_week,$month){
|
||||||
|
list( $now_min, $now_hour, $now_day, $now_month, $now_day_week ) = preg_split( "/ /", date("i H d n N", $base_time ) );
|
||||||
|
list( $next_min, $next_hour, $next_day, $next_month, $next_year) = preg_split( "/ /", date("i H d n Y", $base_time ) );
|
||||||
|
if($month){
|
||||||
|
if(($month + $now_month)> 12){ $next_year += 1;}
|
||||||
|
$next_month = ($now_month+$month)%12;}
|
||||||
|
if($day){
|
||||||
|
if($day + $now_day> 31){ $next_month += 1;}
|
||||||
|
$next_day = ($now_day+$day)%31;}
|
||||||
|
if($hour){
|
||||||
|
if(($hour + $now_hour)>= 24){ $next_day += 1;}
|
||||||
|
$next_hour = ($now_hour+$hour)%24;}
|
||||||
|
if($min){
|
||||||
|
if(($min + $now_min)> 60){ $next_hour += 1;}
|
||||||
|
$next_min = ($now_min+$min)%60;}
|
||||||
|
if($day_week){
|
||||||
|
$day_week = $day_week % 6; // 7 and 0 both mean Sunday
|
||||||
|
$now_day_week = $now_day_week % 6; // 7 and 0 both mean Sunday
|
||||||
|
$next_day += abs($day_week - $now_day_week);}
|
||||||
|
//new \SYSTEM\LOG\INFO(print_r(array($base_time,$min,$hour,$day,$day_week,$month),true));
|
||||||
|
//new \SYSTEM\LOG\INFO(print_r(array($now_min, $now_hour, $now_day, $now_month, $now_day_week),true));
|
||||||
|
//new \SYSTEM\LOG\INFO(print_r(array($next_hour, $next_min, 0, $next_month, $next_day, $next_year),true));
|
||||||
|
return mktime($next_hour, $next_min, 0, $next_month, $next_day, $next_year);
|
||||||
|
}
|
||||||
|
public static function last($base_time,$min,$hour,$day,$day_week,$month){
|
||||||
|
list( $now_min, $now_hour, $now_day, $now_month, $now_day_week ) = preg_split( "/ /", date("i H d n N", $base_time ) );
|
||||||
|
list( $last_min, $last_hour, $last_day, $last_month, $last_year) = preg_split( "/ /", date("i H d n Y", $base_time ) );
|
||||||
|
if($month){
|
||||||
|
if(($now_month - $month)< 12){ $last_year -= 1;}
|
||||||
|
$last_month = ($now_month-$month)%12;}
|
||||||
|
if($day){
|
||||||
|
if(($now_day - $day)> 31){ $last_month -= 1;}
|
||||||
|
$last_day = ($now_day-$day)%31;}
|
||||||
|
if($hour){
|
||||||
|
if(($now_hour - $hour)> 24){ $last_day -= 1;}
|
||||||
|
$last_hour = ($now_hour-$hour)%24;}
|
||||||
|
if($min){
|
||||||
|
if(($now_min - $min)> 60){ $last_hour -= 1;}
|
||||||
|
$last_min = ($now_min-$min)%60;}
|
||||||
|
if($day_week){
|
||||||
|
$day_week = $day_week % 6; // 7 and 0 both mean Sunday
|
||||||
|
$now_day_week = $now_day_week % 6; // 7 and 0 both mean Sunday
|
||||||
|
$last_day -= abs($day_week - $now_day_week);}
|
||||||
|
return mktime($last_hour, $last_min, 0, $last_month, $last_day, $last_year);
|
||||||
|
}
|
||||||
|
public static function check($base_time,$last_run,$min,$hour,$day,$day_week,$month){
|
||||||
|
//new \SYSTEM\LOG\INFO('next:'.self::next($last_run, $min, $hour, $day, $day_week, $month).' bt:'.$base_time.' last:'.$last_run.' dif:'.(self::next($last_run, $min, $hour, $day, $day_week, $month) - time($base_time)).' run:'.(self::next($last_run, $min, $hour, $day, $day_week, $month) <= time($base_time) ? 'run' : 'not run'));
|
||||||
|
return self::next($last_run, $min, $hour, $day, $day_week, $month) <= $base_time ? true : false;}
|
||||||
|
public static function next_now($min,$hour,$day,$day_week,$month){
|
||||||
|
return self::next(time(),$min,$hour,$day,$day_week,$month);}
|
||||||
|
public static function last_now($min,$hour,$day,$day_week,$month){
|
||||||
|
return self::last(time(),$min,$hour,$day,$day_week,$month);}
|
||||||
|
public static function check_now($last_run,$min,$hour,$day,$day_week,$month){
|
||||||
|
return self::check(time(),$last_run,$min,$hour,$day,$day_week,$month);}
|
||||||
|
}
|
||||||
6
db/autoload.inc.php
Normal file
6
db/autoload.inc.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\DB');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/dbinfo','SYSTEM\DB');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/connection','SYSTEM\DB');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/result','SYSTEM\DB');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq','SYSTEM\DB');
|
||||||
@ -20,6 +20,8 @@ class Connection extends ConnectionAbstr{
|
|||||||
$this->connection = new \SYSTEM\DB\ConnectionMYS($dbinfo);
|
$this->connection = new \SYSTEM\DB\ConnectionMYS($dbinfo);
|
||||||
} else if ($dbinfo instanceof \SYSTEM\DB\DBInfoAMQP){
|
} else if ($dbinfo instanceof \SYSTEM\DB\DBInfoAMQP){
|
||||||
$this->connection = new \SYSTEM\DB\ConnectionAMQP($dbinfo);
|
$this->connection = new \SYSTEM\DB\ConnectionAMQP($dbinfo);
|
||||||
|
} else if ($dbinfo instanceof \SYSTEM\DB\DBInfoSQLite){
|
||||||
|
$this->connection = new \SYSTEM\DB\ConnectionSQLite($dbinfo);
|
||||||
} else {
|
} else {
|
||||||
throw new \Exception('Could not understand Database Settings. Check ur Database Settings');}
|
throw new \Exception('Could not understand Database Settings. Check ur Database Settings');}
|
||||||
}
|
}
|
||||||
@ -39,4 +41,7 @@ class Connection extends ConnectionAbstr{
|
|||||||
//Query connected Database
|
//Query connected Database
|
||||||
public function query($query){
|
public function query($query){
|
||||||
return $this->connection->query($query);}
|
return $this->connection->query($query);}
|
||||||
|
|
||||||
|
public function exec($query){
|
||||||
|
return $this->connection->exec($query);}
|
||||||
}
|
}
|
||||||
@ -28,12 +28,14 @@ class ConnectionAMQP extends ConnectionAbstr {
|
|||||||
$exchange->setFlags(AMQP_DURABLE);
|
$exchange->setFlags(AMQP_DURABLE);
|
||||||
$exchange->setName('exchange2');
|
$exchange->setName('exchange2');
|
||||||
$exchange->setType('direct');
|
$exchange->setType('direct');
|
||||||
$exchange->declare();
|
//$exchange->declare();
|
||||||
|
$exchange->declareExchange();
|
||||||
|
|
||||||
$queue = new \AMQPQueue($channel);
|
$queue = new \AMQPQueue($channel);
|
||||||
$queue->setName('series');
|
$queue->setName('series');
|
||||||
$queue->setFlags(AMQP_DURABLE | AMQP_AUTODELETE);
|
$queue->setFlags(AMQP_DURABLE | AMQP_AUTODELETE);
|
||||||
$queue->declare();
|
//$queue->declare();
|
||||||
|
$queue->declareQueue();
|
||||||
$queue->bind('exchange2','series');
|
$queue->bind('exchange2','series');
|
||||||
|
|
||||||
$channel->startTransaction();
|
$channel->startTransaction();
|
||||||
|
|||||||
@ -11,11 +11,11 @@ class ConnectionMYS extends ConnectionAbstr {
|
|||||||
|
|
||||||
$this->connection = @mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag);
|
$this->connection = @mysqli_connect($dbinfo->m_host, $dbinfo->m_user, $dbinfo->m_password, $new_link, $client_flag);
|
||||||
if(!$this->connection){
|
if(!$this->connection){
|
||||||
throw new \SYSTEM\LOG\ERROR('Could not connect to Database. Check ur Database Settings');}
|
throw new \Exception('Could not connect to Database. Check ur Database Settings');}
|
||||||
|
|
||||||
if(!mysqli_select_db($this->connection, $dbinfo->m_database)){
|
if(!mysqli_select_db($this->connection, $dbinfo->m_database)){
|
||||||
mysqli_close($this->connection);
|
mysqli_close($this->connection);
|
||||||
throw new \SYSTEM\LOG\ERROR('Could not select Database. Check ur Database Settings: '.mysqli_error($this->connection));}
|
throw new \Exception('Could not select Database. Check ur Database Settings: '.mysqli_error($this->connection));}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct(){
|
public function __destruct(){
|
||||||
|
|||||||
@ -13,7 +13,7 @@ class ConnectionPG extends ConnectionAbstr {
|
|||||||
$this->connection = pg_connect("host=".$dbinfo->m_host." port=".$dbinfo->m_port." dbname=".$dbinfo->m_database."
|
$this->connection = pg_connect("host=".$dbinfo->m_host." port=".$dbinfo->m_port." dbname=".$dbinfo->m_database."
|
||||||
user=".$dbinfo->m_user." password=".$dbinfo->m_password."");
|
user=".$dbinfo->m_user." password=".$dbinfo->m_password."");
|
||||||
if(!$this->connection){
|
if(!$this->connection){
|
||||||
throw new \SYSTEM\LOG\ERROR('Could not connect to Database. Check ur Database Settings');}
|
throw new \Exception('Could not connect to Database. Check ur Database Settings');}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct(){}
|
public function __destruct(){}
|
||||||
|
|||||||
48
db/connection/ConnectionSQLite.php
Normal file
48
db/connection/ConnectionSQLite.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SYSTEM\DB;
|
||||||
|
|
||||||
|
class ConnectionSQLite extends ConnectionAbstr {
|
||||||
|
private $connection = NULL;
|
||||||
|
|
||||||
|
public function __construct(DBInfo $dbinfo, $new_link = false, $client_flag = 0){
|
||||||
|
$error = null;
|
||||||
|
$this->connection = new \SQLite3($dbinfo->m_database);
|
||||||
|
if(!$this->connection){
|
||||||
|
throw new \Exception('Could not connect to Database. Check ur Database Settings: '.$error);}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __destruct(){
|
||||||
|
$this->close();}
|
||||||
|
|
||||||
|
public function prepare($stmtName, $stmt, $values){
|
||||||
|
$prepStmt = $this->connection->prepare($stmt);
|
||||||
|
if(!$prepStmt){
|
||||||
|
throw new \SYSTEM\LOG\ERROR('Prepared Statement prepare fail: '. $error);}
|
||||||
|
|
||||||
|
foreach($values as $key=>$val){
|
||||||
|
$prepStmt->bindParam($key,$val);}
|
||||||
|
|
||||||
|
if(!($result = $prepStmt->execute())){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("Could not execute prepare statement: ". $error);}
|
||||||
|
|
||||||
|
return new ResultSQLite($result,$prepStmt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function close(){
|
||||||
|
return $this->connection->close();}
|
||||||
|
|
||||||
|
public function query($query){
|
||||||
|
$result = $this->connection->query($query);
|
||||||
|
if(!$result){
|
||||||
|
throw new \SYSTEM\LOG\ERROR('Could not query Database. Check ur Query Syntax or required Rights: '.$this->connection->lastErrorMsg());}
|
||||||
|
if($result === TRUE){
|
||||||
|
return TRUE;}
|
||||||
|
|
||||||
|
return new ResultSQLite($result,null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function exec($query){
|
||||||
|
return $this->connection->exec($query);
|
||||||
|
}
|
||||||
|
}
|
||||||
15
db/dbinfo/DBInfoSQLite.php
Normal file
15
db/dbinfo/DBInfoSQLite.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DB;
|
||||||
|
|
||||||
|
class DBInfoSQLite extends \SYSTEM\DB\DBInfo {
|
||||||
|
public function __construct($database , $user = null , $password = null, $host = null, $port = null){
|
||||||
|
$this->m_database = $database;
|
||||||
|
$this->m_user = $user;
|
||||||
|
$this->m_password = $password;
|
||||||
|
$this->m_host = $host;
|
||||||
|
$this->m_port = $port;
|
||||||
|
|
||||||
|
if( $this->m_database == null){
|
||||||
|
throw new \Exception("DBInfo not correct, database, permissions are null");}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -26,7 +26,7 @@ class QQ {
|
|||||||
return self::QQ()->next();}
|
return self::QQ()->next();}
|
||||||
public static function QI(){
|
public static function QI(){
|
||||||
$qq = self::QQ();
|
$qq = self::QQ();
|
||||||
return $qq->affectedRows() != (0||null);}
|
return $qq;}
|
||||||
//override this
|
//override this
|
||||||
protected static function query(){
|
protected static function query(){
|
||||||
throw new \SYSTEM\LOG\ERROR('query function of your QQ Class not overwritten!');}
|
throw new \SYSTEM\LOG\ERROR('query function of your QQ Class not overwritten!');}
|
||||||
|
|||||||
81
db/result/ResultSQLite.php
Normal file
81
db/result/ResultSQLite.php
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SYSTEM\DB;
|
||||||
|
|
||||||
|
class ResultSQLite extends \SYSTEM\DB\Result{
|
||||||
|
|
||||||
|
private $res = NULL;
|
||||||
|
private $stmt = NULL;
|
||||||
|
private $current = NULL;
|
||||||
|
|
||||||
|
//Result from mysql_query
|
||||||
|
public function __construct($res,$stmt){
|
||||||
|
$this->res = $res;
|
||||||
|
$this->stmt = $stmt;}
|
||||||
|
|
||||||
|
public function __destruct(){
|
||||||
|
$this->close();}
|
||||||
|
|
||||||
|
public function close(){
|
||||||
|
if($this->stmt){
|
||||||
|
$this->stmt->close();}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function count(){
|
||||||
|
throw new Exception("Problem SQLite");
|
||||||
|
return mysqli_num_rows($this->res);}
|
||||||
|
/*
|
||||||
|
* if ($res->numColumns() && $res->columnType(0) != SQLITE3_NULL) {
|
||||||
|
// have rows
|
||||||
|
} else {
|
||||||
|
// zero rows
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function affectedRows(){
|
||||||
|
throw new Exception("Problem SQLite");
|
||||||
|
return mysqli_affected_rows($this->res);}
|
||||||
|
|
||||||
|
public function next($object = false, $result_type = SQLITE3_ASSOC){
|
||||||
|
if($object){
|
||||||
|
throw new Exception("Problem SQLite");
|
||||||
|
} else {
|
||||||
|
$this->current = $this->res->fetchArray($result_type);
|
||||||
|
}
|
||||||
|
return $this->current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* function fetchObject($sqlite3result, $objectType = NULL) {
|
||||||
|
$array = $sqlite3result->fetchArray();
|
||||||
|
|
||||||
|
if(is_null($objectType)) {
|
||||||
|
$object = new stdClass();
|
||||||
|
} else {
|
||||||
|
// does not call this class' constructor
|
||||||
|
$object = unserialize(sprintf('O:%d:"%s":0:{}', strlen($objectType), $objectType));
|
||||||
|
}
|
||||||
|
|
||||||
|
$reflector = new ReflectionObject($object);
|
||||||
|
for($i = 0; $i < $sqlite3result->numColumns(); $i++) {
|
||||||
|
$name = $sqlite3result->columnName($i);
|
||||||
|
$value = $array[$name];
|
||||||
|
|
||||||
|
try {
|
||||||
|
$attribute = $reflector->getProperty($name);
|
||||||
|
|
||||||
|
$attribute->setAccessible(TRUE);
|
||||||
|
$attribute->setValue($object, $value);
|
||||||
|
} catch (ReflectionException $e) {
|
||||||
|
$object->$name = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $object;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function seek($row_number){
|
||||||
|
throw new Exception("Problem SQLite");
|
||||||
|
return mysqli_data_seek($this->res,$row_number);}
|
||||||
|
}
|
||||||
3
dbd/autoload.inc.php
Normal file
3
dbd/autoload.inc.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/tbl','SYSTEM\DBD');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq','SYSTEM\DBD');
|
||||||
11
dbd/qq/SYS_CRON_GET.php
Normal file
11
dbd/qq/SYS_CRON_GET.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_CRON_GET extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_PG.' WHERE class = $1;',
|
||||||
|
//mys
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_MYS.' WHERE class = ?;'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_CRON_LAST_VISIT.php
Normal file
11
dbd/qq/SYS_CRON_LAST_VISIT.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_CRON_LAST_VISIT extends \SYSTEM\DB\QQ {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT time FROM '.\SYSTEM\DBD\system_log::NAME_PG.' WHERE class = \'SYSTEM\LOG\WARNING\' ORDER BY time DESC LIMIT 1;',
|
||||||
|
//mys
|
||||||
|
'SELECT time FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE class = "SYSTEM\\\\LOG\\\\CRON" ORDER BY time DESC LIMIT 1'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_CRON_LIST.php
Normal file
11
dbd/qq/SYS_CRON_LIST.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_CRON_LIST extends \SYSTEM\DB\QQ {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_PG.';',
|
||||||
|
//mys
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_cron::NAME_MYS.';'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_CRON_UPD.php
Normal file
11
dbd/qq/SYS_CRON_UPD.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_CRON_UPD extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'UPDATE '.\SYSTEM\DBD\system_cron::NAME_PG.' SET '.\SYSTEM\DBD\system_cron::FIELD_STATUS.' = $1,'.\SYSTEM\DBD\system_cron::FIELD_LAST_RUN.' = to_timestamp($2) WHERE '.\SYSTEM\DBD\system_cron::FIELD_CLASS.' = $3;',
|
||||||
|
//mys
|
||||||
|
'UPDATE '.\SYSTEM\DBD\system_cron::NAME_MYS.' SET '.\SYSTEM\DBD\system_cron::FIELD_STATUS.' = ?,'.\SYSTEM\DBD\system_cron::FIELD_LAST_RUN.' = FROM_UNIXTIME(?) WHERE '.\SYSTEM\DBD\system_cron::FIELD_CLASS.' = ?;'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_LOG_MONTH.php
Normal file
11
dbd/qq/SYS_LOG_MONTH.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_LOG_MONTH extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_PG.' WHERE MONTH(time) = $1 AND YEAR(time) = $2 ORDER BY time ASC',
|
||||||
|
//mys
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ? ORDER BY time ASC'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_LOG_MONTH_DEL.php
Normal file
11
dbd/qq/SYS_LOG_MONTH_DEL.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_LOG_MONTH_DEL extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'DELETE FROM '.\SYSTEM\DBD\system_log::NAME_PG.' WHERE MONTH(time) = $1 AND YEAR(time) = $2;',
|
||||||
|
//mys
|
||||||
|
'DELETE FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' WHERE MONTH(time) = ? AND YEAR(time) = ?;'
|
||||||
|
);}}
|
||||||
11
dbd/qq/SYS_LOG_OLDEST.php
Normal file
11
dbd/qq/SYS_LOG_OLDEST.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_LOG_OLDEST extends \SYSTEM\DB\QQ {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT MONTH(time) as month, YEAR(time) as year FROM '.\SYSTEM\DBD\system_log::NAME_PG.' ORDER BY time ASC LIMIT 1',
|
||||||
|
//mys
|
||||||
|
'SELECT MONTH(time) as month, YEAR(time) as year FROM '.\SYSTEM\DBD\system_log::NAME_MYS.' ORDER BY time ASC LIMIT 1'
|
||||||
|
);}}
|
||||||
17
dbd/qq/SYS_PAGE_GROUP.php
Normal file
17
dbd/qq/SYS_PAGE_GROUP.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_PAGE_GROUP extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_page::NAME_PG
|
||||||
|
.' WHERE "'.\SYSTEM\DBD\system_page::FIELD_GROUP.'" = $1'
|
||||||
|
.' AND "'.\SYSTEM\DBD\system_page::FIELD_ID.'" = $2'
|
||||||
|
.' ORDER BY "'.\SYSTEM\DBD\system_page::FIELD_ID.'"',
|
||||||
|
//mys
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_page::NAME_MYS
|
||||||
|
.' WHERE `'.\SYSTEM\DBD\system_page::FIELD_GROUP.'` = ?'
|
||||||
|
.' AND `'.\SYSTEM\DBD\system_page::FIELD_ID.'` = ?'
|
||||||
|
.' ORDER BY '.\SYSTEM\DBD\system_page::FIELD_ID
|
||||||
|
);}}
|
||||||
26
dbd/sql/mysql/data/basic_locale_string.sql
Normal file
26
dbd/sql/mysql/data/basic_locale_string.sql
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
DELETE FROM system_locale_string WHERE category = 1;
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_logout', 1, 'Logout', 'Ausloggen');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_login', 1, 'Login', 'Einloggen');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_register', 1, 'Register', 'Registrieren');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_username', 1, 'Username', 'Username');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_password', 1, 'Password', 'Passwort');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_email', 1, 'EMail', 'E-Mail2');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_last_active', 1, 'Last active', 'Zuletzt aktiv');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_join_date', 1, 'Joindate', 'Beitrittsdatum');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_locale', 1, 'Locale', 'Sprache');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_admin_rights', 1, 'Admin Rights', 'Admin Rechte');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_cancel', 1, 'Cancel', 'Abbrechen');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_close', 1, 'Close', 'Schließen');
|
||||||
|
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_logout', 1, 'Logout before you leave!', 'Loggen Sie sie sich aus bevor Sie gehen!');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_login', 1, 'Login to your Website.', 'Loggen Sie sich in ihre Website ein.');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_register', 1, 'Register an Account', 'Register an Account');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_text_password_miss', 1, 'Can\'t really remember your Password?', 'Can\'t really remember your Password?');
|
||||||
|
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_username', 1, 'peter / peter@world.org', 'peter / peter@world.org');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_password', 1, 'my secret123', 'geheim567');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_placeholder_email', 1, 'peter@world.org', 'peter@world.org');
|
||||||
|
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_state_login', 1, 'You are logged in.', 'You are logged in.');
|
||||||
|
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('basic_example', 1, '<h1><img style="float: right;" title="TinyMCE Logo" src="http://www.tinymce.com/tryit/img/tlogo.png" alt="TinyMCE Logo" width="92" height="80" />Welcome to the TinyMCE editor demo!</h1>\n<p>Feel free to try out the different features that are provided, please note that the <strong>MoxieManager</strong> specific functionality is part of our commercial offering. The demo is to show the integration.</p>\n<h2>Got questions or need help?</h2>\n<p>If you have questions or need help, feel free to visit our <a href="forum/index.php">community forum</a>! We also offer Enterprise <a href="enterprise/support.php">support</a> solutions. Also do not miss out on the <a href="wiki.php">documentation</a>, its a great resource wiki for understanding how TinyMCE works and integrates.</p>\n<h2>Found a bug?</h2>\n<p>If you think you have found a bug, you can use the <a href="develop/bugtracker.php">Bug Tracker</a> to report bugs to the developers.</p>\n<p>And here is a simple table for you to play with.</p>\n<table border="0">\n<tbody>\n<tr>\n<td><strong>Product</strong></td>\n<td><strong>Cost</strong></td>\n<td><strong>Really?</strong></td>\n</tr>\n<tr>\n<td>TinyMCE</td>\n<td>Free</td>\n<td>YES!</td>\n</tr>\n<tr>\n<td>Plupload</td>\n<td>Free</td>\n<td>YES!</td>\n</tr>\n</tbody>\n</table>\n<p>Enjoy our software and create great content!</p>\n<p>Oh, and by the way, don\'t forget to check out our other product called <a href="http://www.plupload.com" target="_blank">Plupload</a>, your ultimate upload solution with HTML5 upload support!</p>', '<h1><img style="float: right;" title="TinyMCE Logo" src="http://www.tinymce.com/tryit/img/tlogo.png" alt="TinyMCE Logo" width="92" height="80" />Welcome to the TinyMCE editor demo!</h1>\n<p>Feel free to try out the different features that are provided, please note that the <strong>MoxieManager</strong> specific functionality is part of our commercial offering. The demo is to show the integration.</p>\n<h2>Got questions or need help?</h2>\n<p>If you have questions or need help, feel free to visit our <a href="forum/index.php">community forum</a>! We also offer Enterprise <a href="enterprise/support.php">support</a> solutions. Also do not miss out on the <a href="wiki.php">documentation</a>, its a great resource wiki for understanding how TinyMCE works and integrates.</p>\n<h2>Found a bug?</h2>\n<p>If you think you have found a bug, you can use the <a href="develop/bugtracker.php">Bug Tracker</a> to report bugs to the developers.</p>\n<p>And here is a simple table for you to play with.</p>\n<table border="0">\n<tbody>\n<tr>\n<td><strong>Product</strong></td>\n<td><strong>Cost</strong></td>\n<td><strong>Really?</strong></td>\n</tr>\n<tr>\n<td>TinyMCE</td>\n<td>Free</td>\n<td>YES!</td>\n</tr>\n<tr>\n<td>Plupload</td>\n<td>Free</td>\n<td>YES!</td>\n</tr>\n</tbody>\n</table>\n<p>Enjoy our software and create great content!</p>\n<p>Oh, and by the way, don\'t forget to check out our other product called <a href="http://www.plupload.com" target="_blank">Plupload</a>, your ultimate upload solution with HTML5 upload support!</p>');
|
||||||
@ -1,49 +1,151 @@
|
|||||||
DELETE FROM `system_api` WHERE `group` = 42;
|
DELETE FROM `system_api` WHERE `group` = 42;
|
||||||
|
|
||||||
|
-- basic
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (0, 42, 0, -1, NULL, 'sai_mod', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (0, 42, 0, -1, NULL, 'sai_mod', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1, 42, 1, 0, NULL, 'js', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1, 42, 1, 0, NULL, 'js', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (2, 42, 1, 0, NULL, 'css', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (2, 42, 1, 0, NULL, 'css', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (3, 42, 0, 0, NULL, 'action', NULL);
|
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (3, 42, 0, 0, NULL, 'page', NULL);
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (10, 42, 2, 3, 'login', 'username', 'ALL');
|
-- system_api
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (11, 42, 2, 3, 'login', 'password_sha', 'ALL');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (10, 42, 0, -1, NULL, 'call', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (12, 42, 2, 3, 'login', 'password_md5', 'ALL');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (11, 42, 0, 10, NULL, 'action', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (20, 42, 2, 11, 'login', 'username', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (21, 42, 2, 11, 'login', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (22, 42, 2, 11, 'login', 'password_md5', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (23, 42, 2, 11, 'check', 'rightid', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (24, 42, 2, 11, 'create', 'username', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (25, 42, 2, 11, 'create', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (26, 42, 2, 11, 'create', 'email', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (27, 42, 2, 11, 'create', 'locale', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (30, 42, 2, 10, 'files', 'cat', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (31, 42, 3, 30, 'files', 'id', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (40, 42, 2, 10, 'text', 'request', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 42, 2, 40, 'text', 'lang', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 42, 2, 10, 'pages', 'group', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 42, 2, 10, 'pages', 'state', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (52, 42, 1, 50, NULL, 'js', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (53, 42, 2, 51, NULL, 'group', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 42, 1, 50, NULL, 'css', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 42, 2, 55, NULL, 'group', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 42, 4, -1, NULL, '_lang', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 42, 4, -1, NULL, '_result', 'RESULT');
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (20, 42, 2, 3, 'register', 'username', 'ALL');
|
-- specific stuff for mods
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (21, 42, 2, 3, 'register', 'password', 'ALL');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_login', 'action', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (23, 42, 2, 3, 'register', 'email', 'ALL');
|
--
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (24, 42, 3, 3, 'register', 'locale', 'ALL');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (101, 42, 2, 100, 'login', 'username', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (102, 42, 2, 100, 'login', 'password_sha', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (103, 42, 2, 100, 'login', 'password_md5', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (110, 42, 2, 100, 'register', 'username', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (111, 42, 2, 100, 'register', 'password', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (112, 42, 2, 100, 'register', 'email', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (113, 42, 3, 100, 'register', 'locale', 'ALL');
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (30, 42, 2, 3, 'edit', 'id', 'ALL');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (31, 42, 2, 3, 'edit', 'lang', 'LANG');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (32, 42, 2, 3, 'edit', 'newtext', 'ALL');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (33, 42, 2, 3, 'delete', 'id', 'ALL');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (34, 42, 2, 3, 'editmode', 'entry', 'ALL');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (35, 42, 2, 3, 'add', 'id', 'ALL');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (36, 42, 2, 3, 'add', 'category', 'INT');
|
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (40, 42, 2, 3, 'upload', 'cat', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_log', 'action', NULL);
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 42, 2, 3, 'del', 'cat', 'STRING');
|
--
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (42, 42, 2, 3, 'del', 'id', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (201, 42, 3, 200, 'filter', 'filter', 'STRING');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (43, 42, 2, 3, 'rn', 'cat', 'STRING');
|
--
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (44, 42, 2, 3, 'rn', 'id', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (210, 42, 3, 200, 'error', 'error', 'INT');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (45, 42, 2, 3, 'rn', 'newid', 'STRING');
|
--
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (200, 42, 2, 3, 'tab', 'name', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (220, 42, 0, 200, 'stats', 'name', null);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (221, 42, 3, 220, null, 'filter', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (222, 42, 3, 220, null, 'db', 'STRING');
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 42, 3, 3, 'filter', 'filter', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 42, 3, 3, 'error', 'error', 'INT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (52, 42, 0, 3, 'stats', 'name', null);
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (53, 42, 3, 52, null, 'filter', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (54, 42, 2, 3, 'user', 'username', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (55, 42, 2, 3, 'addright', 'id', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (56, 42, 2, 3, 'addright', 'name', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (57, 42, 2, 3, 'addright', 'description', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (58, 42, 2, 3, 'deleteright', 'id', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (59, 42, 2, 3, 'deleterightconfirm', 'id', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 42, 2, 3, 'addrightuser', 'rightid', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 42, 2, 3, 'addrightuser', 'userid', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (62, 42, 2, 3, 'deleterightuser', 'rightid', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (63, 42, 2, 3, 'deleterightuser', 'userid', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (120, 42, 3, 3, 'users', 'search', 'STRING');
|
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (300, 42, 4, -1, NULL, '_lang', 'LANG');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (300, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_security', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (301, 42, 2, 300, 'user', 'username', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (302, 42, 3, 300, 'users', 'search', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (310, 42, 2, 300, 'addright', 'id', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (311, 42, 2, 300, 'addright', 'name', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (312, 42, 2, 300, 'addright', 'description', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (320, 42, 2, 300, 'deleteright', 'id', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (321, 42, 2, 300, 'deleterightconfirm', 'id', 'UINT');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (330, 42, 2, 300, 'addrightuser', 'rightid', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (331, 42, 2, 300, 'addrightuser', 'userid', 'UINT');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (340, 42, 2, 300, 'deleterightuser', 'rightid', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (341, 42, 2, 300, 'deleterightuser', 'userid', 'UINT');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (400, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_sai_mods', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (500, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_config', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (600, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_api', 'action', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (601, 42, 2, 600, 'addcall', 'ID', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (602, 42, 2, 600, 'addcall', 'group', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (603, 42, 2, 600, 'addcall', 'type', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (604, 42, 2, 600, 'addcall', 'parentID', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (605, 42, 2, 600, 'addcall', 'parentValue', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (606, 42, 2, 600, 'addcall', 'name', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (607, 42, 2, 600, 'addcall', 'verify', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (608, 42, 2, 600, 'deletecall', 'ID', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (609, 42, 2, 600, 'deletedialog', 'ID', 'INT');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (700, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_locale', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (701, 42, 2, 700, 'load', 'id', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (702, 42, 2, 700, 'load', 'group', 'INT');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (710, 42, 2, 700, 'singleload', 'id', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (711, 42, 2, 700, 'singleload', 'lang', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (720, 42, 2, 700, 'delete', 'id', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (730, 42, 2, 700, 'add', 'id', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (731, 42, 2, 700, 'add', 'category', 'INT');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (740, 42, 2, 700, 'edit', 'id', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (741, 42, 2, 700, 'edit', 'lang', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (742, 42, 2, 700, 'edit', 'category', 'ALL');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (743, 42, 2, 700, 'edit', 'newtext', 'ALL');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (800, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_files', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (801, 42, 2, 800, 'upload', 'cat', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (810, 42, 2, 800, 'del', 'cat', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (811, 42, 2, 800, 'del', 'id', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (820, 42, 2, 800, 'rn', 'cat', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (821, 42, 2, 800, 'rn', 'id', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (822, 42, 2, 800, 'rn', 'newid', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (830, 42, 2, 800, 'tab', 'name', 'STRING');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (900, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cache', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1000, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_todo', 'action', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1001, 42, 2, 1000, 'todo', 'todo', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1002, 42, 2, 1000, 'open', 'todo', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1003, 42, 2, 1000, 'close', 'todo', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1004, 42, 2, 1000, 'add', 'todo', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1010, 42, 2, 1000, 'edit', 'todo', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1011, 42, 2, 1000, 'edit', 'message', 'STRING');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL);
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cron', 'action', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1201, 42, 2, 1200, 'add', 'cls', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1202, 42, 2, 1200, 'add', 'min', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1203, 42, 2, 1200, 'add', 'hour', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1204, 42, 2, 1200, 'add', 'day', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1205, 42, 2, 1200, 'add', 'day_week', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1206, 42, 2, 1200, 'add', 'month', 'INT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1208, 42, 2, 1200, 'del', 'cls', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1209, 42, 2, 1200, 'deldialog', 'cls', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1210, 42, 2, 1200, 'change', 'cls', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1211, 42, 2, 1200, 'change', 'status', 'INT');
|
||||||
9
dbd/sql/mysql/data/sai_error_locale_string.sql
Normal file
9
dbd/sql/mysql/data/sai_error_locale_string.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
DELETE FROM system_locale_string WHERE category = 43;
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_short', 43, 'Username is too short', 'Nutzername ist zu kurz');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_long', 43, 'Username is too long', 'Nutzername ist zu lang');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_username_miss', 43, 'Username required', 'Nutzername erfoderlich');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_miss', 43, 'Password required', 'Passwort erforderlich');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_long', 43, 'Password too long', 'Passwort zu lang');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_short', 43, 'Password too short', 'Passwort zu kurz');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_password_match', 43, 'Passwords do not match!', 'Passwords do not match!');
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_error_email_wrong', 43, 'Invalid EMail!', 'Invalid EMail!');
|
||||||
2
dbd/sql/mysql/data/sai_locale_string.sql
Normal file
2
dbd/sql/mysql/data/sai_locale_string.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DELETE FROM system_locale_string WHERE category = 42;
|
||||||
|
INSERT INTO `system_locale_string` (`id`, `category`, `enUS`, `deDE`) VALUES ('sai_mod_login_text', 42, 'Please login for developer access (if you are a developer).', 'Please login for developer access (if you are a developer).');
|
||||||
@ -1,14 +1,25 @@
|
|||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (0, 0, 0, -1, NULL, 'call', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (10, 0, 0, -1, NULL, 'call', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (11, 0, 0, 10, NULL, 'action', NULL);
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (60, 0, 0, 0, NULL, 'action', NULL);
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (20, 0, 2, 11, 'login', 'username', 'STRING');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (61, 0, 2, 60, 'login', 'username', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (21, 0, 2, 11, 'login', 'password_sha', 'STRING');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (62, 0, 2, 60, 'login', 'password_sha', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (22, 0, 2, 11, 'login', 'password_md5', 'STRING');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (63, 0, 2, 60, 'login', 'password_md5', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (64, 0, 2, 60, 'check', 'rightid', 'UINT');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (65, 0, 2, 60, 'create', 'username', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (66, 0, 2, 60, 'create', 'password_sha', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (67, 0, 2, 60, 'create', 'email', 'STRING');
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (68, 0, 2, 60, 'create', 'locale', 'LANG');
|
|
||||||
|
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (100, 0, 2, 0, 'files', 'cat', 'STRING');
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (23, 0, 2, 11, 'check', 'rightid', 'UINT');
|
||||||
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (101, 0, 3, 0, 'files', 'id', 'STRING');
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (24, 0, 2, 11, 'create', 'username', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (25, 0, 2, 11, 'create', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (26, 0, 2, 11, 'create', 'email', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (27, 0, 2, 11, 'create', 'locale', 'LANG');
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (30, 0, 2, 10, 'files', 'cat', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (31, 0, 3, 30, 'files', 'id', 'STRING');
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (40, 0, 2, 10, 'text', 'request', 'STRING');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (41, 0, 2, 10, 'text', 'lang', 'LANG');
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (50, 0, 2, 10, 'pages', 'group', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (51, 0, 2, 10, 'pages', 'state', 'STRING');
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (90, 0, 4, -1, NULL, '_lang', 'LANG');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (91, 0, 4, -1, NULL, '_result', 'RESULT');
|
||||||
1
dbd/sql/mysql/data/system_cron.sql
Normal file
1
dbd/sql/mysql/data/system_cron.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
INSERT INTO `system_cron` (`class`, `min`, `hour`, `day`, `day_week`, `month`, `last_run`, `status`) VALUES ('\\SYSTEM\\CRON\\cron_log2sqlite', 0, 0, 0, 0, 0, '2015-01-01 01:00:00', 0);
|
||||||
@ -1,5 +1,13 @@
|
|||||||
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (6, 'SYS_SAI_SECURITY_RIGHTS_EDIT', 'Allows deleting, editing and adding of Right in the SAI module Security');
|
|
||||||
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (5, 'SYS_SAI_SECURITY', 'Allows access to the Security Module in SAI');
|
|
||||||
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (10, 'SYS_SAI_LOCALE', 'Allows access to the Locale Module in SAI to edit or add Multilanguage Text');
|
|
||||||
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (15, 'SYS_SAI_IMG', 'Allows access to the Image Module in SAI to delete or add Pictures');
|
|
||||||
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (1, 'SYS_SAI', 'SAI access right');
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (1, 'SYS_SAI', 'SAI access right');
|
||||||
|
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (5, 'SYS_SAI_SECURITY', 'Allows access to the Security Module in SAI');
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (6, 'SYS_SAI_SECURITY_RIGHTS_EDIT', 'Allows deleting, editing and adding of Right in the SAI module Security');
|
||||||
|
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (10, 'SYS_SAI_LOCALE', 'Allows access to the Locale Module in SAI to edit or add Multilanguage Text');
|
||||||
|
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (15, 'SYS_SAI_IMG', 'Allows access to the Image Module in SAI to delete or add Pictures');
|
||||||
|
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (20, 'SYS_SAI_API', 'SAI API Access right');
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (21, 'SYS_SAI_API_EDIT', 'SAI API Edit right');
|
||||||
|
|
||||||
|
INSERT INTO `system_rights` (`ID`, `name`, `description`) VALUES (25, 'SYS_SAI_CRON', 'SAI Cron Access right');
|
||||||
13
dbd/sql/mysql/schema/system_cron.sql
Normal file
13
dbd/sql/mysql/schema/system_cron.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
CREATE TABLE `system_cron` (
|
||||||
|
`class` CHAR(255) NOT NULL,
|
||||||
|
`min` INT(10) NULL DEFAULT NULL,
|
||||||
|
`hour` INT(10) NULL DEFAULT NULL,
|
||||||
|
`day` INT(10) NULL DEFAULT NULL,
|
||||||
|
`day_week` INT(10) NULL DEFAULT NULL,
|
||||||
|
`month` INT(10) NULL DEFAULT NULL,
|
||||||
|
`last_run` TIMESTAMP NULL DEFAULT NULL,
|
||||||
|
`status` INT(11) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`class`)
|
||||||
|
)
|
||||||
|
COLLATE='utf8_general_ci'
|
||||||
|
ENGINE=InnoDB;
|
||||||
@ -22,4 +22,3 @@ CREATE TABLE `system_log` (
|
|||||||
COLLATE='utf8_general_ci'
|
COLLATE='utf8_general_ci'
|
||||||
ENGINE=MyISAM
|
ENGINE=MyISAM
|
||||||
AUTO_INCREMENT=1;
|
AUTO_INCREMENT=1;
|
||||||
|
|
||||||
|
|||||||
11
dbd/sql/mysql/schema/system_page.sql
Normal file
11
dbd/sql/mysql/schema/system_page.sql
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CREATE TABLE `system_page` (
|
||||||
|
`group` INT(10) UNSIGNED NOT NULL,
|
||||||
|
`id` CHAR(50) NOT NULL,
|
||||||
|
`div` CHAR(50) NOT NULL,
|
||||||
|
`url` TEXT NOT NULL,
|
||||||
|
`func` CHAR(50) NOT NULL,
|
||||||
|
`php_class` CHAR(50) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`, `div`, `group`)
|
||||||
|
)
|
||||||
|
COLLATE='utf8_unicode_ci'
|
||||||
|
ENGINE=InnoDB;
|
||||||
@ -1,16 +1,29 @@
|
|||||||
CREATE TABLE `system_todo` (
|
CREATE TABLE `system_todo` (
|
||||||
`ID` INT(10) NOT NULL AUTO_INCREMENT,
|
`ID` INT(10) NOT NULL AUTO_INCREMENT,
|
||||||
|
`class` TEXT NOT NULL,
|
||||||
|
`message` TEXT NOT NULL,
|
||||||
|
`message_hash` CHAR(40) NOT NULL,
|
||||||
|
`code` INT(10) UNSIGNED NOT NULL,
|
||||||
|
`file` CHAR(255) NOT NULL,
|
||||||
|
`line` INT(11) NOT NULL,
|
||||||
|
`trace` TEXT NOT NULL,
|
||||||
|
`ip` TEXT NOT NULL,
|
||||||
|
`querytime` DOUBLE NOT NULL,
|
||||||
`time` DATETIME NOT NULL,
|
`time` DATETIME NOT NULL,
|
||||||
`author` INT(11) NOT NULL,
|
`server_name` CHAR(255) NOT NULL,
|
||||||
`type` INT(11) NOT NULL,
|
`server_port` INT(10) UNSIGNED NOT NULL,
|
||||||
`state` INT(11) NOT NULL,
|
`request_uri` CHAR(255) NOT NULL,
|
||||||
`msg_1` TEXT NOT NULL,
|
`post` TEXT NOT NULL,
|
||||||
`msg_2` TEXT NULL,
|
`http_referer` CHAR(255) NOT NULL,
|
||||||
`msg_3` TEXT NULL,
|
`http_user_agent` TEXT NOT NULL,
|
||||||
`msg_4` TEXT NULL,
|
`user` INT(10) UNSIGNED NOT NULL,
|
||||||
`msg_5` TEXT NULL,
|
`thrown` BIT(1) NOT NULL,
|
||||||
PRIMARY KEY (`ID`)
|
`type` INT(11) NOT NULL DEFAULT '0',
|
||||||
|
`count` INT(11) NOT NULL DEFAULT '1',
|
||||||
|
`state` INT(11) NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`ID`),
|
||||||
|
UNIQUE INDEX `file_line_message` (`file`, `line`, `message_hash`)
|
||||||
)
|
)
|
||||||
COLLATE='utf8_general_ci'
|
COLLATE='utf8_general_ci'
|
||||||
ENGINE=MyISAM
|
ENGINE=MyISAM
|
||||||
AUTO_INCREMENT=5;
|
AUTO_INCREMENT=92;
|
||||||
23
dbd/sql/pg/data/basic_locale_string.sql
Normal file
23
dbd/sql/pg/data/basic_locale_string.sql
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
DELETE FROM system.locale_string WHERE category = 1;
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_logout', 1, 'Logout', 'Ausloggen');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_login', 1, 'Login', 'Einloggen');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_register', 1, 'Register', 'Registrieren');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_username', 1, 'Username', 'Username');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_password', 1, 'Password', 'Passwort');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_email', 1, 'EMail', 'E-Mail2');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_last_active', 1, 'Last active', 'Zuletzt aktiv');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_join_date', 1, 'Joindate', 'Beitrittsdatum');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_locale', 1, 'Locale', 'Sprache');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_admin_rights', 1, 'Admin Rights', 'Admin Rechte');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_cancel', 1, 'Cancel', 'Abbrechen');
|
||||||
|
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_text_logout', 1, 'Logout before you leave!', 'Loggen Sie sie sich aus bevor Sie gehen!');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_text_login', 1, 'Login to your Website.', 'Loggen Sie sich in ihre Website ein.');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_text_register', 1, 'Register an Account', 'Register an Account');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_text_password_miss', 1, 'Cannot really remember your Password?', 'Cannot really remember your Password?');
|
||||||
|
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_placeholder_username', 1, 'peter / peter@world.org', 'peter / peter@world.org');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_placeholder_password', 1, 'my secret123', 'geheim567');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_placeholder_email', 1, 'peter@world.org', 'peter@world.org');
|
||||||
|
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('basic_state_login', 1, 'You are logged in.', 'You are logged in.');
|
||||||
@ -1,38 +1,129 @@
|
|||||||
DELETE FROM system.api WHERE "group" = 42;
|
DELETE FROM system.api WHERE "group" = 42;
|
||||||
|
|
||||||
|
-- basic
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (0, 42, 0, -1, NULL, 'sai_mod', NULL);
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (0, 42, 0, -1, NULL, 'sai_mod', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1, 42, 1, 0, NULL, 'js', NULL);
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1, 42, 1, 0, NULL, 'js', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (2, 42, 1, 0, NULL, 'css', NULL);
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (2, 42, 1, 0, NULL, 'css', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (3, 42, 0, 0, NULL, 'action', NULL);
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (3, 42, 0, 0, NULL, 'page', NULL);
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (10, 42, 2, 3, 'login', 'username', 'ALL');
|
-- system_api
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (11, 42, 2, 3, 'login', 'password_sha', 'ALL');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (10, 42, 0, -1, NULL, 'call', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (12, 42, 2, 3, 'login', 'password_md5', 'ALL');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (11, 42, 0, 10, NULL, 'action', NULL);
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (20, 42, 2, 11, 'login', 'username', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (21, 42, 2, 11, 'login', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (22, 42, 2, 11, 'login', 'password_md5', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (23, 42, 2, 11, 'check', 'rightid', 'UINT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (24, 42, 2, 11, 'create', 'username', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (25, 42, 2, 11, 'create', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (26, 42, 2, 11, 'create', 'email', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (27, 42, 2, 11, 'create', 'locale', 'LANG');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (30, 42, 2, 10, 'files', 'cat', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (31, 42, 3, 30, 'files', 'id', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (40, 42, 4, -1, NULL, '_lang', 'LANG');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (41, 42, 4, -1, NULL, '_result', 'RESULT');
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (20, 42, 2, 3, 'register', 'username', 'ALL');
|
-- specific stuff for mods
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (21, 42, 2, 3, 'register', 'password_sha', 'ALL');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_login', 'action', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (22, 42, 2, 3, 'register', 'password_md5', 'ALL');
|
--
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (23, 42, 2, 3, 'register', 'email', 'ALL');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (101, 42, 2, 100, 'login', 'username', 'ALL');
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (24, 42, 2, 4, 'register', 'locale', 'ALL');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (102, 42, 2, 100, 'login', 'password_sha', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (103, 42, 2, 100, 'login', 'password_md5', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (110, 42, 2, 100, 'register', 'username', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (111, 42, 2, 100, 'register', 'password', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (112, 42, 2, 100, 'register', 'email', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (113, 42, 3, 100, 'register', 'locale', 'ALL');
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (30, 42, 2, 3, 'edit', 'id', 'ALL');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (31, 42, 2, 3, 'edit', 'lang', 'LANG');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (32, 42, 2, 3, 'edit', 'newtext', 'ALL');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (33, 42, 2, 3, 'delete', 'id', 'ALL');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (34, 42, 2, 3, 'editmode', 'entry', 'ALL');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (35, 42, 2, 3, 'add', 'id', 'ALL');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (36, 42, 2, 3, 'add', 'category', 'INT');
|
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (40, 42, 2, 3, 'upload', 'cat', 'STRING');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_log', 'action', NULL);
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (41, 42, 2, 3, 'del', 'cat', 'STRING');
|
--
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (42, 42, 2, 3, 'del', 'id', 'STRING');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (201, 42, 3, 200, 'filter', 'filter', 'STRING');
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (43, 42, 2, 3, 'rn', 'cat', 'STRING');
|
--
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (44, 42, 2, 3, 'rn', 'id', 'STRING');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (210, 42, 3, 200, 'error', 'error', 'INT');
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (45, 42, 2, 3, 'rn', 'newid', 'STRING');
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (220, 42, 0, 200, 'stats', 'name', null);
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (221, 42, 3, 220, null, 'filter', 'UINT');
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (50, 42, 3, 3, 'filter', 'filter', 'STRING');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (51, 42, 3, 3, 'error', 'error', 'INT');
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (52, 42, 0, 3, 'stats', 'name', null);
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (53, 42, 3, 52, null, 'filter', 'UINT');
|
|
||||||
|
|
||||||
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (300, 42, 4, -1, NULL, '_lang', 'LANG');
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (300, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_security', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (301, 42, 2, 300, 'user', 'username', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (302, 42, 3, 300, 'users', 'search', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (310, 42, 2, 300, 'addright', 'id', 'UINT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (311, 42, 2, 300, 'addright', 'name', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (312, 42, 2, 300, 'addright', 'description', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (320, 42, 2, 300, 'deleteright', 'id', 'UINT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (321, 42, 2, 300, 'deleterightconfirm', 'id', 'UINT');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (330, 42, 2, 300, 'addrightuser', 'rightid', 'UINT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (331, 42, 2, 300, 'addrightuser', 'userid', 'UINT');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (340, 42, 2, 300, 'deleterightuser', 'rightid', 'UINT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (341, 42, 2, 300, 'deleterightuser', 'userid', 'UINT');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (400, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_sai_mods', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (500, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_config', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (600, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_api', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (700, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_locale', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (701, 42, 2, 700, 'load', 'id', 'LANG');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (702, 42, 2, 700, 'load', 'group', 'INT');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (710, 42, 2, 700, 'singleload', 'id', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (711, 42, 2, 700, 'singleload', 'lang', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (720, 42, 2, 700, 'delete', 'id', 'ALL');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (730, 42, 2, 700, 'add', 'id', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (731, 42, 2, 700, 'add', 'category', 'INT');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (740, 42, 2, 700, 'edit', 'id', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (741, 42, 2, 700, 'edit', 'lang', 'LANG');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (742, 42, 2, 700, 'edit', 'category', 'ALL');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (743, 42, 2, 700, 'edit', 'newtext', 'ALL');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (800, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_files', 'action', NULL);
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (801, 42, 2, 800, 'upload', 'cat', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (810, 42, 2, 800, 'del', 'cat', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (811, 42, 2, 800, 'del', 'id', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (820, 42, 2, 800, 'rn', 'cat', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (821, 42, 2, 800, 'rn', 'id', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (822, 42, 2, 800, 'rn', 'newid', 'STRING');
|
||||||
|
--
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (830, 42, 2, 800, 'tab', 'name', 'STRING');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (900, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cache', 'action', NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1000, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_todo', 'action', NULL);
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1001, 42, 2, 1000, 'todo', 'todo', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1002, 42, 2, 1000, 'open', 'todo', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1003, 42, 2, 1000, 'close', 'todo', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1004, 42, 2, 1000, 'add', 'todo', 'STRING');
|
||||||
|
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1100, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_docu', 'action', NULL);
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_cron', 'action', NULL);
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1201, 42, 2, 1200, 'add', 'cls', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1202, 42, 2, 1200, 'add', 'min', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1203, 42, 2, 1200, 'add', 'hour', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1204, 42, 2, 1200, 'add', 'day', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1205, 42, 2, 1200, 'add', 'day_week', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1206, 42, 2, 1200, 'add', 'month', 'INT');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1208, 42, 2, 1200, 'del', 'cls', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (1209, 42, 2, 1200, 'deldialog', 'cls', 'STRING');
|
||||||
9
dbd/sql/pg/data/sai_error_locale_string.sql
Normal file
9
dbd/sql/pg/data/sai_error_locale_string.sql
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
DELETE FROM system.locale_string WHERE category = 43;
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_username_short', 43, 'Username is too short', 'Nutzername ist zu kurz');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_username_long', 43, 'Username is too long', 'Nutzername ist zu lang');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_username_miss', 43, 'Username required', 'Nutzername erfoderlich');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_password_miss', 43, 'Password required', 'Passwort erforderlich');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_password_long', 43, 'Password too long', 'Passwort zu lang');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_password_short', 43, 'Password too short', 'Passwort zu kurz');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_password_match', 43, 'Passwords do not match!', 'Passwords do not match!');
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_error_email_wrong', 43, 'Invalid EMail!', 'Invalid EMail!');
|
||||||
2
dbd/sql/pg/data/sai_locale_string.sql
Normal file
2
dbd/sql/pg/data/sai_locale_string.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
DELETE FROM system.locale_string WHERE category = 42;
|
||||||
|
INSERT INTO system.locale_string ("id", "category", "enUS", "deDE") VALUES ('sai_mod_login_text', 42, 'Please login for developer access (if you are a developer).', 'Please login for developer access (if you are a developer).');
|
||||||
19
dbd/sql/pg/data/system_api.sql
Normal file
19
dbd/sql/pg/data/system_api.sql
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (10, 42, 0, -1, NULL, 'call', NULL);
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (11, 42, 0, 10, NULL, 'action', NULL);
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (20, 42, 2, 11, 'login', 'username', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (21, 42, 2, 11, 'login', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (22, 42, 2, 11, 'login', 'password_md5', 'STRING');
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (23, 42, 2, 11, 'check', 'rightid', 'UINT');
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (24, 42, 2, 11, 'create', 'username', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (25, 42, 2, 11, 'create', 'password_sha', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (26, 42, 2, 11, 'create', 'email', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (27, 42, 2, 11, 'create', 'locale', 'LANG');
|
||||||
|
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (30, 42, 2, 10, 'files', 'cat', 'STRING');
|
||||||
|
INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (31, 42, 3, 30, 'files', 'id', 'STRING');
|
||||||
|
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (100, 0, 2, 0, 'files', 'cat', 'STRING');
|
||||||
|
-- INSERT INTO system.api ("ID", "group", type, "parentID", "parentValue", name, verify) VALUES (101, 0, 3, 0, 'files', 'id', 'STRING');
|
||||||
13
dbd/sql/pg/data/system_rights.sql
Normal file
13
dbd/sql/pg/data/system_rights.sql
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (1, 'SYS_SAI', 'SAI access right');
|
||||||
|
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (5, 'SYS_SAI_SECURITY', 'Allows access to the Security Module in SAI');
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (6, 'SYS_SAI_SECURITY_RIGHTS_EDIT', 'Allows deleting, editing and adding of Right in the SAI module Security');
|
||||||
|
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (10, 'SYS_SAI_LOCALE', 'Allows access to the Locale Module in SAI to edit or add Multilanguage Text');
|
||||||
|
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (15, 'SYS_SAI_IMG', 'Allows access to the Image Module in SAI to delete or add Pictures');
|
||||||
|
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (20, 'SYS_SAI_API', 'SAI API Access right');
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (21, 'SYS_SAI_API_EDIT', 'SAI API Edit right');
|
||||||
|
|
||||||
|
INSERT INTO system.rights (`ID`, `name`, `description`) VALUES (25, 'SYS_SAI_CRON', 'SAI Cron Access right');
|
||||||
17
dbd/sql/pg/schema/system_cron.sql
Normal file
17
dbd/sql/pg/schema/system_cron.sql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE system.cron
|
||||||
|
(
|
||||||
|
"class" character varying(255) NOT NULL,
|
||||||
|
"min" integer DEFAULT NULL,
|
||||||
|
"hour" integer DEFAULT NULL,
|
||||||
|
"day" integer DEFAULT NULL,
|
||||||
|
"day_week" integer DEFAULT NULL,
|
||||||
|
"month" integer DEFAULT NULL,
|
||||||
|
"last_run" timestamp with time zone DEFAULT NULL,
|
||||||
|
"status" integer NOT NULL DEFAULT 0,
|
||||||
|
PRIMARY KEY ("class")
|
||||||
|
)
|
||||||
|
WITH (
|
||||||
|
OIDS=FALSE
|
||||||
|
);
|
||||||
|
ALTER TABLE system.log
|
||||||
|
OWNER TO dasense;
|
||||||
30
dbd/sql/pg/schema/system_log.sql
Normal file
30
dbd/sql/pg/schema/system_log.sql
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
CREATE TABLE system.log
|
||||||
|
(
|
||||||
|
"ID" integer NOT NULL DEFAULT nextval('system."sys_log_ID_seq"'::regclass),
|
||||||
|
class text NOT NULL,
|
||||||
|
message text NOT NULL,
|
||||||
|
code integer NOT NULL,
|
||||||
|
file text NOT NULL,
|
||||||
|
line integer NOT NULL,
|
||||||
|
trace text NOT NULL,
|
||||||
|
ip text NOT NULL,
|
||||||
|
querytime double precision NOT NULL,
|
||||||
|
"time" timestamp with time zone NOT NULL DEFAULT now(),
|
||||||
|
server_name character varying(255),
|
||||||
|
server_port integer,
|
||||||
|
request_uri character varying(512),
|
||||||
|
post text,
|
||||||
|
http_referer character varying(255),
|
||||||
|
http_user_agent text,
|
||||||
|
"user" integer,
|
||||||
|
thrown integer,
|
||||||
|
CONSTRAINT system_log_pk_id PRIMARY KEY ("ID"),
|
||||||
|
CONSTRAINT system_log_fk_user FOREIGN KEY ("user")
|
||||||
|
REFERENCES system."user" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||||
|
)
|
||||||
|
WITH (
|
||||||
|
OIDS=FALSE
|
||||||
|
);
|
||||||
|
ALTER TABLE system.log
|
||||||
|
OWNER TO dasense;
|
||||||
@ -1,19 +0,0 @@
|
|||||||
CREATE TABLE system.sys_log
|
|
||||||
(
|
|
||||||
"ID" integer NOT NULL DEFAULT nextval('system."sys_log_ID_seq"'::regclass),
|
|
||||||
class text NOT NULL,
|
|
||||||
message text NOT NULL,
|
|
||||||
code integer NOT NULL,
|
|
||||||
file text NOT NULL,
|
|
||||||
line integer NOT NULL,
|
|
||||||
trace text NOT NULL,
|
|
||||||
ip text NOT NULL,
|
|
||||||
querytime double precision NOT NULL,
|
|
||||||
"time" timestamp with time zone NOT NULL DEFAULT now()
|
|
||||||
)
|
|
||||||
WITH (
|
|
||||||
OIDS=FALSE
|
|
||||||
);
|
|
||||||
ALTER TABLE system.sys_log
|
|
||||||
OWNER TO username;
|
|
||||||
|
|
||||||
@ -1,19 +1,34 @@
|
|||||||
CREATE TABLE system.todo
|
CREATE TABLE system.todo
|
||||||
(
|
(
|
||||||
"ID" integer NOT NULL,
|
"ID" integer NOT NULL,
|
||||||
"time" timestamp with time zone NOT NULL,
|
"class" text NOT NULL,
|
||||||
author integer NOT NULL,
|
"message" text NOT NULL,
|
||||||
type integer NOT NULL,
|
"message_hash" character varying(40) NOT NULL,
|
||||||
state integer NOT NULL,
|
"code" integer NOT NULL,
|
||||||
msg_1 text NOT NULL,
|
"file" text NOT NULL,
|
||||||
msg_2 text,
|
"line" integer NOT NULL,
|
||||||
msg_3 text,
|
"trace" text NOT NULL,
|
||||||
msg_4 text,
|
"ip" text NOT NULL,
|
||||||
msg_5 text,
|
"querytime" double precision NOT NULL,
|
||||||
CONSTRAINT system_todo_pk_id PRIMARY KEY ("ID")
|
"time" timestamp with time zone NOT NULL DEFAULT now(),
|
||||||
|
server_name character varying(255),
|
||||||
|
server_port integer,
|
||||||
|
request_uri character varying(512),
|
||||||
|
post text,
|
||||||
|
http_referer character varying(255),
|
||||||
|
http_user_agent text,
|
||||||
|
"user" integer,
|
||||||
|
thrown integer,
|
||||||
|
"type" integer NOT NULL DEFAULT 0,
|
||||||
|
"count" integer NOT NULL DEFAULT 1,
|
||||||
|
"state" integer NOT NULL DEFAULT 0,
|
||||||
|
CONSTRAINT system_todo_pk_id PRIMARY KEY ("ID"),
|
||||||
|
CONSTRAINT system_todo_fk_user FOREIGN KEY ("user")
|
||||||
|
REFERENCES system."user" (id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||||
)
|
)
|
||||||
WITH (
|
WITH (
|
||||||
OIDS=FALSE
|
OIDS=FALSE
|
||||||
);
|
);
|
||||||
ALTER TABLE system.todo
|
ALTER TABLE system.todo
|
||||||
OWNER TO username;
|
OWNER TO dasense;
|
||||||
18
dbd/tbl/system_cron.php
Normal file
18
dbd/tbl/system_cron.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class system_cron {
|
||||||
|
const NAME_PG = 'system.cron';
|
||||||
|
const NAME_MYS = 'system_cron';
|
||||||
|
|
||||||
|
const FIELD_CLASS = 'class';
|
||||||
|
const FIELD_MIN = 'min';
|
||||||
|
const FIELD_HOUR = 'hour';
|
||||||
|
const FIELD_DAY = 'day';
|
||||||
|
const FIELD_DAY_WEEK = 'day_week';
|
||||||
|
const FIELD_MONTH = 'month';
|
||||||
|
const FIELD_DAY_MONTH = 'day_month';
|
||||||
|
const FIELD_LAST_RUN = 'last_run';
|
||||||
|
const FIELD_STATUS = 'status';
|
||||||
|
}
|
||||||
@ -11,8 +11,7 @@ class system_locale_string {
|
|||||||
const FIELD_EN_US = 'enUS';
|
const FIELD_EN_US = 'enUS';
|
||||||
const FIELD_DE_DE = 'deDE';
|
const FIELD_DE_DE = 'deDE';
|
||||||
|
|
||||||
const VALUE_CATEGORY_TEST1 = 1;
|
const VALUE_CATEGORY_BASIC = 1;
|
||||||
const VALUE_CATEGORY_TEST2 = 2;
|
|
||||||
|
|
||||||
const VALUE_CATEGORY_SYSTEM = 10;
|
const VALUE_CATEGORY_SYSTEM = 10;
|
||||||
const VALUE_CATEGORY_SYSTEM_ERROR = 11;
|
const VALUE_CATEGORY_SYSTEM_ERROR = 11;
|
||||||
|
|||||||
15
dbd/tbl/system_page.php
Normal file
15
dbd/tbl/system_page.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class system_page {
|
||||||
|
const NAME_PG = 'system.page';
|
||||||
|
const NAME_MYS = 'system_page';
|
||||||
|
|
||||||
|
const FIELD_GROUP = 'group';
|
||||||
|
const FIELD_ID = 'id';
|
||||||
|
const FIELD_DIV = 'div';
|
||||||
|
const FIELD_URL = 'url';
|
||||||
|
const FIELD_FUNC = 'func';
|
||||||
|
|
||||||
|
const VALUE_ID_DEFAULT = 'default';
|
||||||
|
}
|
||||||
35
dbd/tbl/system_todo.php
Normal file
35
dbd/tbl/system_todo.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class system_todo {
|
||||||
|
const NAME_PG = 'system.todo';
|
||||||
|
const NAME_MYS = 'system_todo';
|
||||||
|
|
||||||
|
const FIELD_ID = 'ID';
|
||||||
|
const FIELD_CLASS = 'class';
|
||||||
|
const FIELD_MESSAGE = 'message';
|
||||||
|
const FIELD_MESSAGE_HASH = 'message_hash';
|
||||||
|
const FIELD_CODE = 'code';
|
||||||
|
const FIELD_FILE = 'file';
|
||||||
|
const FIELD_LINE = 'line';
|
||||||
|
const FIELD_TRACE = 'trace';
|
||||||
|
const FIELD_IP = 'ip';
|
||||||
|
const FIELD_QUERYTIME = 'querytime';
|
||||||
|
const FIELD_TIME = 'time';
|
||||||
|
const FIELD_SERVER_NAME = 'server_name';
|
||||||
|
const FIELD_SERVER_PORT = 'server_port';
|
||||||
|
const FIELD_REQUEST_URI = 'request_uri';
|
||||||
|
const FIELD_POST = 'post';
|
||||||
|
const FIELD_HTTP_REFERER = 'http_referer';
|
||||||
|
const FIELD_HTTP_USER_AGENT = 'http_user_agent';
|
||||||
|
const FIELD_USER = 'user';
|
||||||
|
const FIELD_THROWN = 'thrown';
|
||||||
|
|
||||||
|
const FIELD_COUNT = 'count';
|
||||||
|
const FIELD_TYPE = 'type';
|
||||||
|
const FIELD_TYPE_EXCEPTION = 0;
|
||||||
|
const FIELD_TYPE_USER = 1;
|
||||||
|
const FIELD_STATE = 'state';
|
||||||
|
const FIELD_STATE_OPEN = 0;
|
||||||
|
const FIELD_STATE_CLOSED = 1;
|
||||||
|
}
|
||||||
4
docu/autoload.inc.php
Normal file
4
docu/autoload.inc.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\DOCU');
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/register_sys_docu.php';
|
||||||
@ -1,5 +1,32 @@
|
|||||||
system
|
SYSTEM
|
||||||
======
|
======
|
||||||
System - PHP Framework
|
SYSTEM - PHP Framework
|
||||||
|
|
||||||
Licensed under MIT
|
Licensed under MIT
|
||||||
|
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
SYSTEM is a PHP Lightweight Framework.
|
||||||
|
|
||||||
|
You can obtain a copy from <https://github.com/gebhardtdasense/system/>
|
||||||
|
|
||||||
|
SYSTEM provides several management techiques and general purpose funcionality
|
||||||
|
for a PHP Environment. All features of system are optional for using, altho
|
||||||
|
might be dependent on other features or standarts SYSTEM provides.
|
||||||
|
|
||||||
|
Following funcionality is provided by SYSTEM:
|
||||||
|
|
||||||
|
* api - php post/get input validation and handling
|
||||||
|
* cache - cache using the database as storage for images/other data
|
||||||
|
* config - configuration of a SYSTEM environment, can be extended for project purposes
|
||||||
|
* db - database connection, query and prepare functionality, supporting MYSQL and POSTGRESQL, QQ
|
||||||
|
* docu - register documentation right were it is - show it in the backend
|
||||||
|
* files - file management & external access api
|
||||||
|
* log - exceptionhandling - including dbwrite options
|
||||||
|
* page - html page generation scheme
|
||||||
|
* sai - Admininterface
|
||||||
|
* security - Userlogin, register, rights, (email), session management
|
||||||
|
* system - autoload, database texts, path generation, systemconfig, time
|
||||||
@ -1,6 +1,6 @@
|
|||||||
License
|
License
|
||||||
=======
|
=======
|
||||||
Copyright (c) 2013 TU-Darmstadt, Ulf Gebhardt
|
Copyright (c) 2014 Ulf Gebhardt
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@ -1,27 +1,6 @@
|
|||||||
##Getting started
|
##Getting started
|
||||||
|
|
||||||
SYSTEM is a PHP Lightweight Framework.
|
This is an introduction how to setup a webpage with system
|
||||||
|
|
||||||
You can obtain a copy from https://github.com/gebhardtdasense/system/
|
|
||||||
|
|
||||||
SYSTEM provides several management techiques and general purpose funcionality
|
|
||||||
for a PHP Environment. All features of system are optional for using, altho
|
|
||||||
might be dependent on other features or standarts SYSTEM provides.
|
|
||||||
|
|
||||||
Following funcionality is provided by SYSTEM:
|
|
||||||
|
|
||||||
* api - php post/get input validation and handling
|
|
||||||
* cache - cache using the database as storage for images/other data
|
|
||||||
* config - configuration of a SYSTEM environment, can be extended for
|
|
||||||
project purposes
|
|
||||||
* db - database connection, query and prepare functionality,
|
|
||||||
supporting MYSQL and POSTGRESQL
|
|
||||||
* docu - register documentation right were it is - show it in the backend
|
|
||||||
* log - exceptionhandling - including dbwrite options
|
|
||||||
* page - html page generation scheme
|
|
||||||
* sai - Admininterface
|
|
||||||
* security - Userlogin, register, rights, (email), session management
|
|
||||||
* system - autoload, database texts, path generation, systemconfig, time
|
|
||||||
|
|
||||||
##Setup
|
##Setup
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,69 @@
|
|||||||
|
SYSTEM API
|
||||||
|
----------
|
||||||
|
|
||||||
|
The SYSTEM-Api allows you to validate post/get/jsonpost parameters to function-calls.
|
||||||
|
This allows you to direct calls to your website to a class which can process those
|
||||||
|
calls in a typesave maner.
|
||||||
|
|
||||||
|
WARNING: This Method breaks inheritance in some use-cases!
|
||||||
|
|
||||||
|
How it Works
|
||||||
|
------------
|
||||||
|
|
||||||
|
Mapping of URLs to Functions -> thats it basicly
|
||||||
|
|
||||||
|
The URL
|
||||||
|
|
||||||
|
http://mypage.net/api.php?call=test&action=bla¶m1=1¶m2=abc
|
||||||
|
|
||||||
|
maps to
|
||||||
|
|
||||||
|
public static function call_test_action_bla($param1,$param2){}
|
||||||
|
|
||||||
|
if you set your database properly:
|
||||||
|
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (1, 0, 0, -1, NULL, 'call', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (2, 0, 0, 1, 'test', 'action', NULL);
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (3, 0, 2, 2, 'bla', 'param1', 'UINT');
|
||||||
|
INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (4, 0, 2, 2, 'bla', 'param2', 'STRING');
|
||||||
|
|
||||||
|
(note that the params are on the same level of the tree)
|
||||||
|
now you just need a php class with your function
|
||||||
|
|
||||||
|
<?php
|
||||||
|
class my_api {
|
||||||
|
public static function call_test_action_bla($param1,$param2){}
|
||||||
|
}
|
||||||
|
|
||||||
|
and an endpoint
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once '../system/autoload.inc.php'; //SYSTEM Classes
|
||||||
|
require_once 'myproject/autoload.inc.php'; //Project Classes
|
||||||
|
|
||||||
|
require_once 'config.php';
|
||||||
|
SYSTEM\system::start($myproject_config);
|
||||||
|
\SYSTEM\system::include_ExceptionShortcut();
|
||||||
|
\SYSTEM\system::include_ResultShortcut();
|
||||||
|
\SYSTEM\system::register_errorhandler_dbwriter();
|
||||||
|
\SYSTEM\system::register_errorhandler_jsonoutput();
|
||||||
|
|
||||||
|
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','my_api',array_merge($_POST,$_GET));
|
||||||
|
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
||||||
|
|
||||||
|
check out the important line - note the use of the standartverifier - inherit it to make more verifiers available.
|
||||||
|
|
||||||
|
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','my_api',array_merge($_POST,$_GET));
|
||||||
|
|
||||||
|
To enable jsonpost use this in your endpoint:
|
||||||
|
|
||||||
|
//Direct JSON Input
|
||||||
|
$json = json_decode(file_get_contents("php://input"), true);
|
||||||
|
if(!$json){
|
||||||
|
$json = array_merge($_POST,$_GET);}
|
||||||
|
|
||||||
|
//Construct the api with the dasense specific ApiVerfy Class verify_dasense and the call handler for da-sense api-calls api_dasense
|
||||||
|
//the class api_dasense contains all stuff you would seek in the index -> look there
|
||||||
|
echo \SYSTEM\API\api::run('my_verify', 'api_dasense',$json, 25);
|
||||||
|
|
||||||
|
note the use of api group 25 - this allows you to construct several apis.
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
cache
|
||||||
|
-----
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
config
|
||||||
|
------
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
db
|
||||||
|
--
|
||||||
76
docu/system/system.db.qq.md
Normal file
76
docu/system/system.db.qq.md
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
QQ Objects
|
||||||
|
----------
|
||||||
|
|
||||||
|
Referenz: <https://github.com/ulfgebhardt/system/tree/master/db/qq>
|
||||||
|
|
||||||
|
QQ-Objekte können von zwei verschiedenen Klassen erben:
|
||||||
|
|
||||||
|
- QQ (quick query)
|
||||||
|
- QP (quick prepare)
|
||||||
|
|
||||||
|
Class Definitions:
|
||||||
|
|
||||||
|
class MY_QUERY_QQ extends \SYSTEM\DB\QQ {}
|
||||||
|
class MY_QUERY_QP extends \SYSTEM\DB\QP {}
|
||||||
|
|
||||||
|
|
||||||
|
Je nachdem was du benutzt kannst du in deinem SQL String $1,$2,$3...
|
||||||
|
benutzen oder nicht (prepare hat $1..., query hat das nicht).
|
||||||
|
Folglich mache alle Querys ohne Paramter als QQ, alle mit als QP Klasse!
|
||||||
|
|
||||||
|
Der Unterschied der Klassen ist einfach, dass bei allen Funktionen von QP
|
||||||
|
ein array mit den Parametern übergeben werden muss.
|
||||||
|
|
||||||
|
Es gibt 4 Funktionen
|
||||||
|
|
||||||
|
- QQ (selber über die daten loopen)
|
||||||
|
- Q1 (geb mir genau eine zeile)
|
||||||
|
- QA (geb mir alle Zeilen)
|
||||||
|
- QI (Insert/Delete... -> returns true)
|
||||||
|
|
||||||
|
Q1
|
||||||
|
--
|
||||||
|
|
||||||
|
MY_QUERY_QQ::Q1()
|
||||||
|
-> array(feld1 => value, feld2 => value...)
|
||||||
|
|
||||||
|
MY_QUERY_QP::Q1(array(param1,param2,...))
|
||||||
|
-> array(feld1 => value, feld2 => value...)
|
||||||
|
|
||||||
|
QA
|
||||||
|
--
|
||||||
|
|
||||||
|
MY_QUERY_QQ::QA()
|
||||||
|
-> array(array(feld1 => value, feld2 => value...), array(feld1 => ...))
|
||||||
|
MY_QUERY_QP::QA(array(param1,param2,...))
|
||||||
|
-> array(array(feld1 => value, feld2 => value...), array(feld1 => ...))
|
||||||
|
|
||||||
|
QI
|
||||||
|
--
|
||||||
|
|
||||||
|
MY_QUERY_QQ::QI()
|
||||||
|
-> true/false
|
||||||
|
MY_QUERY_QP::QI(array(param1,param2,...))
|
||||||
|
-> true/false
|
||||||
|
|
||||||
|
QQ
|
||||||
|
--
|
||||||
|
|
||||||
|
$result = array();
|
||||||
|
$rows = MY_QUERY_QQ::QQ();
|
||||||
|
while($row = $rows->next()){ //1. über alle loopen
|
||||||
|
$row[field1] = 5;
|
||||||
|
$result[] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
-> QQ Benutzen, um das Datenbank Ergebnis auszuschmücken ohne zweimal über
|
||||||
|
das ergebniss zu loopen:
|
||||||
|
|
||||||
|
Wrong
|
||||||
|
-----
|
||||||
|
$result = array();
|
||||||
|
$rows = MY_QUERY_QQ::QA(); // 1. über alle loppen
|
||||||
|
foreach($rows as $row){ // 2. über alle loopen
|
||||||
|
$row[field1] = 5;
|
||||||
|
$result[] = $row;
|
||||||
|
}
|
||||||
@ -0,0 +1,188 @@
|
|||||||
|
####autoload
|
||||||
|
|
||||||
|
Komuniktationsprobleme der Neuzeit ;-)
|
||||||
|
|
||||||
|
* E: Entwickler
|
||||||
|
* A: Admin
|
||||||
|
|
||||||
|
* ##### Lösung
|
||||||
|
|
||||||
|
* ##### * Lösung Ignorieren
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
* E: 23:36:01: Hi A
|
||||||
|
* E: 23:36:13: ich habe noch mal eine Frage an dich wegen Project21
|
||||||
|
* E: 23:36:32: ich habe es ja soweit hinbekommen die Visualisierung auf unser Handy zu bekommen
|
||||||
|
* E: 23:36:58: ich dachte mir nun, das ich jetzt am Besten einen bestehenden Algorithmus kopiere - in umbenenne und dann daran unsere Modifikationen vornehme
|
||||||
|
* E: 23:37:20: aber leider scheint das mit dem kopieren und hinzufügen in der api.php nicht getan zu sein
|
||||||
|
* E: 23:37:33: muss ich dabei sonst noch etwas beachten ?
|
||||||
|
* E: 23:37:52: weil derzeit bekomme ich in der autoload.php unter system/system
|
||||||
|
|
||||||
|
- A: 23:37:54: in der tabelle system.api müssen zeilen hinzugefügt werden
|
||||||
|
|
||||||
|
* E: 23:38:01: den fehler class not found
|
||||||
|
|
||||||
|
- A: 23:38:09: dann fehlt wohl ne klasse^^
|
||||||
|
|
||||||
|
* E: 23:38:48: mmh ich will keine neuen parameter einfügen wenn du das meinst
|
||||||
|
* E: 23:38:54: leidiglich z.b. statt heatmapRect
|
||||||
|
* E: 23:39:02: heatMapRectCoverage callen z.B.
|
||||||
|
|
||||||
|
- ##### A: 23:39:17: die klasse muss so heißen wie die datei
|
||||||
|
- A: 23:39:23: und geautoloaded werden
|
||||||
|
|
||||||
|
* E: 23:40:22: mmh ich habe jetzt im ordner preprocessing in die autload.inc.php eine zeile hinzugefügt gehabt
|
||||||
|
* E: 23:40:28: das scheint dann aber wohl nicht die richtige zu sein
|
||||||
|
* E: 23:40:35: für die visualisierungs algorithmen
|
||||||
|
* ##### * E: 23:40:42: weil Datei und Ordner heißen schon gleich
|
||||||
|
|
||||||
|
* ##### * E: 23:40:45: das habe ich berücksichtigt
|
||||||
|
|
||||||
|
- A: 23:41:01: dann ist der ordner in der die klasse liegt wohl nicht registriert
|
||||||
|
|
||||||
|
* E: 23:42:28: mmh das stimmt
|
||||||
|
* E: 23:42:39: aber in welcher autload.inc.php mache ich das bekannt ?
|
||||||
|
|
||||||
|
- A: 23:42:48: in der nächsten^^
|
||||||
|
- A: 23:42:55: die die am nächsten dran liegt
|
||||||
|
- A: 23:42:59: aber prinzipiell egal
|
||||||
|
|
||||||
|
* ##### * E: 23:43:20: mmh dann hätte ich das aber richtig gemacht
|
||||||
|
|
||||||
|
- A: 23:43:39: kp er sagt dir ja class not found
|
||||||
|
- A: 23:43:47: sprich er kann die klasse nicht laden
|
||||||
|
|
||||||
|
* E: 23:43:52: korrekt
|
||||||
|
* E: 23:43:59: den ordner scheint er aber zu finden
|
||||||
|
|
||||||
|
- A: 23:44:26: sonst schmiert der autoload mit nem fehler ab, ja
|
||||||
|
- A: 23:44:47: kp -> vll ist es einfach nicht hochgeladen, großkleinschreibeung...
|
||||||
|
|
||||||
|
* E: 23:45:05: mmh
|
||||||
|
* E: 23:45:07: ich schau mal
|
||||||
|
* E: 23:45:10: vielleicht mal alles klein schreiben
|
||||||
|
* E: 23:47:02: mmh nein
|
||||||
|
* E: 23:47:06: auch das hat nichts gebracht
|
||||||
|
|
||||||
|
- A: 23:52:23: kp
|
||||||
|
- A: 23:52:29: sonst fällt mir nix ein
|
||||||
|
|
||||||
|
* E: 23:52:50: aber in der Datenbank muss dafür nichts geändert werden oder ?
|
||||||
|
|
||||||
|
- A: 23:52:58: nö
|
||||||
|
|
||||||
|
* E: 23:52:58: die Parameter die ich übergebe sollen ja die selben bleiben
|
||||||
|
* E: 23:53:01: kk
|
||||||
|
|
||||||
|
- A: 23:53:06: hats n namespace?
|
||||||
|
|
||||||
|
* E: 23:53:09: das ist schon mal gut zu wissen
|
||||||
|
|
||||||
|
- A: 23:53:13: den musst du beim autloaden angeben
|
||||||
|
|
||||||
|
* E: 23:53:20: mmh wie meinst du das ?
|
||||||
|
|
||||||
|
- A: 23:53:27: namespace SYSTEM/LOG
|
||||||
|
- A: 23:53:41: dann musste beim autoload SYSTEM/LOG mit angeben
|
||||||
|
|
||||||
|
* E: 23:54:20: in der algorithmen klasse selbst nicht nein
|
||||||
|
|
||||||
|
- A: 23:54:31: dann müsste es passen
|
||||||
|
|
||||||
|
* E: 23:54:59: mmh seltsam seltsam
|
||||||
|
* E: 23:55:06: ich stelle ich wahrscheinlich nur zu blöd an ^^
|
||||||
|
|
||||||
|
- A: 23:55:16: xD ich hab keinen plan was du da schaffst
|
||||||
|
- ##### A: 23:55:27: aber prüfe nochmal genau groß und kleinschreibung
|
||||||
|
|
||||||
|
* E: 23:55:30: eigentlich sollte es doch nicht so kompliziert sein
|
||||||
|
|
||||||
|
- ##### A: 23:55:31: KlassenName.php
|
||||||
|
|
||||||
|
* E: 23:55:40: den ordner kopiern umbenennen
|
||||||
|
* E: 23:55:41: ne is eientlich ziemlich simpel
|
||||||
|
|
||||||
|
- A: 23:56:00: der pfad im autoload haste angepasst?!^^
|
||||||
|
|
||||||
|
* E: 23:56:23: ja da hab ich noch einen hinzugefügt
|
||||||
|
|
||||||
|
- A: 23:56:36: ajo
|
||||||
|
- A: 23:56:46: wenn er den ordner net findet schreit er auch
|
||||||
|
|
||||||
|
* E: 23:56:54: genau
|
||||||
|
* E: 23:56:59: das hab ich ja auch ausprobiert
|
||||||
|
* E: 23:57:02: durch umbennenn vom ordner
|
||||||
|
* E: 23:57:07: den findet er also scheints
|
||||||
|
|
||||||
|
- A: 23:57:12: vll ist es beim aufruf falsch geschrieben?
|
||||||
|
|
||||||
|
* E: 23:59:06: /home/mona-srv/da-sense/test2/system/system/autoload.php
|
||||||
|
* E: 23:59:11: in der datei schmiert das system dann ab
|
||||||
|
* E: 23:59:30: aber das hilft mir auch nicht so richtig weiter
|
||||||
|
|
||||||
|
- A: 23:59:32: joa mit der message class not found?
|
||||||
|
|
||||||
|
* E: 23:59:37: exakt
|
||||||
|
|
||||||
|
- A: 23:59:41: geb dir mal den klassennamen aus
|
||||||
|
- A: 23:59:50: und schau obs der gleiche ist
|
||||||
|
|
||||||
|
* E: 00:00:41: public static function autoload($class){
|
||||||
|
$classns = self::getClassNamespaceFromClass($class);
|
||||||
|
|
||||||
|
if(!self::autoload_($classns[0],$classns[1]) || (!class_exists($class) && !interface_exists($class))){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("Class not found: ".$class);}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
* E: 00:00:48: mmh was davon ist der klassenname ? :D
|
||||||
|
* E: 00:00:55: classns[0] ?
|
||||||
|
|
||||||
|
- A: 00:00:57: throw new \SYSTEM\LOG\ERROR("Class not found: ".$class);}
|
||||||
|
- A: 00:01:05: sollte dir den klassennamen schon sagen
|
||||||
|
|
||||||
|
* E: 00:01:17: Class not found: s_algo
|
||||||
|
|
||||||
|
- A: 00:01:22: ajo
|
||||||
|
|
||||||
|
* E: 00:01:23: habs mal auf 1 buchstaben reduziert
|
||||||
|
|
||||||
|
- ##### A: 00:01:26: da haste dein problem
|
||||||
|
|
||||||
|
* E: 00:01:31: um schreibfehler auszuschließen
|
||||||
|
* E: 00:01:33: mmh ?
|
||||||
|
|
||||||
|
- ##### A: 00:01:38: s_algo
|
||||||
|
|
||||||
|
- ##### A: 00:01:45: so soll die klasse heißen
|
||||||
|
|
||||||
|
- ##### A: 00:01:56: s_algo.php
|
||||||
|
|
||||||
|
* ##### * E: 00:01:58: ja so heißt sie
|
||||||
|
* E: 00:02:03: und der ornder heißt auch s_algo
|
||||||
|
|
||||||
|
- ##### A: 00:02:11: und die klasse heißt auch s_algo?
|
||||||
|
|
||||||
|
* E: 00:02:41: oh man - ja ich bin echt zu blöd :(
|
||||||
|
|
||||||
|
- A: 00:03:00: das war das erste, zweite und dritte was ich dich gefragt hab
|
||||||
|
|
||||||
|
* E: 00:03:05: zu viele namen :/
|
||||||
|
|
||||||
|
- ##### A: 00:03:07: ob die klasse wie die datei heißt
|
||||||
|
|
||||||
|
* E: 00:03:12: tut mir leid
|
||||||
|
|
||||||
|
- A: 00:03:15: np
|
||||||
|
|
||||||
|
* E: 00:03:30: ich habe dateinamen als ordnernamen fehl interpretiert
|
||||||
|
|
||||||
|
- A: 00:03:46: kk^^
|
||||||
|
|
||||||
|
* E: 00:03:50: jetzt gehts - besten Dank.
|
||||||
|
* E: 00:04:04: bin mit blödheit geschlagen echt
|
||||||
|
* E: 00:04:53: danke - dann kann ich nämlich jetzt so nach herzenslust modifizieren
|
||||||
|
* E: 00:04:57: ohne das es was macht
|
||||||
|
|
||||||
|
- A: 00:06:47: super, wenns läuft ;-)
|
||||||
3
files/autoload.inc.php
Normal file
3
files/autoload.inc.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\FILES');
|
||||||
|
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/sys/','sys');
|
||||||
@ -21,8 +21,16 @@ class files {
|
|||||||
if (!in_array($id, $folder)) {
|
if (!in_array($id, $folder)) {
|
||||||
throw new \SYSTEM\LOG\ERROR("No matching ID '" . $id . "' found.");}
|
throw new \SYSTEM\LOG\ERROR("No matching ID '" . $id . "' found.");}
|
||||||
|
|
||||||
\SYSTEM\HEADER::PNG();
|
$ext = pathinfo(self::$folders[$cat].$id);
|
||||||
return file_get_contents(self::$folders[$cat].$id);
|
$ext = strtoupper(array_key_exists('extension', $ext) ? $ext['extension'] : '');
|
||||||
|
if(\SYSTEM\HEADER::available($ext)){
|
||||||
|
call_user_func('\SYSTEM\HEADER::'.$ext);
|
||||||
|
}else{
|
||||||
|
\SYSTEM\HEADER::FILE($id);}
|
||||||
|
|
||||||
|
if(!self::file_get_contents_chunked(self::$folders[$cat].$id,4096,function($chunk,&$handle,$iteration){echo $chunk;})){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("Could not transfere File.");}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function put($cat, $id, $contents) {
|
public static function put($cat, $id, $contents) {
|
||||||
@ -44,7 +52,8 @@ class files {
|
|||||||
throw new \SYSTEM\LOG\ERROR("No matching Cat '" . $cat . "' found.");}
|
throw new \SYSTEM\LOG\ERROR("No matching Cat '" . $cat . "' found.");}
|
||||||
if(!file_exists(self::$folders[$cat].$id)){
|
if(!file_exists(self::$folders[$cat].$id)){
|
||||||
return false;}
|
return false;}
|
||||||
return rename(self::$folders[$cat].$id, self::$folders[$cat].$newid);
|
$ext = pathinfo(self::$folders[$cat].$id);
|
||||||
|
return rename(self::$folders[$cat].$id, self::$folders[$cat].$newid.'.'.$ext['extension']);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getFolder($folder) {
|
private static function getFolder($folder) {
|
||||||
@ -56,4 +65,17 @@ class files {
|
|||||||
|
|
||||||
public static function getURL($cat, $id = null) {
|
public static function getURL($cat, $id = null) {
|
||||||
return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL) . 'api.php?call=files&cat=' . $cat . '&id=' . $id;}
|
return \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL) . 'api.php?call=files&cat=' . $cat . '&id=' . $id;}
|
||||||
|
|
||||||
|
private static function file_get_contents_chunked($file,$chunk_size,$callback)
|
||||||
|
{
|
||||||
|
$handle = fopen($file, "r");
|
||||||
|
$i = 0;
|
||||||
|
while (!feof($handle))
|
||||||
|
{
|
||||||
|
call_user_func_array($callback,array(fread($handle,$chunk_size),&$handle,$i));
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
fclose($handle);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
5
log/autoload.inc.php
Normal file
5
log/autoload.inc.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\LOG');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/result','SYSTEM\LOG');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/exceptions','SYSTEM\LOG');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/error_handler','SYSTEM\LOG');
|
||||||
5
log/exceptions/CRON.php
Normal file
5
log/exceptions/CRON.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\LOG;
|
||||||
|
|
||||||
|
class CRON extends \SYSTEM\LOG\INFO{}
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace SYSTEM\LOG;
|
namespace SYSTEM\LOG;
|
||||||
|
|
||||||
class DEPRECATED extends \SYSTEM\LOG\SYSTEM_EXCEPTION {}
|
class DEPRECATED extends \SYSTEM\LOG\TODO {}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace SYSTEM\LOG;
|
namespace SYSTEM\LOG;
|
||||||
|
|
||||||
class ERROR extends \SYSTEM\LOG\SYSTEM_EXCEPTION {}
|
class ERROR extends \SYSTEM\LOG\TODO {}
|
||||||
@ -3,6 +3,7 @@ namespace SYSTEM\LOG;
|
|||||||
|
|
||||||
class SYSTEM_EXCEPTION extends \Exception {
|
class SYSTEM_EXCEPTION extends \Exception {
|
||||||
public $logged = false;
|
public $logged = false;
|
||||||
|
public $todo_logged = false;
|
||||||
public function __construct($message = "", $code = 1, $previous = NULL){
|
public function __construct($message = "", $code = 1, $previous = NULL){
|
||||||
parent::__construct($message, $code, $previous);
|
parent::__construct($message, $code, $previous);
|
||||||
\SYSTEM\LOG\log::__exception_handler($this,false);
|
\SYSTEM\LOG\log::__exception_handler($this,false);
|
||||||
|
|||||||
8
log/exceptions/TODO.php
Normal file
8
log/exceptions/TODO.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\LOG;
|
||||||
|
|
||||||
|
class TODO extends \SYSTEM\LOG\SYSTEM_EXCEPTION {
|
||||||
|
public function __construct($message = "", $code = 1, $previous = NULL){
|
||||||
|
parent::__construct($message, $code, $previous);
|
||||||
|
\SYSTEM\SAI\saimod_sys_todo::exception($this,false);}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace SYSTEM\LOG;
|
namespace SYSTEM\LOG;
|
||||||
|
|
||||||
class WARNING extends \SYSTEM\LOG\SYSTEM_EXCEPTION {}
|
class WARNING extends \SYSTEM\LOG\TODO {}
|
||||||
2
log/exceptions_shortcut/TODO.php
Normal file
2
log/exceptions_shortcut/TODO.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
class TODO extends \SYSTEM\LOG\TODO {}
|
||||||
@ -4,4 +4,6 @@ namespace SYSTEM\PAGE;
|
|||||||
|
|
||||||
abstract class Page {
|
abstract class Page {
|
||||||
abstract public function html();
|
abstract public function html();
|
||||||
|
//abstract public function js();
|
||||||
|
//abstract public function css();
|
||||||
}
|
}
|
||||||
21
page/State.php
Normal file
21
page/State.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\PAGE;
|
||||||
|
class State {
|
||||||
|
public static function get($group,$state){
|
||||||
|
$state = \explode(';', $state);
|
||||||
|
$vars = array();
|
||||||
|
for($i=1;$i<count($state);$i++){
|
||||||
|
$var = \explode('.',$state[$i]);
|
||||||
|
$vars[$var[0]] = $var[1];}
|
||||||
|
$result = array();
|
||||||
|
$res = \SYSTEM\DBD\SYS_PAGE_GROUP::QQ(array($group,$state[0]));
|
||||||
|
while($row = $res->next()){
|
||||||
|
$row['url'] = \SYSTEM\PAGE\replace::replace($row['url'], $vars);
|
||||||
|
$row['css'] = $row['js'] = array();
|
||||||
|
if(/*\is_callable($row['php_class']) &&*/ \class_exists($row['php_class']) && \method_exists($row['php_class'], 'css') && \is_callable($row['php_class'].'::css')){
|
||||||
|
$row['css'] = array_merge($row['css'], call_user_func($row['php_class'].'::css'));}
|
||||||
|
if(/*\is_callable($row['php_class']) &&*/ \class_exists($row['php_class']) && \method_exists($row['php_class'], 'js') && \is_callable($row['php_class'].'::js')){
|
||||||
|
$row['js'] = array_merge($row['js'], call_user_func($row['php_class'].'::js'));}
|
||||||
|
$result[] = $row;}
|
||||||
|
return \SYSTEM\LOG\JsonResult::toString($result);}
|
||||||
|
}
|
||||||
2
page/autoload.inc.php
Normal file
2
page/autoload.inc.php
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\PAGE');
|
||||||
@ -1,32 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace SYSTEM\PAGE;
|
namespace SYSTEM\PAGE;
|
||||||
|
|
||||||
class replace
|
class replace
|
||||||
{
|
{
|
||||||
|
|
||||||
public static function replace($text, $vars){
|
public static function replace($text, $vars){
|
||||||
|
if(!$vars){
|
||||||
|
$vars = array();}
|
||||||
$search = array();
|
$search = array();
|
||||||
$replace = array();
|
$replace = array();
|
||||||
|
|
||||||
foreach(array_keys($vars) as $var){
|
foreach($vars as $key=>$value){
|
||||||
$search[] = '/\${'.$var.'}/';
|
if(!is_array($value)){
|
||||||
|
$search[] = '/\${'.$key.'}/';
|
||||||
|
$replace[] = $value;}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($vars as $var){
|
|
||||||
$replace[] = $var;
|
|
||||||
}
|
|
||||||
|
|
||||||
return @preg_replace($search, $replace, $text);
|
return @preg_replace($search, $replace, $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function replaceFile($path, $vars){
|
public static function replaceFile($path, $vars){
|
||||||
|
|
||||||
$buffer = file_get_contents($path);
|
$buffer = file_get_contents($path);
|
||||||
|
return self::replace($buffer, $vars);}
|
||||||
return self::replace($buffer, $vars);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SAI');
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/sai','SYSTEM\SAI');
|
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/sai','SYSTEM\SAI');
|
||||||
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/page','SYSTEM\SAI');
|
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/page','SYSTEM\SAI');
|
||||||
|
require_once dirname(__FILE__).'/modules/autoload.inc';
|
||||||
require_once dirname(__FILE__).'/modules/autoload_modules.php';
|
|
||||||
require_once dirname(__FILE__).'/modules/register_modules.php';
|
|
||||||
16
sai/modules/autoload.inc
Normal file
16
sai/modules/autoload.inc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SAI');
|
||||||
|
require_once dirname(__FILE__).'/saistart_sys_sai/autoload.inc';
|
||||||
|
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_log/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_security/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_mod/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_config/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_api/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_locale/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_files/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_cache/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_cron/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_todo/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_docu/autoload.inc';
|
||||||
|
require_once dirname(__FILE__).'/saimod_sys_login/autoload.inc';
|
||||||
@ -1,14 +0,0 @@
|
|||||||
<?php
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saistart_sys_sai','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_login','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_log','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_security','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_mod','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_config','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_api','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_locale','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_cache','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_docu','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_todo','SYSTEM\SAI');
|
|
||||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_sys_files','SYSTEM\SAI');
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_log');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_security');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_mod');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_config');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_api');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_locale');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_files');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_cache');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_todo');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_docu');
|
|
||||||
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_login');
|
|
||||||
5
sai/modules/saimod_sys_api/autoload.inc
Normal file
5
sai/modules/saimod_sys_api/autoload.inc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SAI');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq/','SYSTEM\DBD');
|
||||||
|
|
||||||
|
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_api');
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<tr class="${tr_class}">
|
|
||||||
<td>${ID}</td>
|
|
||||||
<td>${group}</td>
|
|
||||||
<td>${type}</td>
|
|
||||||
<td>${parentID}</td>
|
|
||||||
<td>${parentValue}</td>
|
|
||||||
<td>${name}</td>
|
|
||||||
<td>${verify}</td>
|
|
||||||
</tr>
|
|
||||||
11
sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php
Normal file
11
sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_ADD.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_SAIMOD_API_ADD extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'INSERT INTO '.\SYSTEM\DBD\system_api::NAME_PG.' (ID, group, type, parentID, parentValue, name, verify) VALUES ($1, $2, $3, $4, $5, $6, $7);',
|
||||||
|
//mys
|
||||||
|
'INSERT INTO '.\SYSTEM\DBD\system_api::NAME_MYS.' (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (?, ?, ?, ?, ?, ?, ?);'
|
||||||
|
);}}
|
||||||
11
sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_DEL.php
Normal file
11
sai/modules/saimod_sys_api/qq/SYS_SAIMOD_API_DEL.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_SAIMOD_API_DEL extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'DELETE FROM '.\SYSTEM\DBD\system_api::NAME_PG.' WHERE `ID` = $1;',
|
||||||
|
//mys
|
||||||
|
'DELETE FROM '.\SYSTEM\DBD\system_api::NAME_MYS.' WHERE `ID` = ?;'
|
||||||
|
);}}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\DBD;
|
||||||
|
|
||||||
|
class SYS_SAIMOD_API_SINGLE_SELECT extends \SYSTEM\DB\QP {
|
||||||
|
protected static function query(){
|
||||||
|
return new \SYSTEM\DB\QQuery(get_class(),
|
||||||
|
//pg
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_api::NAME_PG.' WHERE ID = $1;',
|
||||||
|
//mys
|
||||||
|
'SELECT * FROM '.\SYSTEM\DBD\system_api::NAME_MYS.' WHERE ID = ?;'
|
||||||
|
);}}
|
||||||
64
sai/modules/saimod_sys_api/saimod_sys_api.css
Normal file
64
sai/modules/saimod_sys_api/saimod_sys_api.css
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
p {
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
.tree {
|
||||||
|
min-height:20px;
|
||||||
|
padding:19px;
|
||||||
|
margin-bottom:20px;
|
||||||
|
background-color:#fbfbfb;
|
||||||
|
border:1px solid #999;
|
||||||
|
-webkit-border-radius:4px;
|
||||||
|
-moz-border-radius:4px;
|
||||||
|
border-radius:4px;
|
||||||
|
-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05)
|
||||||
|
}
|
||||||
|
.tree li {
|
||||||
|
list-style-type:none;
|
||||||
|
margin:0;
|
||||||
|
padding:10px 5px 0 5px;
|
||||||
|
position:relative
|
||||||
|
}
|
||||||
|
.tree li::before, .tree li::after {
|
||||||
|
content:'';
|
||||||
|
left:-20px;
|
||||||
|
position:absolute;
|
||||||
|
right:auto
|
||||||
|
}
|
||||||
|
.tree li::before {
|
||||||
|
border-left:1px solid #999;
|
||||||
|
bottom:50px;
|
||||||
|
height:100%;
|
||||||
|
top:0;
|
||||||
|
width:1px
|
||||||
|
}
|
||||||
|
.tree li::after {
|
||||||
|
border-top:1px solid #999;
|
||||||
|
height:20px;
|
||||||
|
top:25px;
|
||||||
|
width:25px
|
||||||
|
}
|
||||||
|
.tree li span {
|
||||||
|
-moz-border-radius:5px;
|
||||||
|
-webkit-border-radius:5px;
|
||||||
|
border:1px solid #999;
|
||||||
|
border-radius:5px;
|
||||||
|
display:inline-block;
|
||||||
|
padding:3px 8px;
|
||||||
|
text-decoration:none
|
||||||
|
}
|
||||||
|
.tree li.parent_li>span {
|
||||||
|
cursor:pointer
|
||||||
|
}
|
||||||
|
.tree>ul>li::before, .tree>ul>li::after {
|
||||||
|
border:0
|
||||||
|
}
|
||||||
|
.tree li:last-child::before {
|
||||||
|
height:30px
|
||||||
|
}
|
||||||
|
.tree li.parent_li>span:hover, .tree li.parent_li>span:hover+ul li span {
|
||||||
|
background:#eee;
|
||||||
|
border:1px solid #94a0b4;
|
||||||
|
color:#000
|
||||||
|
}
|
||||||
@ -1,3 +1,98 @@
|
|||||||
|
var currentID = '';
|
||||||
|
|
||||||
function init__SYSTEM_SAI_saimod_sys_api() {
|
function init__SYSTEM_SAI_saimod_sys_api() {
|
||||||
|
saimod_sys_api_tree();
|
||||||
|
saimod_sys_api_register_clickevents();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saimod_sys_api_loadcontent(){
|
||||||
|
$('#api_wrapper').load(SAI_ENDPOINT+'sai_mod=.SYSTEM.SAI.saimod_sys_api', function(){
|
||||||
|
console.log('api module loaded');
|
||||||
|
saimod_sys_api_register_clickevents();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function saimod_sys_api_register_clickevents(){
|
||||||
|
$('tr.api_entries').click(function() {
|
||||||
|
console.log("ahsf");
|
||||||
|
currentID = $(this).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
url: SAI_ENDPOINT,
|
||||||
|
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_api',
|
||||||
|
action: 'deletedialog',
|
||||||
|
ID: currentID},
|
||||||
|
type: 'GET',
|
||||||
|
success: function(data) {
|
||||||
|
console.log("works");
|
||||||
|
$('#api_content').html(data);
|
||||||
|
$('#del_api_close').click(function() {
|
||||||
|
console.log("olenski");
|
||||||
|
$('#del_api_description').hide();
|
||||||
|
$('#del_api_del').show();
|
||||||
|
saimod_sys_api_loadcontent();
|
||||||
|
});
|
||||||
|
$('#del_api_del').click(function() {
|
||||||
|
$.ajax({
|
||||||
|
url: SAI_ENDPOINT,
|
||||||
|
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_api',
|
||||||
|
action: 'deletecall',
|
||||||
|
ID: currentID},
|
||||||
|
type: 'GET',
|
||||||
|
success: function(data) {
|
||||||
|
console.log("api call deleted");
|
||||||
|
$('#api_deletedialog').html('<p>Api call deleted!</p>');
|
||||||
|
$('#del_api_del').hide();
|
||||||
|
}});});}});});
|
||||||
|
|
||||||
|
$('#addcall').click(function() {
|
||||||
|
var id = $('#new_call_id').val();
|
||||||
|
var group = $('#new_call_group').val();
|
||||||
|
var type = $('#new_call_type').val();
|
||||||
|
var parentid = $('#new_call_parentid').val();
|
||||||
|
var parentvalue = $('#new_call_parentvalue').val();
|
||||||
|
var name = $('#new_call_name').val();
|
||||||
|
var verify = $('#new_call_verify').val();
|
||||||
|
$.ajax({
|
||||||
|
url: SAI_ENDPOINT,
|
||||||
|
data: { sai_mod: '.SYSTEM.SAI.saimod_sys_api',
|
||||||
|
action: 'addcall',
|
||||||
|
ID: id,
|
||||||
|
group: group,
|
||||||
|
type: type,
|
||||||
|
parentID: parentid,
|
||||||
|
parentValue : parentvalue,
|
||||||
|
name: name,
|
||||||
|
verify: verify},
|
||||||
|
type: 'GET',
|
||||||
|
success: function(data) {
|
||||||
|
console.log("new api call added");
|
||||||
|
saimod_sys_api_loadcontent();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
$('#del_api_close').click(function() {
|
||||||
|
console.log("olenski");
|
||||||
|
$('#del_api_description').hide();
|
||||||
|
$('#del_api_del').show();
|
||||||
|
saimod_sys_api_loadcontent();
|
||||||
|
});
|
||||||
$('#localetab a').click(function (e) {e.preventDefault(); $(this).tab('show');});
|
$('#localetab a').click(function (e) {e.preventDefault(); $(this).tab('show');});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function saimod_sys_api_tree(){
|
||||||
|
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
|
||||||
|
$('.tree li.parent_li > span').on('click', function (e) {
|
||||||
|
var children = $(this).parent('li.parent_li').find(' > ul > li');
|
||||||
|
if (children.is(":visible")) {
|
||||||
|
children.hide('fast');
|
||||||
|
$(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
|
||||||
|
} else {
|
||||||
|
children.show('fast');
|
||||||
|
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
|
||||||
|
}
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -19,7 +19,7 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule {
|
|||||||
$vars2 = array( 'active' => ($first ? 'active' : ''),
|
$vars2 = array( 'active' => ($first ? 'active' : ''),
|
||||||
'tab_id' => $r['group']);
|
'tab_id' => $r['group']);
|
||||||
$first = false;
|
$first = false;
|
||||||
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tabopt.tpl'), $vars2);
|
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tabopt.tpl'), $vars2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||||
@ -33,7 +33,7 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule {
|
|||||||
$tabs[$r['group']]['content'] = isset($tabs[$r['group']]['content']) ? $tabs[$r['group']]['content'] : '';
|
$tabs[$r['group']]['content'] = isset($tabs[$r['group']]['content']) ? $tabs[$r['group']]['content'] : '';
|
||||||
$r['tr_class'] = self::tablerow_class($r['type']);
|
$r['tr_class'] = self::tablerow_class($r['type']);
|
||||||
$r['type'] = self::type_names($r['type']);
|
$r['type'] = self::type_names($r['type']);
|
||||||
$tabs[$r['group']]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/list_entry.tpl'), $r);
|
$tabs[$r['group']]['content'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/list_entry.tpl'), $r);
|
||||||
}
|
}
|
||||||
|
|
||||||
$vars['tabs'] = '';
|
$vars['tabs'] = '';
|
||||||
@ -41,15 +41,36 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule {
|
|||||||
foreach($tabs as $tab){
|
foreach($tabs as $tab){
|
||||||
$tab['active'] = ($first ? 'active' : '');
|
$tab['active'] = ($first ? 'active' : '');
|
||||||
$first = false;
|
$first = false;
|
||||||
$vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tab.tpl'), $tab);}
|
$vars['tabs'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tab.tpl'), $tab);}
|
||||||
|
|
||||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tabs.tpl'), $vars);
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/tabs.tpl'), $vars);
|
||||||
|
|
||||||
/* $result = "";
|
/* $result = "";
|
||||||
$result .= '<tr class="'.self::tablerow_class($r['type']).'">'.'<td>'.$r['ID'].'</td>'.'<td>'.$r['group'].'</td>'.'<td>'.$r['type'].'</td>'.'<td>'.$r['parentID'].'</td>'.'<td>'.$r['parentValue'].'</td>'.'<td>'.$r['name'].'</td>'.'<td>'.$r['verify'].'</td>'.'</tr>';
|
$result .= '<tr class="'.self::tablerow_class($r['type']).'">'.'<td>'.$r['ID'].'</td>'.'<td>'.$r['group'].'</td>'.'<td>'.$r['type'].'</td>'.'<td>'.$r['parentID'].'</td>'.'<td>'.$r['parentValue'].'</td>'.'<td>'.$r['name'].'</td>'.'<td>'.$r['verify'].'</td>'.'</tr>';
|
||||||
return $result;*/
|
return $result;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function sai_mod__system_sai_saimod_sys_api_action_deletedialog($ID){
|
||||||
|
$res = \SYSTEM\DBD\SYS_SAIMOD_API_SINGLE_SELECT::Q1(array($ID));
|
||||||
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/tpl/delete_dialog.tpl'), $res);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sai_mod__system_sai_saimod_sys_api_action_addcall($ID,$group,$type,$parentID,$parentValue,$name,$verify){
|
||||||
|
if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("You dont have edit Rights - Cant proceeed");}
|
||||||
|
if($parentValue == ''){ $parentValue = NULL;}
|
||||||
|
if($verify == ''){ $verify = NULL;}
|
||||||
|
\SYSTEM\DBD\SYS_SAIMOD_API_ADD::QI(array($ID,$group,$type,$parentID,$parentValue,$name,$verify));
|
||||||
|
return \SYSTEM\LOG\JsonResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function sai_mod__system_sai_saimod_sys_api_action_deletecall($ID){
|
||||||
|
if(!\SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API)){
|
||||||
|
throw new \SYSTEM\LOG\ERROR("You dont have edit Rights - Cant proceeed");}
|
||||||
|
\SYSTEM\DBD\SYS_SAIMOD_API_DEL::QI(array($ID));
|
||||||
|
return \SYSTEM\LOG\JsonResult::ok();
|
||||||
|
}
|
||||||
|
|
||||||
private static function type_names($type){
|
private static function type_names($type){
|
||||||
switch($type){
|
switch($type){
|
||||||
case 0: return 'COMMAND';
|
case 0: return 'COMMAND';
|
||||||
@ -72,9 +93,11 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule {
|
|||||||
|
|
||||||
public static function html_li_menu(){return '<li><a href="#" saimenu=".SYSTEM.SAI.saimod_sys_api">API</a></li>';}
|
public static function html_li_menu(){return '<li><a href="#" saimenu=".SYSTEM.SAI.saimod_sys_api">API</a></li>';}
|
||||||
public static function right_public(){return false;}
|
public static function right_public(){return false;}
|
||||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI) && \SYSTEM\SECURITY\Security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI_API);}
|
||||||
|
|
||||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_api_flag_css(){}
|
public static function sai_mod__SYSTEM_SAI_saimod_sys_api_flag_css(){
|
||||||
|
return \SYSTEM\LOG\JsonResult::toString(
|
||||||
|
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/saimod_sys_api.css')));}
|
||||||
public static function sai_mod__SYSTEM_SAI_saimod_sys_api_flag_js(){
|
public static function sai_mod__SYSTEM_SAI_saimod_sys_api_flag_js(){
|
||||||
return \SYSTEM\LOG\JsonResult::toString(
|
return \SYSTEM\LOG\JsonResult::toString(
|
||||||
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/saimod_sys_api.js')));}
|
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_api/saimod_sys_api.js')));}
|
||||||
|
|||||||
@ -1,10 +0,0 @@
|
|||||||
<h4>System API</h4>
|
|
||||||
<hr>
|
|
||||||
<div class="tabbable">
|
|
||||||
<ul class="nav nav-tabs" id="localetab">
|
|
||||||
${tabopts}
|
|
||||||
</ul>
|
|
||||||
<div class="tab-content">
|
|
||||||
${tabs}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
26
sai/modules/saimod_sys_api/tpl/delete_dialog.tpl
Normal file
26
sai/modules/saimod_sys_api/tpl/delete_dialog.tpl
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<div id="api_deletedialog">
|
||||||
|
<h5>Api Call: ${ID}</h5>
|
||||||
|
<hr>
|
||||||
|
<table class="table sai_table">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Group</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>ParentID</th>
|
||||||
|
<th>ParentValue</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Verify</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>${ID}</td>
|
||||||
|
<td>${group}</td>
|
||||||
|
<td>${type}</td>
|
||||||
|
<td>${parentID}</td>
|
||||||
|
<td>${parentValue}</td>
|
||||||
|
<td>${name}</td>
|
||||||
|
<td>${verify}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-small btn-danger" id="del_api_del">Delete</button>
|
||||||
|
<button type="button" class="btn btn-small" id="del_api_close">Close</button>
|
||||||
9
sai/modules/saimod_sys_api/tpl/list_entry.tpl
Normal file
9
sai/modules/saimod_sys_api/tpl/list_entry.tpl
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<tr class="${tr_class} api_entries" id="${ID}" group="${group}" typ="${type}" parentID="${parentID}" parentValue="${parentValue}" name="${name}" verify="${verify}">
|
||||||
|
<td>${ID}</td>
|
||||||
|
<td>${group}</td>
|
||||||
|
<td>${type}</td>
|
||||||
|
<td>${parentID}</td>
|
||||||
|
<td>${parentValue}</td>
|
||||||
|
<td>${name}</td>
|
||||||
|
<td>${verify}</td>
|
||||||
|
</tr>
|
||||||
36
sai/modules/saimod_sys_api/tpl/tabs.tpl
Normal file
36
sai/modules/saimod_sys_api/tpl/tabs.tpl
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<div id="api_wrapper">
|
||||||
|
<h4>System API</h4>
|
||||||
|
<hr>
|
||||||
|
<div id="api_content">
|
||||||
|
<div class="tabbable">
|
||||||
|
<ul class="nav nav-tabs" id="localetab">
|
||||||
|
${tabopts}
|
||||||
|
</ul>
|
||||||
|
<div class="tab-content">
|
||||||
|
${tabs}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover table-condensed" style="overflow: auto;">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Group</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>ParentID</th>
|
||||||
|
<th>ParentValue</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Verify</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><input type="text" id="new_call_id" placeholder="new id" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_group" placeholder="new group" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_type" placeholder="new type" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_parentid" placeholder="parent id" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_parentvalue" placeholder="parent value" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_name" placeholder="name" style="width: 140px;"></td>
|
||||||
|
<td><input type="text" id="new_call_verify" placeholder="verify" style="width: 140px;"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<button type="button" class="btn-small btn-success" id="addcall">Add</button>
|
||||||
|
</div><!-- /.modal -->
|
||||||
|
</div>
|
||||||
5
sai/modules/saimod_sys_cache/autoload.inc
Normal file
5
sai/modules/saimod_sys_cache/autoload.inc
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\SAI');
|
||||||
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/qq/','SYSTEM\DBD');
|
||||||
|
|
||||||
|
\SYSTEM\SAI\sai::register_sys('\SYSTEM\SAI\saimod_sys_cache');
|
||||||
0
sai/modules/saimod_sys_cache/qq/dummy
Normal file
0
sai/modules/saimod_sys_cache/qq/dummy
Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user