saimod_sys_calls, saimod_sys_config, saimod_sys_locale, saimod_sys_mod
fixed saimod_sys_security, renamed saimod_sys_error -> saimod_sys_log fixed all Menu entries saimod right_right should return true when public!
This commit is contained in:
parent
a920225149
commit
4d595c6573
@ -10,7 +10,11 @@ $autoload->registerFolder(dirname(__FILE__).'/page/default_module','SYSTEM\SAI')
|
|||||||
$autoload->registerFolder(dirname(__FILE__).'/modules','SYSTEM\SAI');
|
$autoload->registerFolder(dirname(__FILE__).'/modules','SYSTEM\SAI');
|
||||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_sai','SYSTEM\SAI');
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_sai','SYSTEM\SAI');
|
||||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_login','SYSTEM\SAI');
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_login','SYSTEM\SAI');
|
||||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_error','SYSTEM\SAI');
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_log','SYSTEM\SAI');
|
||||||
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_security','SYSTEM\SAI');
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_security','SYSTEM\SAI');
|
||||||
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_mod','SYSTEM\SAI');
|
||||||
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_config','SYSTEM\SAI');
|
||||||
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_calls','SYSTEM\SAI');
|
||||||
|
$autoload->registerFolder(dirname(__FILE__).'/modules/saimod_sys_locale','SYSTEM\SAI');
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/modules/register_modules.php';
|
require_once dirname(__FILE__).'/modules/register_modules.php';
|
||||||
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_sai');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_sai');
|
||||||
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_login');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_login');
|
||||||
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_error');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_log');
|
||||||
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_security');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_security');
|
||||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_sys');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_mod');
|
||||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_api');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_config');
|
||||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_page');
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_calls');
|
||||||
|
\SYSTEM\SAI\sai::getInstance()->register_sys('\SYSTEM\SAI\saimod_sys_locale');
|
||||||
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_docu');
|
//\SYSTEM\SAI\sai::getInstance()->register('\SYSTEM\SAI\saimod_sys_docu');
|
||||||
45
sai/modules/saimod_sys_calls/saimod_sys_calls.php
Normal file
45
sai/modules/saimod_sys_calls/saimod_sys_calls.php
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\SAI;
|
||||||
|
|
||||||
|
class saimod_sys_calls extends \SYSTEM\SAI\SaiModule {
|
||||||
|
public static function html_content(){
|
||||||
|
$result = '<h3>Api Calls</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'flag'.'</th>'.'<th>'.'parentID'.'</th>'.'<th>'.'parentValue'.'</th>'.'<th>'.'name'.'</th>'.'<th>'.'allowedValues'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||||
|
$res = $con->query('SELECT * FROM system.api_calls ORDER BY "ID" ASC;');
|
||||||
|
|
||||||
|
while($r = $res->next()){
|
||||||
|
$result .= '<tr class="'.self::tablerow_class($r['flag']).'">'.'<td>'.$r['ID'].'</td>'.'<td>'.$r['flag'].'</td>'.'<td>'.$r['parentID'].'</td>'.'<td>'.$r['parentValue'].'</td>'.'<td>'.$r['name'].'</td>'.'<td>'.$r['allowedValues'].'</td>'.'</tr>';}
|
||||||
|
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
$result .= '<h3>Page Calls</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'flag'.'</th>'.'<th>'.'parentID'.'</th>'.'<th>'.'parentValue'.'</th>'.'<th>'.'name'.'</th>'.'<th>'.'allowedValues'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$res = $con->query('SELECT * FROM system.page_calls ORDER BY "ID" ASC;');
|
||||||
|
|
||||||
|
while($r = $res->next()){
|
||||||
|
$result .= '<tr class="'.self::tablerow_class($r['flag']).'">'.'<td>'.$r['ID'].'</td>'.'<td>'.$r['flag'].'</td>'.'<td>'.$r['parentID'].'</td>'.'<td>'.$r['parentValue'].'</td>'.'<td>'.$r['name'].'</td>'.'<td>'.$r['allowedValues'].'</td>'.'</tr>';}
|
||||||
|
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function tablerow_class($flag){
|
||||||
|
if($flag == 1){
|
||||||
|
return 'info';}
|
||||||
|
|
||||||
|
return 'success';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_calls">Calls</a></li>';}
|
||||||
|
public static function right_public(){return false;}
|
||||||
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
|
public static function src_css(){}
|
||||||
|
public static function src_js(){}
|
||||||
|
}
|
||||||
32
sai/modules/saimod_sys_config/saimod_sys_config.php
Normal file
32
sai/modules/saimod_sys_config/saimod_sys_config.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\SAI;
|
||||||
|
|
||||||
|
class saimod_sys_config extends \SYSTEM\SAI\SaiModule {
|
||||||
|
public static function html_content(){
|
||||||
|
$result = '<h3>Sys Config</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'Config ID'.'</th>'.'<th>'.'Config Name'.'</th>'.'<th>'.'Value'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_ERRORREPORTING). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEPATH). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE'. '</td>'.'<td>'.(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_TYPE) == 1 ? 'mysql' : 'postgres'). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_HOST). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PORT). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_USER). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_PASSWORD'. '</td>'.'<td>'.'<hidden>'. '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_DB_DBNAME). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_BASEURL). '</td>'.'</tr>';
|
||||||
|
$result .= '<tr>'.'<td>'.\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG. '</td>'.'<td>'.'\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG'. '</td>'.'<td>'.\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG). '</td>'.'</tr>';
|
||||||
|
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_config">Config</a></li>';}
|
||||||
|
public static function right_public(){return false;}
|
||||||
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
|
public static function src_css(){}
|
||||||
|
public static function src_js(){}
|
||||||
|
}
|
||||||
@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( isset($_GET['truncate'])){
|
|
||||||
if(\SYSTEM\SECURITY\Security::check(\SYSTEM::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI)){
|
|
||||||
$con = new \SYSTEM\DB\Connection(\SYSTEM::getSystemDBInfo());
|
|
||||||
$res = $con->query('TRUNCATE system.sys_log;');
|
|
||||||
echo '1';
|
|
||||||
return TRUE;
|
|
||||||
}else{
|
|
||||||
echo '0';
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
27
sai/modules/saimod_sys_locale/saimod_sys_locale.php
Normal file
27
sai/modules/saimod_sys_locale/saimod_sys_locale.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\SAI;
|
||||||
|
|
||||||
|
class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||||
|
public static function html_content(){
|
||||||
|
$result = '<h3>Locale String</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'Category'.'</th>'.'<th>'.'enUS'.'</th>'.'<th>'.'deDE'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||||
|
$res = $con->query('SELECT * FROM system.locale_string ORDER BY "category" ASC;');
|
||||||
|
|
||||||
|
while($r = $res->next()){
|
||||||
|
$result .= '<tr>'.'<td>'.$r['id'].'</td>'.'<td>'.$r['category'].'</td>'.'<td>'.$r['enUS'].'</td>'.'<td>'.$r['deDE'].'</td>'.'</tr>';}
|
||||||
|
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_locale">Locale</a></li>';}
|
||||||
|
public static function right_public(){return false;}
|
||||||
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
|
public static function src_css(){}
|
||||||
|
public static function src_js(){}
|
||||||
|
}
|
||||||
@ -1,16 +1,16 @@
|
|||||||
function init__SYSTEM_SAI_saimod_sys_error() {
|
function init__SYSTEM_SAI_saimod_sys_log() {
|
||||||
|
|
||||||
$('#truncate_table').click(function(){
|
$('#truncate_table').click(function(){
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type :'GET',
|
type :'GET',
|
||||||
url : './?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_error&truncate=sys_log',
|
url : './?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_log&truncate=sys_log',
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
|
|
||||||
if(data == 1){
|
if(data == 1){
|
||||||
$('#info_box').html("deleting data...");
|
$('#info_box').html("deleting data...");
|
||||||
$('#truncate_modal').modal('hide');
|
$('#truncate_modal').modal('hide');
|
||||||
$('#content-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_error');
|
$('#content-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_log');
|
||||||
}else{
|
}else{
|
||||||
$('#info_box').html("You do not have the permission to truncate table!");
|
$('#info_box').html("You do not have the permission to truncate table!");
|
||||||
}
|
}
|
||||||
@ -24,7 +24,7 @@ function init__SYSTEM_SAI_saimod_sys_error() {
|
|||||||
|
|
||||||
$('img#loader').show();
|
$('img#loader').show();
|
||||||
|
|
||||||
$('#content-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_error');
|
$('#content-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_log');
|
||||||
|
|
||||||
setTimeout("$('img#loader').hide()", 1300);
|
setTimeout("$('img#loader').hide()", 1300);
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ function init__SYSTEM_SAI_saimod_sys_error() {
|
|||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
|
|
||||||
|
|
||||||
$('#table-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_error&filter_error='+$(this).attr('id'));
|
$('#table-wrapper').load('./?action=developer&sai_mod=.SYSTEM.SAI.saimod_sys_log&filter_error='+$(this).attr('id'));
|
||||||
}));
|
}));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3,7 +3,7 @@
|
|||||||
namespace SYSTEM\SAI;
|
namespace SYSTEM\SAI;
|
||||||
|
|
||||||
|
|
||||||
class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
class saimod_sys_log extends \SYSTEM\SAI\SaiModule {
|
||||||
|
|
||||||
private static function truncate_syslog(){
|
private static function truncate_syslog(){
|
||||||
if(\SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI)){
|
if(\SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI)){
|
||||||
@ -29,10 +29,10 @@ class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
|||||||
|
|
||||||
if($filter !== NULL && $filter !== 'all'){
|
if($filter !== NULL && $filter !== 'all'){
|
||||||
if(self::tablerow_class($r['class']) === $filter){
|
if(self::tablerow_class($r['class']) === $filter){
|
||||||
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</tr>';
|
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</td>'.'</tr>';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</tr>';
|
$result .= '<tr class="'.self::tablerow_class($r['class']).'">'.'<td>'.(int)($now - strtotime($r['time'])).'</td>'.'<td>'.$r['time'].'</td>'.'<td>'.$r['class'].'</td>'.'<td>'.$r['message'].'</td>'.'<td>'.$r['code'].'</td>'.'<td>'.$r['file'].'</td>'.'<td>'.$r['line'].'</td>'.'<td>'.$r['ip'].'</td>'.'<td>'.$r['querytime'].'</td>'.'</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result .= '</table></div>';
|
$result .= '</table></div>';
|
||||||
@ -105,11 +105,11 @@ class saimod_sys_error extends \SYSTEM\SAI\SaiModule {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_error">SYS Error</a></li>';}
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_log">Log</a></li>';}
|
||||||
public static function right_public(){return false;}
|
public static function right_public(){return false;}
|
||||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
public static function src_css(){}
|
public static function src_css(){}
|
||||||
public static function src_js(){return \SYSTEM\LOG\JsonResult::toString(
|
public static function src_js(){return \SYSTEM\LOG\JsonResult::toString(
|
||||||
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_error/sai_sys_error.js')));}
|
array( \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_log/sai_sys_log.js')));}
|
||||||
}
|
}
|
||||||
@ -24,9 +24,9 @@ class saimod_sys_login extends \SYSTEM\SAI\SaiModule {
|
|||||||
} else {
|
} else {
|
||||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/login.tpl'), $vars);}
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_login/login.tpl'), $vars);}
|
||||||
}
|
}
|
||||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_login">SYS Login</a></li>';}
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_login">Login</a></li>';}
|
||||||
public static function right_public(){return true;}
|
public static function right_public(){return true;}
|
||||||
public static function right_right(){}
|
public static function right_right(){return true;}
|
||||||
|
|
||||||
public static function src_css(){}
|
public static function src_css(){}
|
||||||
public static function src_js(){return \SYSTEM\LOG\JsonResult::toString(
|
public static function src_js(){return \SYSTEM\LOG\JsonResult::toString(
|
||||||
|
|||||||
33
sai/modules/saimod_sys_mod/saimod_sys_mod.php
Normal file
33
sai/modules/saimod_sys_mod/saimod_sys_mod.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
namespace SYSTEM\SAI;
|
||||||
|
|
||||||
|
class saimod_sys_mod extends \SYSTEM\SAI\SaiModule {
|
||||||
|
public static function html_content(){
|
||||||
|
$result = '<h3>Sys Mods</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'Classname'.'</th>'.'<th>'.'Public'.'</th>'.'<th>'.'You can Access?'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$sys_mods = \SYSTEM\SAI\sai::getInstance()->getSysModules();
|
||||||
|
foreach($sys_mods as $mod){
|
||||||
|
$result .= '<tr>'.'<td>'.$mod.'</td>'.'<td>'.(\call_user_func(array($mod, 'right_public')) ? 'true' : 'false').'</td>'.'<td>'.(\call_user_func(array($mod, 'right_right')) ? 'true' : 'false').'</td>'.'</tr>';}
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
$result .= '<h3>Project Mods</h3>'.
|
||||||
|
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||||
|
'<tr>'.'<th>'.'Classname'.'</th>'.'<th>'.'Public'.'</th>'.'<th>'.'You can Access?'.'</th>'.'</tr>';
|
||||||
|
|
||||||
|
$mods = \SYSTEM\SAI\sai::getInstance()->getModules();
|
||||||
|
foreach($mods as $mod){
|
||||||
|
$result .= '<tr>'.'<td>'.$mod.'</td>'.'<td>'.(\call_user_func(array($mod, 'right_public')) ? 'true' : 'false').'</td>'.'<td>'.(\call_user_func(array($mod, 'right_right')) ? 'true' : 'false').'</td>'.'</tr>';}
|
||||||
|
$result .= '</table>';
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_mod">Mods</a></li>';}
|
||||||
|
public static function right_public(){return false;}
|
||||||
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
|
public static function src_css(){}
|
||||||
|
public static function src_js(){}
|
||||||
|
}
|
||||||
@ -4,9 +4,9 @@ namespace SYSTEM\SAI;
|
|||||||
|
|
||||||
class saimod_sys_sai extends \SYSTEM\SAI\SaiModule {
|
class saimod_sys_sai extends \SYSTEM\SAI\SaiModule {
|
||||||
public static function html_content(){return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_sai/carousel.tpl'), array());}
|
public static function html_content(){return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saimod_sys_sai/carousel.tpl'), array());}
|
||||||
public static function html_li_menu(){return '<li class="active"><a href="#" id=".SYSTEM.SAI.saimod_sys_sai">SYS SAI</a></li>';}
|
public static function html_li_menu(){return '<li class="active"><a href="#" id=".SYSTEM.SAI.saimod_sys_sai">SYSTEM Admin Interface</a></li>';}
|
||||||
public static function right_public(){return true;}
|
public static function right_public(){return true;}
|
||||||
public static function right_right(){}
|
public static function right_right(){return true;}
|
||||||
|
|
||||||
public static function src_css(){}
|
public static function src_css(){}
|
||||||
public static function src_js(){}
|
public static function src_js(){}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule {
|
|||||||
return 'error';
|
return 'error';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_security">SYS Security</a></li>';}
|
public static function html_li_menu(){return '<li><a href="#" id=".SYSTEM.SAI.saimod_sys_security">Security</a></li>';}
|
||||||
public static function right_public(){return false;}
|
public static function right_public(){return false;}
|
||||||
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
public static function right_right(){return \SYSTEM\SECURITY\Security::check(\SYSTEM\system::getSystemDBInfo(), \SYSTEM\SECURITY\RIGHTS::SYS_SAI);}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user