diff --git a/api/api.php b/api/api.php
index c68b393..371b492 100644
--- a/api/api.php
+++ b/api/api.php
@@ -63,17 +63,16 @@ class api {
$result = \SYSTEM\DBD\SYS_API_TREE::QA(array($group));
if(!isset($result) || !is_array($result) || count($result) <= 0){
throw new \SYSTEM\LOG\ERROR("Database Tree for Api empty - cannot proced! GROUP: ".$group);}
-
return $result;
}
private static function do_statics($params,$tree,$apiclassname,$verifyclassname,$default){
$statics = array();
$parentid = self::ROOT_PARENTID;
- foreach($tree as $item){
+ foreach($tree as $item){
if( intval($item[\SYSTEM\DBD\system_api::FIELD_TYPE]) == \SYSTEM\DBD\system_api::VALUE_TYPE_STATIC &&
intval($item[\SYSTEM\DBD\system_api::FIELD_PARENTID]) == $parentid &&
- isset($params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]])){
+ isset($params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]])){
$statics[] = array($item,$params[$item[\SYSTEM\DBD\system_api::FIELD_NAME]]);
$call_funcname = 'static_'.$item[\SYSTEM\DBD\system_api::FIELD_NAME];
diff --git a/api/api_system.php b/api/api_system.php
index 736e2e0..832ca95 100644
--- a/api/api_system.php
+++ b/api/api_system.php
@@ -3,39 +3,20 @@
namespace SYSTEM\API;
class api_system extends api_login{
- /*
- INSERT INTO `system_api_calls` (`ID`, `Flag`, `ParentID`, `ParentValue`, `Name`, `AllowedValues`) VALUES (0, 0, -1, NULL, 'call', NULL);
- 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');
- 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){
+ public static function call_cron(){
+ return \SYSTEM\CRON\cron::run();}
+
+ public static function call_text($request,$lang){
return \SYSTEM\LOG\JsonResult::toString(\SYSTEM\locale::getStrings($request, $lang));}
public static function call_files($cat,$id = null){
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){
\SYSTEM\locale::set($lang);}
public static function static__result($result){
- \SYSTEM\CONFIG\config::set(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, $result);}
+ \SYSTEM\CONFIG\config::set(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DEFAULT_RESULT, $result);}
}
\ No newline at end of file
diff --git a/api/autoload.inc.php b/api/autoload.inc.php
new file mode 100644
index 0000000..9c5b8af
--- /dev/null
+++ b/api/autoload.inc.php
@@ -0,0 +1,2 @@
+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'];}
+}
\ No newline at end of file
diff --git a/cron/cron_log2sqlite.php b/cron/cron_log2sqlite.php
new file mode 100644
index 0000000..76af1c4
--- /dev/null
+++ b/cron/cron_log2sqlite.php
@@ -0,0 +1,70 @@
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/cron/cronjob.php b/cron/cronjob.php
new file mode 100644
index 0000000..da27e93
--- /dev/null
+++ b/cron/cronjob.php
@@ -0,0 +1,6 @@
+ 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);}
+}
\ No newline at end of file
diff --git a/db/autoload.inc.php b/db/autoload.inc.php
new file mode 100644
index 0000000..2bca5de
--- /dev/null
+++ b/db/autoload.inc.php
@@ -0,0 +1,6 @@
+connection = new \SYSTEM\DB\ConnectionPG($dbinfo);
} else if ($dbinfo instanceof \SYSTEM\DB\DBInfoMYS){
$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);
+ } else if ($dbinfo instanceof \SYSTEM\DB\DBInfoSQLite){
+ $this->connection = new \SYSTEM\DB\ConnectionSQLite($dbinfo);
} else {
throw new \Exception('Could not understand Database Settings. Check ur Database Settings');}
}
@@ -39,4 +41,7 @@ class Connection extends ConnectionAbstr{
//Query connected Database
public function query($query){
return $this->connection->query($query);}
+
+ public function exec($query){
+ return $this->connection->exec($query);}
}
\ No newline at end of file
diff --git a/db/connection/ConnectionAMQP.php b/db/connection/ConnectionAMQP.php
index 41aef29..99d9784 100644
--- a/db/connection/ConnectionAMQP.php
+++ b/db/connection/ConnectionAMQP.php
@@ -28,12 +28,14 @@ class ConnectionAMQP extends ConnectionAbstr {
$exchange->setFlags(AMQP_DURABLE);
$exchange->setName('exchange2');
$exchange->setType('direct');
- $exchange->declare();
+ //$exchange->declare();
+ $exchange->declareExchange();
$queue = new \AMQPQueue($channel);
$queue->setName('series');
$queue->setFlags(AMQP_DURABLE | AMQP_AUTODELETE);
- $queue->declare();
+ //$queue->declare();
+ $queue->declareQueue();
$queue->bind('exchange2','series');
$channel->startTransaction();
diff --git a/db/connection/ConnectionMYS.php b/db/connection/ConnectionMYS.php
index 2dc4bc1..8cb69af 100644
--- a/db/connection/ConnectionMYS.php
+++ b/db/connection/ConnectionMYS.php
@@ -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);
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)){
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(){
diff --git a/db/connection/ConnectionPG.php b/db/connection/ConnectionPG.php
index aaa0e73..58190f3 100644
--- a/db/connection/ConnectionPG.php
+++ b/db/connection/ConnectionPG.php
@@ -13,7 +13,7 @@ class ConnectionPG extends ConnectionAbstr {
$this->connection = pg_connect("host=".$dbinfo->m_host." port=".$dbinfo->m_port." dbname=".$dbinfo->m_database."
user=".$dbinfo->m_user." password=".$dbinfo->m_password."");
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(){}
diff --git a/db/connection/ConnectionSQLite.php b/db/connection/ConnectionSQLite.php
new file mode 100644
index 0000000..1cca3a3
--- /dev/null
+++ b/db/connection/ConnectionSQLite.php
@@ -0,0 +1,48 @@
+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);
+ }
+}
\ No newline at end of file
diff --git a/db/dbinfo/DBInfoSQLite.php b/db/dbinfo/DBInfoSQLite.php
new file mode 100644
index 0000000..c89dd8e
--- /dev/null
+++ b/db/dbinfo/DBInfoSQLite.php
@@ -0,0 +1,15 @@
+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");}
+ }
+}
\ No newline at end of file
diff --git a/db/qq/QQ.php b/db/qq/QQ.php
index 775623c..ab86314 100644
--- a/db/qq/QQ.php
+++ b/db/qq/QQ.php
@@ -26,7 +26,7 @@ class QQ {
return self::QQ()->next();}
public static function QI(){
$qq = self::QQ();
- return $qq->affectedRows() != (0||null);}
+ return $qq;}
//override this
protected static function query(){
throw new \SYSTEM\LOG\ERROR('query function of your QQ Class not overwritten!');}
diff --git a/db/result/ResultSQLite.php b/db/result/ResultSQLite.php
new file mode 100644
index 0000000..7a7996f
--- /dev/null
+++ b/db/result/ResultSQLite.php
@@ -0,0 +1,81 @@
+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);}
+}
\ No newline at end of file
diff --git a/dbd/autoload.inc.php b/dbd/autoload.inc.php
new file mode 100644
index 0000000..3cfa7e3
--- /dev/null
+++ b/dbd/autoload.inc.php
@@ -0,0 +1,3 @@
+
Welcome to the TinyMCE editor demo!\n
Feel free to try out the different features that are provided, please note that the MoxieManager specific functionality is part of our commercial offering. The demo is to show the integration.
\nIf you have questions or need help, feel free to visit our community forum! We also offer Enterprise support solutions. Also do not miss out on the documentation, its a great resource wiki for understanding how TinyMCE works and integrates.
\nIf you think you have found a bug, you can use the Bug Tracker to report bugs to the developers.
\nAnd here is a simple table for you to play with.
\n| Product | \nCost | \nReally? | \n
| TinyMCE | \nFree | \nYES! | \n
| Plupload | \nFree | \nYES! | \n
Enjoy our software and create great content!
\nOh, and by the way, don\'t forget to check out our other product called Plupload, your ultimate upload solution with HTML5 upload support!
', '
Welcome to the TinyMCE editor demo!Feel free to try out the different features that are provided, please note that the MoxieManager specific functionality is part of our commercial offering. The demo is to show the integration.
\nIf you have questions or need help, feel free to visit our community forum! We also offer Enterprise support solutions. Also do not miss out on the documentation, its a great resource wiki for understanding how TinyMCE works and integrates.
\nIf you think you have found a bug, you can use the Bug Tracker to report bugs to the developers.
\nAnd here is a simple table for you to play with.
\n| Product | \nCost | \nReally? | \n
| TinyMCE | \nFree | \nYES! | \n
| Plupload | \nFree | \nYES! | \n
Enjoy our software and create great content!
\nOh, and by the way, don\'t forget to check out our other product called Plupload, your ultimate upload solution with HTML5 upload support!
'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/sai_api.sql b/dbd/sql/mysql/data/sai_api.sql index 801a1cb..4745657 100644 --- a/dbd/sql/mysql/data/sai_api.sql +++ b/dbd/sql/mysql/data/sai_api.sql @@ -1,49 +1,151 @@ 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 (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 (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'); -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 (12, 42, 2, 3, 'login', 'password_md5', 'ALL'); +-- system_api +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 (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'); -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 (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'); +-- specific stuff for mods +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 (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 (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 (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 (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 (200, 42, 0, 0, '_SYSTEM_SAI_saimod_sys_log', 'action', NULL); +-- +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 (210, 42, 3, 200, 'error', 'error', 'INT'); +-- +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'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/sai_error_locale_string.sql b/dbd/sql/mysql/data/sai_error_locale_string.sql new file mode 100644 index 0000000..3517ad2 --- /dev/null +++ b/dbd/sql/mysql/data/sai_error_locale_string.sql @@ -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!'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/sai_locale_string.sql b/dbd/sql/mysql/data/sai_locale_string.sql new file mode 100644 index 0000000..c91637c --- /dev/null +++ b/dbd/sql/mysql/data/sai_locale_string.sql @@ -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).'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/system_api.sql b/dbd/sql/mysql/data/system_api.sql index d0b5d35..8c1bf33 100644 --- a/dbd/sql/mysql/data/system_api.sql +++ b/dbd/sql/mysql/data/system_api.sql @@ -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 (61, 0, 2, 60, 'login', 'username', '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 (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 (20, 0, 2, 11, '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 (22, 0, 2, 11, 'login', 'password_md5', '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'); +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 (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'); \ No newline at end of file diff --git a/dbd/sql/mysql/data/system_cron.sql b/dbd/sql/mysql/data/system_cron.sql new file mode 100644 index 0000000..f955752 --- /dev/null +++ b/dbd/sql/mysql/data/system_cron.sql @@ -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); diff --git a/dbd/sql/mysql/data/system_rights.sql b/dbd/sql/mysql/data/system_rights.sql index 72f0b4c..f56c8bb 100644 --- a/dbd/sql/mysql/data/system_rights.sql +++ b/dbd/sql/mysql/data/system_rights.sql @@ -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 (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 (1, 'SYS_SAI', 'SAI access right'); \ No newline at end of file + +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'); \ No newline at end of file diff --git a/dbd/sql/mysql/schema/system_cron.sql b/dbd/sql/mysql/schema/system_cron.sql new file mode 100644 index 0000000..d884858 --- /dev/null +++ b/dbd/sql/mysql/schema/system_cron.sql @@ -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; diff --git a/dbd/sql/mysql/schema/system_log.sql b/dbd/sql/mysql/schema/system_log.sql index a4a742c..37f80a8 100644 --- a/dbd/sql/mysql/schema/system_log.sql +++ b/dbd/sql/mysql/schema/system_log.sql @@ -21,5 +21,4 @@ CREATE TABLE `system_log` ( ) COLLATE='utf8_general_ci' ENGINE=MyISAM -AUTO_INCREMENT=1; - +AUTO_INCREMENT=1; \ No newline at end of file diff --git a/dbd/sql/mysql/schema/system_page.sql b/dbd/sql/mysql/schema/system_page.sql new file mode 100644 index 0000000..871cd6b --- /dev/null +++ b/dbd/sql/mysql/schema/system_page.sql @@ -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; diff --git a/dbd/sql/mysql/schema/system_todo.sql b/dbd/sql/mysql/schema/system_todo.sql index 3f88815..a833791 100644 --- a/dbd/sql/mysql/schema/system_todo.sql +++ b/dbd/sql/mysql/schema/system_todo.sql @@ -1,16 +1,29 @@ CREATE TABLE `system_todo` ( `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, - `author` INT(11) NOT NULL, - `type` INT(11) NOT NULL, - `state` INT(11) NOT NULL, - `msg_1` TEXT NOT NULL, - `msg_2` TEXT NULL, - `msg_3` TEXT NULL, - `msg_4` TEXT NULL, - `msg_5` TEXT NULL, - PRIMARY KEY (`ID`) + `server_name` CHAR(255) NOT NULL, + `server_port` INT(10) UNSIGNED NOT NULL, + `request_uri` CHAR(255) NOT NULL, + `post` TEXT NOT NULL, + `http_referer` CHAR(255) NOT NULL, + `http_user_agent` TEXT NOT NULL, + `user` INT(10) UNSIGNED NOT NULL, + `thrown` BIT(1) NOT NULL, + `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' ENGINE=MyISAM -AUTO_INCREMENT=5; \ No newline at end of file +AUTO_INCREMENT=92; \ No newline at end of file diff --git a/dbd/sql/pg/data/basic_locale_string.sql b/dbd/sql/pg/data/basic_locale_string.sql new file mode 100644 index 0000000..12bce7b --- /dev/null +++ b/dbd/sql/pg/data/basic_locale_string.sql @@ -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.'); \ No newline at end of file diff --git a/dbd/sql/pg/data/sai_api.sql b/dbd/sql/pg/data/sai_api.sql index 34c0267..30f0cc0 100644 --- a/dbd/sql/pg/data/sai_api.sql +++ b/dbd/sql/pg/data/sai_api.sql @@ -1,38 +1,129 @@ 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 (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 (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'); -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 (12, 42, 2, 3, 'login', 'password_md5', 'ALL'); +-- system_api +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 (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'); -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 (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 (24, 42, 2, 4, 'register', 'locale', 'ALL'); +-- specific stuff for mods +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 (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 (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 (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 (45, 42, 2, 3, 'rn', 'newid', '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 (201, 42, 3, 200, 'filter', 'filter', '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 (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'); \ No newline at end of file +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'); \ No newline at end of file diff --git a/dbd/sql/pg/data/sai_error_locale_string.sql b/dbd/sql/pg/data/sai_error_locale_string.sql new file mode 100644 index 0000000..98e4c3c --- /dev/null +++ b/dbd/sql/pg/data/sai_error_locale_string.sql @@ -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!'); \ No newline at end of file diff --git a/dbd/sql/pg/data/sai_locale_string.sql b/dbd/sql/pg/data/sai_locale_string.sql new file mode 100644 index 0000000..7ed052c --- /dev/null +++ b/dbd/sql/pg/data/sai_locale_string.sql @@ -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).'); \ No newline at end of file diff --git a/dbd/sql/pg/data/system_api.sql b/dbd/sql/pg/data/system_api.sql new file mode 100644 index 0000000..e555ee5 --- /dev/null +++ b/dbd/sql/pg/data/system_api.sql @@ -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'); \ No newline at end of file diff --git a/dbd/sql/pg/data/system_rights.sql b/dbd/sql/pg/data/system_rights.sql new file mode 100644 index 0000000..5fb019b --- /dev/null +++ b/dbd/sql/pg/data/system_rights.sql @@ -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'); \ No newline at end of file diff --git a/dbd/sql/pg/schema/system_cron.sql b/dbd/sql/pg/schema/system_cron.sql new file mode 100644 index 0000000..650af2a --- /dev/null +++ b/dbd/sql/pg/schema/system_cron.sql @@ -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; \ No newline at end of file diff --git a/dbd/sql/pg/schema/system_log.sql b/dbd/sql/pg/schema/system_log.sql new file mode 100644 index 0000000..3693664 --- /dev/null +++ b/dbd/sql/pg/schema/system_log.sql @@ -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; \ No newline at end of file diff --git a/dbd/sql/pg/schema/system_sys_log.sql b/dbd/sql/pg/schema/system_sys_log.sql deleted file mode 100644 index d76711b..0000000 --- a/dbd/sql/pg/schema/system_sys_log.sql +++ /dev/null @@ -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; - diff --git a/dbd/sql/pg/schema/system_todo.sql b/dbd/sql/pg/schema/system_todo.sql index b7f08cb..41c5972 100644 --- a/dbd/sql/pg/schema/system_todo.sql +++ b/dbd/sql/pg/schema/system_todo.sql @@ -1,19 +1,34 @@ CREATE TABLE system.todo ( "ID" integer NOT NULL, - "time" timestamp with time zone NOT NULL, - author integer NOT NULL, - type integer NOT NULL, - state integer NOT NULL, - msg_1 text NOT NULL, - msg_2 text, - msg_3 text, - msg_4 text, - msg_5 text, - CONSTRAINT system_todo_pk_id PRIMARY KEY ("ID") + "class" text NOT NULL, + "message" text NOT NULL, + "message_hash" character varying(40) 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, + "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 ( OIDS=FALSE ); ALTER TABLE system.todo - OWNER TO username; + OWNER TO dasense; \ No newline at end of file diff --git a/dbd/tbl/system_cron.php b/dbd/tbl/system_cron.php new file mode 100644 index 0000000..9bde395 --- /dev/null +++ b/dbd/tbl/system_cron.php @@ -0,0 +1,18 @@ + + +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 \ No newline at end of file diff --git a/docu/system/2.license.md b/docu/system/2.license.md index 8cccd96..a67cf9a 100644 --- a/docu/system/2.license.md +++ b/docu/system/2.license.md @@ -1,6 +1,6 @@ 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 of this software and associated documentation files (the "Software"), to deal diff --git a/docu/system/3.getting started.md b/docu/system/3.getting started.md index 5a1b331..15f31f9 100644 --- a/docu/system/3.getting started.md +++ b/docu/system/3.getting started.md @@ -1,27 +1,6 @@ ##Getting started -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 - * 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 +This is an introduction how to setup a webpage with system ##Setup diff --git a/docu/system/system.api.md b/docu/system/system.api.md index e69de29..b1a46aa 100644 --- a/docu/system/system.api.md +++ b/docu/system/system.api.md @@ -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 + + 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. \ No newline at end of file diff --git a/docu/system/system.cache.md b/docu/system/system.cache.md index e69de29..463d5d1 100644 --- a/docu/system/system.cache.md +++ b/docu/system/system.cache.md @@ -0,0 +1,2 @@ +cache +----- \ No newline at end of file diff --git a/docu/system/system.config.md b/docu/system/system.config.md index e69de29..7fd5b2d 100644 --- a/docu/system/system.config.md +++ b/docu/system/system.config.md @@ -0,0 +1,2 @@ +config +------ \ No newline at end of file diff --git a/docu/system/system.db.md b/docu/system/system.db.md index e69de29..3f9a814 100644 --- a/docu/system/system.db.md +++ b/docu/system/system.db.md @@ -0,0 +1,2 @@ +db +-- \ No newline at end of file diff --git a/docu/system/system.db.qq.md b/docu/system/system.db.qq.md new file mode 100644 index 0000000..d98b5a4 --- /dev/null +++ b/docu/system/system.db.qq.md @@ -0,0 +1,76 @@ +QQ Objects +---------- + +Referenz:Api call deleted!
'); + $('#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');}); +} + +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(); + }); } \ No newline at end of file diff --git a/sai/modules/saimod_sys_api/saimod_sys_api.php b/sai/modules/saimod_sys_api/saimod_sys_api.php index ed9eaa4..7af02aa 100644 --- a/sai/modules/saimod_sys_api/saimod_sys_api.php +++ b/sai/modules/saimod_sys_api/saimod_sys_api.php @@ -19,7 +19,7 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { $vars2 = array( 'active' => ($first ? 'active' : ''), 'tab_id' => $r['group']); $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()){ @@ -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'] : ''; $r['tr_class'] = self::tablerow_class($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'] = ''; @@ -41,15 +41,36 @@ class saimod_sys_api extends \SYSTEM\SAI\SaiModule { foreach($tabs as $tab){ $tab['active'] = ($first ? 'active' : ''); $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 .= '| ID | +Group | +Type | +ParentID | +ParentValue | +Name | +Verify | +
|---|---|---|---|---|---|---|
| ${ID} | +${group} | +${type} | +${parentID} | +${parentValue} | +${name} | +${verify} | +
| ID | +Group | +Type | +ParentID | +ParentValue | +Name | +Verify | +
|---|---|---|---|---|---|---|
| + | + | + | + | + | + | + |
| '.'ID'.' | '.''.'CacheID'.' | '.''.'Ident'.' | '.''.'Data'.' | '.'||||||
|---|---|---|---|---|---|---|---|---|---|
| ${class} | +${min} | +${hour} | +${day} | +${day_week} | +${month} | +${last_run} | +${next} | ++ + + | ++ + + | +
| class | +min | +hour | +day | +day_week | +month | +last_run | +next_run | +status | +action | +
|---|---|---|---|---|---|---|---|---|---|
| + | + | + | + | + | + | + | + | + | + |
| ${sai_mod_login_username} | -+ | ${basic_username} | +|||||||
|---|---|---|---|---|---|---|---|---|---|
| ${sai_mod_login_email} | +${basic_email} | ||||||||
| ${sai_mod_login_password} | +${basic_password} |
****
@@ -47,8 +47,8 @@
style="margin-bottom: 15px; float: left;"
id="user_new_password1"
name="user_new_password1"
- placeholder="${ua_new_password_first}"
- minlength="5" data-validation-minlength-message="${login_password_too_short}"/>
+ placeholder="${basic_placeholder_password}"
+ minlength="5" data-validation-minlength-message="${sai_error_password_short}"/>
@@ -57,24 +57,24 @@
style="margin-bottom: 15px; float: left;"
id="user_new_password2"
name="user_new_password2"
- placeholder="${ua_new_password_second}"
+ placeholder="${basic_placeholder_password}"
data-validation-matches-match="user_new_password1"
- data-validation-matches-message="${register_password_dont_math}"/>
+ data-validation-matches-message="${sai_error_password_match}"/>
|
|||||||
| ${sai_mod_login_last_active} | +${basic_last_active} | ||||||||
| ${sai_mod_login_join_date} | +${basic_join_date} | ||||||||
| ${sai_mod_login_locale} | +${basic_locale} | ||||||||
| ${sai_mod_login_admin_rights} | +${basic_admin_rights} | ${isadmin} |
| '.'Time ago'.' | '.''.'Time'.' | '.''.'Reporttype'.' | '.''.'Message'.' | '.''.'Author'.' | '.''.'Volunteers'.' | '.''.'State'.' | '.''.'Action'.' | '.'
|---|---|---|---|---|---|---|---|
| '.self::time_elapsed_string(strtotime($row['time'])).' | '.''.$row['time'].' | '. - ''.self::reporttype($row['type']).' | '. - ''.$row['msg_1'].' | '. - ''.$row['username'].' | '. - ''.'I_S and many more'.' | '. - ''.self::state($row['state']).' | '. - ''. self::statebtn($row['state']). - ''. - ''. - ''.' | '.'
| Message |
| Property | Value |
|---|---|
| ID | ${ID} |
| class | ${class} |
| code | ${code} |
| file | ${file} |
| line | ${line} |
| trace | ${trace} |
| ip | ${ip} |
| querytime | ${querytime} |
| time | ${time} |
| server_name | ${server_name} |
| server_port | ${server_port} |
| request_uri | ${request_uri} |
| url | ${server_name}:${server_port}${request_uri} |
| post | ${post} |
| http_referer | ${http_referer} |
| http_user_agent | ${http_user_agent} |
| user | ${username} |
| thrown | ${thrown} |
| message | ${message} |
| Property | Value |
|---|---|
| ID | ${ID} |
| ip | ${ip} |
| querytime | ${querytime} |
| time | ${time} |
| http_referer | ${http_referer} |
| http_user_agent | ${http_user_agent} |
| user | ${username} |
| message |
| time ago | +message | +user | +
|---|
| time ago | +class | +message | +file | +line | +ip | +url | +user | +querytime | +count | +
|---|
| Name | +Count | +All | +Done | +
|---|---|---|---|
| Project | +${project_count} | +${project_all} | +${project}% | +