ms compatibility for sysmods

This commit is contained in:
Ulf Gebhardt 2013-07-05 21:05:34 +02:00
parent d72046c163
commit 58e9e0c443
4 changed files with 37 additions and 10 deletions

View File

@ -8,7 +8,11 @@ class saimod_sys_calls extends \SYSTEM\SAI\SaiModule {
'<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;');
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT * FROM system.api_calls ORDER BY "ID" ASC;');
} else {
$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>';}
@ -19,7 +23,11 @@ class saimod_sys_calls extends \SYSTEM\SAI\SaiModule {
'<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;');
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT * FROM system.page_calls ORDER BY "ID" ASC;');
} else {
$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>';}

View File

@ -8,7 +8,11 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
'<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;');
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT * FROM system.locale_string ORDER BY "category" ASC;');
} else {
$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>';}

View File

@ -21,11 +21,22 @@ class saimod_sys_log extends \SYSTEM\SAI\SaiModule {
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = null;
if($filter !== NULL && $filter !== 'all'){
$res = $con->prepare( 'selectSysLogFilter',
'SELECT * FROM system.sys_log WHERE class ILIKE $1 ORDER BY time DESC LIMIT 100;',
array('%'.$filter.'%'));
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->prepare( 'selectSysLogFilter',
'SELECT * FROM system.sys_log WHERE class ILIKE $1 ORDER BY time DESC LIMIT 100;',
array('%'.$filter.'%'));
} else {
$res = $con->prepare( 'selectSysLogFilter',
'SELECT * FROM system_sys_log WHERE class ILIKE $1 ORDER BY time DESC LIMIT 100;',
array('%'.$filter.'%'));
}
} else {
$res = $con->query('SELECT * FROM system.sys_log ORDER BY time DESC LIMIT 100;');}
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT * FROM system.sys_log ORDER BY time DESC LIMIT 100;');
} else {
$res = $con->query('SELECT * FROM system_sys_log ORDER BY time DESC LIMIT 100;');
}
}
$now = microtime(true);

View File

@ -4,7 +4,11 @@ namespace SYSTEM\SAI;
class saimod_sys_security extends \SYSTEM\SAI\SaiModule {
public static function html_content(){
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
$res = $con->query('SELECT id,username,email,joindate,locale,last_active,account_flag FROM system.user ORDER BY last_active DESC;');
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT id,username,email,joindate,locale,last_active,account_flag FROM system.user ORDER BY last_active DESC;');
} else {
$res = $con->query('SELECT id,username,email,joindate,locale,last_active,account_flag FROM system_user ORDER BY last_active DESC;');
}
$now = microtime(true);