<?
 /* 
 +-------------------------------------------------------------------------+
-| Copyright (C) 2004 Juan Luis Francés Jiménez                            |
+| Copyright (C) 2004-2005 Juan Luis Frances Jiminez                       |
 |                                                                         |
 | This program is free software; you can redistribute it and/or           |
 | modify it under the terms of the GNU General Public License             |
 // and we check if it is present at the system
 
 if ( function_exists("gettext") ) {
-       require($smarty_gettext_path."smarty_gettext.php");     
-       $smarty->register_block('t','smarty_translate');
-       
-       $vars = $smarty->get_config_vars();
-       $language = $vars[lang];
-       $domain = "messages";   
-       putenv("LANG=$language"); 
-       setlocale(LC_ALL, $language);
-       bindtextdomain($domain,"./locale");
-       textdomain($domain);
+        require($smarty_gettext_path."smarty_gettext.php");     
+        $smarty->register_block('t','smarty_translate');
+        
+        $vars = $smarty->get_config_vars();
+        $language = $vars['lang'];
+        $domain = "messages";   
+        putenv("LANG=$language"); 
+        setlocale(LC_ALL, $language);
+        bindtextdomain($domain,"./locale");
+        textdomain($domain);
 }
 else {
-       function smarty_translate($params, $text, &$smarty) {
-               return $text;
-       }
-       $smarty->register_block('t','smarty_translate');
+        function smarty_translate($params, $text, &$smarty) {
+                return $text;
+        }
+        $smarty->register_block('t','smarty_translate');
 }
-?>
\ No newline at end of file
+?>
 
                 or die("Error query row 56");
 
 while ( $tmp = $res_jobs->fetchRow(DB_FETCHMODE_ASSOC) ) {
-        $tdate = explode (":",$tmp[elapsed]);                                                                           // Temporal "workaround" ;) Fix later
+        $tdate = explode (":",$tmp['elapsed']);                                                                           // Temporal "workaround" ;) Fix later
         if ( $tdate[0] > 300000 )
-                $tmp[elapsed] = "00:00:00";
+                $tmp['elapsed'] = "00:00:00";
         array_push($a_jobs,$tmp);
 }
 $smarty->assign('jobs',$a_jobs);