Exemplo n.º 1
0
}
closedir($handle);
if (is_array($folderList)) {
    $folderList = arrayorder($folderList, 'file');
}
if (is_array($fileList)) {
    $fileList = arrayorder($fileList, 'file');
}
$allList = array_merge($folderList, $fileList);
$childDir = str_replace(realpath($rootPath), '', $currentDir);
if ($childDir[0] == '/' or $childDir[0] == '\\') {
    $childDir = substr($childDir, 1);
}
$i = 0;
foreach ($allList as $val) {
    $list['list'][$i]['sub'] = $val['sub'];
    $list['list'][$i]['date'] = $val['date'];
    $list['list'][$i]['size'] = $val['size'];
    $list['list'][$i]['mode'] = $val['mode'];
    ++$i;
}
if ($childDir == '') {
    $childDir = '根目录';
}
chdir($baseRoot);
$tp = new SmartTemplate();
$tp->set_templatefile('templates/dir_list.html');
$tp->assign($list);
$tp->assign('path', rawurlencode($currentDir));
$tp->assign('childDir', addslashes($childDir));
$tp->output();
Exemplo n.º 2
0
}
if ($NEATIsLogin != 'yes' and trim($_GET['module']) != 'login') {
    header('Location: ?module=login');
}
if (DEBUG == 0) {
    error_reporting(0);
}
$startTimes = utime();
$tp = new SmartTemplate();
$MetaSetting = '<meta asdfasdf><META HTTP-EQUIV="content-type" CONTENT="text/html; CHARSET=utf-8" />';
$_GET['module'] ? $moduleName = $_GET['module'] : ($moduleName = 'listRules');
if ($modulesMap[$moduleName]) {
    $tpShowBody = true;
    include_once 'modules/' . $modulesMap[$moduleName] . '.php';
    if ($tpShowBody) {
        $tp->set_templatefile('templates/body.html');
        $tp->assign('body_title', $moduleTitle);
        $tp->assign('body_contents', $moduleTemplate);
        $tp->assign('meta_setting', $MetaSetting);
        $tp->output();
    }
} else {
    header('Location: index.php');
    exit;
}
//	$endTimes = utime ();
//	$spendTimes = sprintf ('%0.4f', $endTimes - $startTimes);
$tp->set_templatefile('templates/footer.html');
//	$tp->assign ('version', NEAT_COLLECTOR_VERSION . ' BETA');
//	$tp->assign ('times', $spendTimes);
//	$tp->assign ('openTplTimes', $tp->getLoadTplTimes ());