示例#1
0
}
$tmpl->setvar('enable_rename', $cfg["enable_rename"]);
$tmpl->setvar('enable_move', $cfg["enable_move"]);
$tmpl->setvar('enable_sfvcheck', $cfg['enable_sfvcheck']);
$tmpl->setvar('enable_vlc', $cfg['enable_vlc']);
$tmpl->setvar('enable_rar', $cfg["enable_rar"]);
$tmpl->setvar('show_rar', $show_rar);
$tmpl->setvar('enable_view_nfo', $cfg["enable_view_nfo"]);
$tmpl->setvar('enable_file_download', $cfg["enable_file_download"]);
$tmpl->setvar('package_type', $cfg["package_type"]);
$tmpl->setvar('enable_maketorrent', $cfg["enable_maketorrent"]);
$tmpl->setvar('bgDark', $cfg['bgDark']);
$tmpl->setvar('bgLight', $cfg['bgLight']);
//lang
$tmpl->setvar('_DELETE', $cfg['_DELETE']);
$tmpl->setvar('_DIR_REN_LINK', $cfg['_DIR_REN_LINK']);
$tmpl->setvar('_DIR_MOVE_LINK', $cfg['_DIR_MOVE_LINK']);
$tmpl->setvar('_ABOUTTODELETE', $cfg['_ABOUTTODELETE']);
$tmpl->setvar('_BACKTOPARRENT', $cfg['_BACKTOPARRENT']);
$tmpl->setvar('_ID_IMAGES', $cfg['_ID_IMAGES']);
$tmpl->setvar('_WGET', $wget_url);
//directory to display
$tmpl->setvar('dir_raw', $dir);
//directory for links
$tmpl->setvar('dir', str_replace('%2F', '/', UrlHTMLSlashesEncode($dir)));
tmplSetTitleBar($cfg["pagetitle"] . ' - ' . $cfg['_DIRECTORYLIST']);
tmplSetDriveSpaceBar();
tmplSetFoot();
tmplSetIidVars();
// parse template
$tmpl->pparse();
示例#2
0
    array_push($list, array('is_dir' => $isdir, 'is_link' => $islink, 'aclWrite' => $aclWrite, 'permission' => $permission, 'entry' => $entry, 'real_entry' => $slink, 'urlencode1' => UrlHTMLSlashesEncode($dir . $entry), 'urlencode2' => UrlHTMLSlashesEncode($dir), 'urlencode3' => UrlHTMLSlashesEncode($entry), 'addslashes1' => addslashes($entry), 'size' => $size, 'date' => $date, 'image' => $image, 'show_sfv' => $show_sfv, 'sfvdir' => UrlHTMLSlashesEncode($sfvdir), 'sfvsfv' => UrlHTMLSlashesEncode($sfvsfv), 'show_nfo' => $show_nfo, 'show_rar' => $show_rar));
}
// set template-loop
$tmpl->setloop('list', $list);
// define some things
// dir
$tmpl->setvar('dir', $dir);
if ($dirName != "/") {
    $tmpl->setvar('parentdir', preg_replace("/.*\\/(.+?)\\//", '$1', $dirName));
} else {
    $tmpl->setvar('parentdir', "/ (root)");
}
// parent url
if ($dir != "") {
    if (preg_match("/^(.+)\\/.+\$/", $dir, $matches) == 1) {
        $tmpl->setvar('parentURL', "index.php?iid=dir&dir=" . UrlHTMLSlashesEncode($matches[1]));
    } else {
        $tmpl->setvar('parentURL', "index.php?iid=dir");
    }
    $tmpl->setvar('showparentURL', TRUE);
} else {
    $tmpl->setvar('showparentURL', FALSE);
}
// chmod, parent-dir cannot be chmodded
if ($dir == "") {
    $tmpl->setvar('show_chmod', 0);
} else {
    $tmpl->setvar('show_chmod', $cfg["dir_enable_chmod"] == 1 && hasPermission($dir, $cfg['user'], 'w') ? 1 : 0);
}
//
$tmpl->setvar('enable_rename', $cfg["enable_rename"]);