tbrehm
2008-06-04 9100936bfe5c1aadd167f9179a2af01882c59c1d
interface/web/admin/language_list.php
@@ -30,11 +30,8 @@
require_once('../../lib/config.inc.php');
require_once('../../lib/app.inc.php');
// Checking permissions for the module
if(!stristr($_SESSION['s']['user']['modules'],'admin')) {
   header('Location: ../index.php');
   exit;
}
//* Check permissions for module
$app->auth->check_module_permissions('admin');
//* This is only allowed for administrators
if(!$app->auth->is_admin()) die('only allowed for administrators.');
@@ -44,6 +41,8 @@
$app->tpl->newTemplate('form.tpl.htm');
$app->tpl->setInclude('content_tpl', 'templates/language_list.htm');
$language_files_list = array();
$bgcolor = '#FFFFFF';
//* reading languages
$language_option = '';
@@ -55,6 +54,16 @@
      if($tmp_lng !='') {
         $selected = ($tmp_lng == $selected_language)?'SELECTED':'';
         $language_option .= "<option value='$tmp_lng' $selected>$tmp_lng</option>";
         //$bgcolor = ($bgcolor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF';
         if($file == $selected_language.'.lng') {
         $language_files_list[] = array(   'module' => 'global',
                                 'lang_file' => $file,
                                 'bgcolor'  => $bgcolor,
                                 'lang' => $selected_language);
         }
      }
   }
}
@@ -62,8 +71,6 @@
// $app->tpl->setLoop('records', $language_list);
//* list all language files of the selected language
$bgcolor = '#FFFFFF';
$language_files_list = array();
$handle = @opendir(ISPC_WEB_PATH); 
while ($file = @readdir ($handle)) { 
    if ($file != '.' && $file != '..') {