Merge branch 'master' of mojotrollz.eu:system
This commit is contained in:
commit
a1834db941
@ -2,10 +2,24 @@
|
||||
namespace SYSTEM\SAI;
|
||||
|
||||
class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
|
||||
public static function getLanguages()
|
||||
{
|
||||
$languages = unserialize(\SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_LANGS));
|
||||
return $languages;
|
||||
}
|
||||
|
||||
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>';
|
||||
'<table class="table table-hover table-condensed" style="overflow: auto;">'.
|
||||
'<tr>'.'<th>'.'ID'.'</th>'.'<th>'.'Category'.'</th>';
|
||||
|
||||
foreach (self::getLanguages() as $lang){
|
||||
$result .= '<th>'.$lang.'</th>';
|
||||
$languages[] = $lang;
|
||||
}
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
$con = new \SYSTEM\DB\Connection(\SYSTEM\system::getSystemDBInfo());
|
||||
if(\SYSTEM\system::isSystemDbInfoPG()){
|
||||
@ -15,7 +29,14 @@ class saimod_sys_locale extends \SYSTEM\SAI\SaiModule {
|
||||
}
|
||||
|
||||
while($r = $res->next()){
|
||||
$result .= '<tr>'.'<td>'.$r['id'].'</td>'.'<td>'.$r['category'].'</td>'.'<td>'.$r['enUS'].'</td>'.'<td>'.$r['deDE'].'</td>'.'</tr>';}
|
||||
$result .= '<tr>'.'<td>'.$r["id"].'<br><input type="submit" value="delete">'.'</td>'.'<td>'.$r["category"].'</td>';
|
||||
foreach ($languages as $columns){
|
||||
$result .= '<td>'.$r[$columns].'<br><input type="submit" value="edit" lang="'.$columns.'" edit_ID="'.$r["id"].'">'.'</td>';
|
||||
}
|
||||
|
||||
$result .= '</tr>';
|
||||
|
||||
}
|
||||
|
||||
$result .= '</table>';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user