Example #1
0
}
session_start();
// custom template empty (the controllor can upfate it with EsTemplate function)
$template = null;
// cache browser disabled
session_cache_limiter('nocache');
header('Cache-Control: no-cache, no-store, must-revalidate');
// HTTP 1.1.
header('Pragma: no-cache');
// HTTP 1.0.
header('Expires: 0');
// Proxies.
// loading library functions
include '../../core/lib/essential_lib.php';
// root app dir
ViewVar('ROOT_APP', $ROOT_APP);
// laguage
if (SesVarCheck('locale')) {
    $locale = SesVarGet('locale');
} else {
    $locale = 'it_IT.utf-8';
}
setlocale(LC_ALL, $locale);
putenv('LC_ALL=' . $locale);
putenv('LANG=' . $locale);
putenv('LANGUAGE=' . $locale);
// Specify location of translation tables
bindtextdomain('default', dirname(__FILE__) . '/../locale');
bind_textdomain_codeset('default', 'UTF-8');
// Choose domain
textdomain('default');
Example #2
0
                ViewVar('db_con', True);
                ViewVar('db_usr', True);
                ViewVar('db_tables', True);
                break;
            case 'USR':
                ViewVar('db_con', True);
                ViewVar('db_usr', False);
                ViewVar('db_tables', False);
                break;
            case 'DB':
                ViewVar('db_con', True);
                ViewVar('db_usr', True);
                ViewVar('db_tables', False);
                break;
            case 'CON':
            default:
                ViewVar('db_con', False);
                ViewVar('db_usr', False);
                ViewVar('db_tables', False);
                break;
        }
    } else {
        ViewVar('db_con', False);
        ViewVar('db_usr', False);
        ViewVar('db_tables', False);
    }
} else {
    ViewVar('db_con', False);
    ViewVar('db_usr', False);
    ViewVar('db_tables', False);
}
Example #3
0
 function UserNodes()
 {
     if (!isset($_GET['id']) || $this->utype == 3) {
         EsMessage(_("Operazione non consentita"));
         EsRedir('main', 'nodes_list');
     }
     $user_id = $_GET['id'];
     $user_info = $this->users->SearchByID($user_id);
     if ($user_info == FALSE) {
         EsMessage(_("Operazione non consentita"));
         EsRedir('main', 'nodes_list');
     }
     $user_nodes = $this->nodes->UserNodes($user_id);
     $nodes = $this->nodes->Get(SesVarGet('user_id'), 1);
     foreach ($nodes as &$node) {
         $node['enabled'] = FALSE;
         if ($user_nodes !== FALSE) {
             foreach ($user_nodes as $unode) {
                 if ($unode['node_id'] == $node['id']) {
                     $node['enabled'] = TRUE;
                     break;
                 }
             }
         }
     }
     SesVarSet('user_id', $user_id);
     ViewVar('user_info', $user_info);
     ViewVar('nodes', $nodes);
 }
Example #4
0
 function Log()
 {
     global $log_dir;
     TemplVar('title', _('Log Utenti'));
     if ($this->usr_type > 1) {
         $logs = $this->Log->Read($log_dir . '/user.log', $this->usr_name);
     } else {
         $logs = $this->Log->Read($log_dir . '/user.log');
     }
     ViewVar('logs', $logs);
 }
Example #5
0
 function Status()
 {
     EsTemplate('none');
     if (file_exists($this->cfg_file)) {
         $str = file_get_contents($this->cfg_file);
         $cfg = json_decode($str, true);
         if (isset($cfg['idn'])) {
             ViewVar('data', 1);
             return;
         }
     }
     ViewVar('data', 0);
 }