PHP Classes

File: views/admin/lang.php

Recommend this page to a friend!
  Classes of Axel Hahn   Pimped Apache Status   views/admin/lang.php   Download  
File: views/admin/lang.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Pimped Apache Status
Display the requests handled by an Apache server
Author: By
Last change:
Date: 6 years ago
Size: 1,587 bytes
 

Contents

Class file image Download
<?php
if (!isset($adminindex)){
    die(
"Abort.");
}
$aTmp = $aLangTxt; // backup
$aAllLang = array();
$sTh = " <th>key</th>\n";
foreach (
explode(",", $aCfg['selectLang']) as $s) {
   
$aLangTxt=array();
   
$sTh.=" <th>$s</th>\n";
    require(
"./../lang/" . $s . ".php");
    foreach (
$aLangTxt as $key => $val) {
       
$aAllLang[$key][$s] = $val;
    }
}
$aLangTxt = $aTmp;

$myvar = "aLang";
$sHtml='
        <h3 id="h3'
. md5($myvar) . '">' . $aLangTxt["lblDumpsaLang"] . '</h3>
        <div class="subh3">
            <div class="hintbox">'
. $aLangTxt["lblHintDumpsaLang"] . '</div>
            <table id="table'
. $myvar . '">
            <thead><tr>'
. $sTh . '</tr></thead>
            <tbody>'
;

foreach (
$aAllLang as $key => $aLang) {
   
$sHtml.="<tr>\n <td>$key</td>\n";
    foreach (
explode(",", $aCfg['selectLang']) as $sLang) {
        if (!
array_key_exists($sLang, $aAllLang[$key]) || strlen($aAllLang[$key][$sLang])<1){
           
$sTd = $aLangTxt['lblDumpsMiss'];
           
$sCssClass = 'miss';
        } else {
           
$sTd = htmlentities($aAllLang[$key][$sLang]);
           
$sCssClass = 'ok';
        }
       
$sHtml.=" <td class=\"$sCssClass\">$sTd</td>\n";
    }
   
$sHtml.="</tr>\n";
}

$sHtml.='
            </tbody></table>
        </div>'
;

print_r($aCfg['datatableOptions']); die();
$sJsOnReady.='$("#table' . $myvar . '").dataTable(' . json_encode($aCfg['datatableOptions']) . ');';

$aTab[$myvar] = array(
   
'url' => '#',
   
'label' => "$" . $myvar,
   
'onclick' => 'return showTab(\'#h3' . md5($myvar) . '\');',
);

echo
$sHtml;