pg corrections ;-)

This commit is contained in:
Ulf Gebhardt 2013-09-28 14:35:41 +02:00
parent f739bc00c4
commit cc4c543bb2
3 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,7 @@ class saimod_sys_calls extends \SYSTEM\SAI\SaiModule {
if(\SYSTEM\system::isSystemDbInfoPG()){
$res = $con->query('SELECT * FROM system.api ORDER BY "group", "ID" ASC;');
} else {
$res = $con->query('SELECT * FROM system_api ORDER BY "group", "ID" ASC;');
$res = $con->query('SELECT * FROM system_api ORDER BY group, ID ASC;');
}
$result = "";

View File

@ -38,7 +38,10 @@ class saimod_sys_security extends \SYSTEM\SAI\SaiModule {
$result = '<table class="table table-hover table-condensed" style="overflow: auto;">'.
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'Username'.'</th>'.'<th>'.'E-Mail'.'</th>'.'<th>'.'JoinDate'.'</th>'.'<th>'.'Locale'.'</th>'.'<th>'.'Last Active'.'</th>'.'<th>'.'Flag'.'</th>'.'<th style="width: 110px;">'.'Rights'.'</th><th>reset password</th>'.'</tr>';
while($r = $res->next()){
$result .= '<tr class="'.self::tablerow_class($r['last_active']).'">'.'<td>'.$r['id'].'</td>'.'<td>'.$r['username'].'</td>'.'<td>'.$r['email'].'</td>'.'<td>'.$r['joindate'].'</td>'.'<td>'.$r['locale'].'</td>'.'<td>'.self::time_elapsed_string($r['last_active']).'</td>'.'<td>'.$r['account_flag'].'</td>'.'<td>'.'<input type="submit" class="btn" value="edit" user="'.$r['id'].'" action="edit"><input type="submit" class="btn-danger" value="delete" user="'.$r['id'].'" action="delete"></td><td><button type="submit" class="btn" value="reset_password" user="'.$r['id'].'" email="'.$r['email'].'">send EMail</button>'.'</td>'.'</tr>';
if(\SYSTEM\system::isSystemDbInfoPG()){
$result .= '<tr class="'.self::tablerow_class($r['last_active']).'">'.'<td>'.$r['id'].'</td>'.'<td>'.$r['username'].'</td>'.'<td>'.$r['email'].'</td>'.'<td>'.$r['joindate'].'</td>'.'<td>'.$r['locale'].'</td>'.'<td>'.self::time_elapsed_string(strtotime($r['last_active'])).'</td>'.'<td>'.$r['account_flag'].'</td>'.'<td>'.'<input type="submit" class="btn" value="edit" user="'.$r['id'].'" action="edit"><input type="submit" class="btn-danger" value="delete" user="'.$r['id'].'" action="delete"></td><td><button type="submit" class="btn" value="reset_password" user="'.$r['id'].'" email="'.$r['email'].'">send EMail</button>'.'</td>'.'</tr>';
} else {
$result .= '<tr class="'.self::tablerow_class($r['last_active']).'">'.'<td>'.$r['id'].'</td>'.'<td>'.$r['username'].'</td>'.'<td>'.$r['email'].'</td>'.'<td>'.$r['joindate'].'</td>'.'<td>'.$r['locale'].'</td>'.'<td>'.self::time_elapsed_string($r['last_active']).'</td>'.'<td>'.$r['account_flag'].'</td>'.'<td>'.'<input type="submit" class="btn" value="edit" user="'.$r['id'].'" action="edit"><input type="submit" class="btn-danger" value="delete" user="'.$r['id'].'" action="delete"></td><td><button type="submit" class="btn" value="reset_password" user="'.$r['id'].'" email="'.$r['email'].'">send EMail</button>'.'</td>'.'</tr>';}
}
$result .= '</table>';
return $result;

View File

@ -10,7 +10,7 @@ class saimod_sys_todo extends \SYSTEM\SAI\SaiModule {
$res = $con->query('SELECT * FROM system_todo LEFT JOIN system_user ON system_todo.author = system_user.ID ORDER BY state, time DESC;');
}
$result = '<div id="table-wrapper"><table class="table table-hover table-condensed" style="overflow: auto;">'.
'<tr>'.'<th>'.'Time ago'.'</th>'.'<th>'.'Time'.'</th>'.'<th>'.'Reporttype'.'</th>'.'<th>'.'Message'.'</th>'.'<th>'.'Author'.'</th>'.'<th>'.'Assigned'.'</th>'.'<th>'.'State'.'</th>'.'<th>'.'Action'.'</th>'.'</tr>';
'<tr>'.'<th>'.'Time ago'.'</th>'.'<th>'.'Time'.'</th>'.'<th>'.'Reporttype'.'</th>'.'<th>'.'Message'.'</th>'.'<th>'.'Author'.'</th>'.'<th>'.'Volunteers'.'</th>'.'<th>'.'State'.'</th>'.'<th>'.'Action'.'</th>'.'</tr>';
while($row = $res->next()){
$result .= '<tr class="'.self::trclassbytype($row['type']).'">'.
'<td>'.self::time_elapsed_string(strtotime($row['time'])).'</td>'.'<td>'.$row['time'].'</td>'.