To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // Image class require_once 'inc/classes/Image.php'; // readrss functions require_once 'inc/functions/functions.readrss.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.default.tmpl"); // set vars $tmpl->setvar('enable_xfer', $cfg["enable_xfer"]); tmplSetTitleBar($cfg['_ADMINISTRATION']); tmplSetAdminMenu(); // L: tfb-stats // transfers $arTransfers = getTransferArray(); $countTransfers = count($arTransfers); $tmpl->setvar('server_transfers_total', $countTransfers); // users $countUsers = count($cfg['users']); $tmpl->setvar('server_users_total', $countUsers); // hits $hits = $db->GetOne("SELECT SUM(hits) AS hits FROM tf_users"); $tmpl->setvar('server_hits_total', $hits);
To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // transfer functions require_once 'inc/functions/functions.transfer.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.transferDetails.tmpl"); // init transfer transfer_init(); // init ch-instance $ch = ClientHandler::getInstance(getTransferClient($transfer)); // load settings, default if settings could not be loaded (fresh transfer) if ($ch->settingsLoad($transfer) !== true) { $ch->settingsDefault(); } // set details vars transfer_setDetailsVars(); // title + foot tmplSetFoot(false); tmplSetTitleBar($transferLabel . " - Details", false); // iid tmplSetIidVars();
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // default-type define('_DEFAULT_TYPE', 'all'); // init template-instance tmplInitializeInstance($cfg["theme"], "page.serverStats.tmpl"); // request-vars $type = isset($_REQUEST['type']) ? tfb_getRequestVar('type') : _DEFAULT_TYPE; // types $type_list = array(); array_push($type_list, array('name' => "all", 'selected' => $type == "all" ? 1 : 0)); array_push($type_list, array('name' => "drivespace", 'selected' => $type == "drivespace" ? 1 : 0)); array_push($type_list, array('name' => "who", 'selected' => $type == "who" ? 1 : 0)); if ($cfg['isAdmin'] == 1) { array_push($type_list, array('name' => "ps", 'selected' => $type == "ps" ? 1 : 0)); } if ($cfg['isAdmin'] == 1) { array_push($type_list, array('name' => "netstat", 'selected' => $type == "netstat" ? 1 : 0)); } if ($cfg['enable_xfer'] == 1 && ($cfg['enable_public_xfer'] == 1 || $cfg['isAdmin'])) { array_push($type_list, array('name' => "xfer", 'selected' => $type == "xfer" ? 1 : 0));
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // transfer functions require_once 'inc/functions/functions.transfer.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.transferHosts.tmpl"); // init transfer transfer_init(); $isTransmissionTransfer = false; if ($cfg["transmission_rpc_enable"] > 0) { if (isHash($transfer)) { $hash = $transfer; } else { $hash = getTransferHash($transfer); } require_once 'inc/functions/functions.rpc.transmission.php'; $isTransmissionTransfer = isTransmissionTransfer($hash); if (!$isTransmissionTransfer && $cfg["transmission_rpc_enable"] == 1) { $isTransmissionTransfer = getTransferClient($transfer) == 'transmissionrpc'; } }
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.CreateUser.tmpl"); // set vars $tmpl->setvar('enable_xfer', $cfg["enable_xfer"]); // $tmpl->setvar('_NEWUSER', $cfg['_NEWUSER']); $tmpl->setvar('_USER', $cfg['_USER']); $tmpl->setvar('_PASSWORD', $cfg['_PASSWORD']); $tmpl->setvar('_CONFIRMPASSWORD', $cfg['_CONFIRMPASSWORD']); $tmpl->setvar('_USERTYPE', $cfg['_USERTYPE']); $tmpl->setvar('_NORMALUSER', $cfg['_NORMALUSER']); $tmpl->setvar('_ADMINISTRATOR', $cfg['_ADMINISTRATOR']); $tmpl->setvar('_CREATE', $cfg['_CREATE']); $tmpl->setvar('_USERIDREQUIRED', $cfg['_USERIDREQUIRED']); $tmpl->setvar('_PASSWORDLENGTH', $cfg['_PASSWORDLENGTH']); $tmpl->setvar('_PASSWORDNOTMATCH', $cfg['_PASSWORDNOTMATCH']); $tmpl->setvar('_PLEASECHECKFOLLOWING', $cfg['_PLEASECHECKFOLLOWING']);
@ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // is enabled ? if ($cfg["enable_search"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use search"); @error("search is disabled", "index.php?iid=index", ""); } // common functions require_once 'inc/functions/functions.common.php'; // require require_once "inc/searchEngines/SearchEngineBase.php"; // init template-instance tmplInitializeInstance($cfg["theme"], "page.torrentSearch.tmpl"); // Go get the if this is a search request. go get the data and produce output. $hideSeedless = tfb_getRequestVar('hideSeedless'); if (!empty($hideSeedless)) { $_SESSION['hideSeedless'] = $hideSeedless; } if (!isset($_SESSION['hideSeedless'])) { $_SESSION['hideSeedless'] = 'no'; } $hideSeedless = $_SESSION['hideSeedless']; $pg = tfb_getRequestVar('pg'); $searchEngine = tfb_getRequestVar('searchEngine'); if (empty($searchEngine)) { $searchEngine = $cfg["searchEngine"]; } if (!preg_match('/^[a-zA-Z0-9]+$/D', $searchEngine)) {
exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // delete if (isset($_REQUEST['delete'])) { $delete = tfb_getRequestVar('delete'); if (!empty($delete)) { DeleteMessage($delete); } @header("location: index.php?iid=readmsg"); exit; } // init template-instance tmplInitializeInstance($cfg["theme"], "page.readmsg.tmpl"); if (isset($_REQUEST['mid'])) { $mid = tfb_getRequestVar('mid'); list($from_user, $message, $ip, $time, $isnew, $force_read) = GetMessage($mid); if (!empty($from_user) && $isnew == 1) { // We have a Message that is being seen // Mark it as NOT new. MarkMessageRead($mid); } $message = check_html($message, "a"); $message = html_entity_decode($message); $message = str_replace("\n", "<br>", $message); if (IsUser($from_user)) { $tmpl->setvar('IsUser', 1); } $tmpl->setvar('from_user', $from_user);
require_once 'inc/functions/functions.dir.php'; // is enabled ? if ($cfg["enable_view_nfo"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use nfo-viewer"); @error("nfo-viewer is disabled. Action has been logged.", "", ""); } // target $file = UrlHTMLSlashesDecode(tfb_getRequestVar("path")); $path = $cfg["path"] . $file; // only valid dirs + entries with permission if (!((tfb_isValidPath($path, ".nfo") || tfb_isValidPath($path, ".txt") || tfb_isValidPath($path, ".log")) && isValidEntry($file) && hasPermission($file, $cfg["user"], 'r'))) { AuditAction($cfg["constants"]["error"], "ILLEGAL NFO-ACCESS: " . $cfg["user"] . " tried to view " . $file); @error("Illegal access. Action has been logged.", "", ""); } // init template-instance tmplInitializeInstance($cfg["theme"], "page.viewnfo.tmpl"); // set vars $tmpl->setvar('file', $file); $folder = htmlspecialchars(substr($file, 0, strrpos($file, "/"))); $tmpl->setvar('folder', $folder); if ($fileHandle = @fopen($path, 'r')) { $output = ""; while (!@feof($fileHandle)) { $output .= @fgets($fileHandle, 4096); } @fclose($fileHandle); } else { $output = "Error opening NFO File: " . $file; } if (empty($_REQUEST["dos"]) && empty($_REQUEST["win"]) || !empty($_REQUEST["dos"])) { $output = htmlentities($output, ENT_COMPAT, "cp866");
*******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // is enabled ? if ($cfg["enable_multiupload"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use multiupload"); @error("multiupload is disabled", "index.php?iid=index", ""); } // init template-instance tmplInitializeInstance($cfg["theme"], "page.multiup.tmpl"); // form $row_list = array(); for ($j = 0; $j < $cfg["hack_multiupload_rows"]; ++$j) { array_push($row_list, array()); } $tmpl->setloop('row_list', $row_list); // queue $tmpl->setvar('queueActive', FluxdQmgr::isRunning() ? 1 : 0); // $tmpl->setvar('file_types_label', $cfg['file_types_label']); // $tmpl->setvar('_UPLOAD', $cfg['_UPLOAD']); $tmpl->setvar('_SELECTFILE', $cfg['_SELECTFILE']); $tmpl->setvar('_ID_IMAGES', $cfg['_ID_IMAGES']); $tmpl->setvar('_MULTIPLE_UPLOAD', $cfg['_MULTIPLE_UPLOAD']);
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.history.tmpl"); // prepare vars $offset = 50; $inx = 0; $min = 0; if (isset($_REQUEST['min'])) { $min = tfb_getRequestVar('min'); } $max = $min + $offset; if ($cfg['enable_restrictivetview'] == 0) { $sql = "SELECT user_id, file, time FROM tf_log WHERE action=" . $db->qstr($cfg["constants"]["url_upload"]) . " OR action=" . $db->qstr($cfg["constants"]["file_upload"]) . " ORDER BY time desc"; } else { $sql = $cfg['isAdmin'] ? "SELECT user_id, file, time FROM tf_log WHERE action=" . $db->qstr($cfg["constants"]["url_upload"]) . " OR action=" . $db->qstr($cfg["constants"]["file_upload"]) . " ORDER BY time desc" : "SELECT user_id, file, time FROM tf_log WHERE user_id=" . $db->qstr($cfg["user"]) . " AND ( action=" . $db->qstr($cfg["constants"]["url_upload"]) . " OR action=" . $db->qstr($cfg["constants"]["file_upload"]) . " ) ORDER BY time desc"; } $result = $db->SelectLimit($sql, $offset, $min); $file_result = array();
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.profile.tmpl"); // op-switch $op = tfb_getRequestVar('op'); switch ($op) { //****************************************************************************** // addProfile -- adding a Profile Information //****************************************************************************** case "addProfile": $newProfile["name"] = tfb_getRequestVar('name'); $newProfile["minport"] = tfb_getRequestVar('minport'); $newProfile["maxport"] = tfb_getRequestVar('maxport'); $newProfile["maxcons"] = tfb_getRequestVar('maxcons'); $newProfile["rerequest"] = tfb_getRequestVar('rerequest'); $newProfile["rate"] = tfb_getRequestVar('rate'); $newProfile["maxuploads"] = tfb_getRequestVar('maxuploads'); $newProfile["drate"] = tfb_getRequestVar('drate');
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.controlSettings.tmpl"); // set vars $tmpl->setvar('enable_btclient_chooser', $cfg["enable_btclient_chooser"]); $tmpl->setvar('transfer_profiles', $cfg["transfer_profiles"]); $tmpl->setvar('transfer_customize_settings', $cfg["transfer_customize_settings"]); $tmpl->setvar('showdirtree', $cfg["showdirtree"]); $tmpl->setvar('maxdepth', $cfg["maxdepth"]); // tmplSetTitleBar("Administration - Control Settings"); tmplSetAdminMenu(); tmplSetFoot(); tmplSetIidVars(); // parse template $tmpl->pparse();
To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // transfer functions require_once 'inc/functions/functions.transfer.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.transferScrape.tmpl"); // init transfer transfer_init(); // client-switch if (substr($transfer, -8) == ".torrent") { // this is a t-client $tmpl->setvar('hasScrape', 1); $tmpl->setvar('scrapeInfo', getTorrentScrapeInfo($transfer)); } else { if (substr($transfer, -5) == ".wget") { // this is wget. $tmpl->setvar('hasScrape', 0); $tmpl->setvar('scrapeInfo', "Scrape not supported by wget"); } else { if (substr($transfer, -4) == ".nzb") { // this is nzbperl.
header("Location: index.php?iid=dir"); } exit; } // check if valid entry if ($dir != "" && isValidEntry($dir) !== true) { AuditAction($cfg["constants"]["error"], "ILLEGAL DIR: " . $cfg["user"] . " tried to access " . $dir); @error("Invalid Dir", "index.php?iid=dir", "", array($dir)); } // check for permission to read if ($dir != "" && hasPermission($dir, $cfg["user"], 'r') !== true) { AuditAction($cfg["constants"]["error"], "ILLEGAL DIR: " . $cfg["user"] . " tried to access " . $dir); @error("No Permission for Dir", "index.php?iid=dir", "", array($dir)); } // init template-instance tmplInitializeInstance($cfg["theme"], "page.dir.tmpl"); // dirstats if ($cfg['enable_dirstats'] == 1) { $tmpl->setvar('enable_dirstats', 1); $du = dirsize($dirName); $tmpl->setvar('duTotal', formatBytesTokBMBGBTB($du)); $tmpl->setvar('_TDDU', $cfg['_TDDU']); } else { $tmpl->setvar('enable_dirstats', 0); } // read in entries $entrys = array(); $entrysDirs = array(); $entrysFiles = array(); $handle = opendir($dirName); while (false !== ($entry = readdir($handle))) {
*******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // is enabled ? if ($cfg["enable_dereferrer"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use dereferrer"); @error("dereferrer is disabled", "index.php?iid=index", ""); } // check param if (!isset($_REQUEST["u"])) { @header("location: index.php?iid=index"); exit; } else { $url = tfb_getRequestVarRaw("u"); } // init template-instance tmplInitializeInstance($cfg["theme"], "page.dereferrer.tmpl"); // set vars $url2 = tfb_htmlencode($url); $tmpl->setvar('url', $url2); $tmpl->setvar('meta_refresh', '0;URL=' . $url2); // tmplSetTitleBar($cfg["pagetitle"] . ' - dereferrer', false); tmplSetFoot(false); tmplSetIidVars(); $tmpl->pparse();
To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // transfer functions require_once 'inc/functions/functions.transfer.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.transferControl.tmpl"); // init transfer transfer_init(); // request-vars $pageop = tfb_getRequestVar('pageop'); $client = tfb_getRequestVar('client'); // init ch-instance $ch = $client == "" ? ClientHandler::getInstance(getTransferClient($transfer)) : ClientHandler::getInstance($client); // customize-vars transfer_setCustomizeVars(); // load settings, default if settings could not be loaded (fresh transfer) if ($ch->settingsLoad($transfer) !== true) { $ch->settingsDefault(); $settings_exist = 0; } else { $settings_exist = 1;
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.editLinks.tmpl"); // set vars $arLinks = GetLinks(); $arLid = Array_Keys($arLinks); $inx = 0; $link_count = count($arLinks); $link_list = array(); foreach ($arLinks as $link) { $lid = $arLid[$inx++]; $counter = 0; if (isset($_REQUEST["edit"]) && $_REQUEST["edit"] == $link['lid']) { $is_edit = 1; } else { $is_edit = 0; } if ($inx > 1) {
To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // transfer functions require_once 'inc/functions/functions.transfer.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.transferSettings.tmpl"); // init transfer transfer_init(); // request-vars $saveop = tfb_getRequestVar('save'); $client = tfb_getRequestVar('client'); $isSave = $saveop == 1 ? true : false; // init ch-instance $ch = $client == "" ? ClientHandler::getInstance(getTransferClient($transfer)) : ClientHandler::getInstance($client); // customize-vars transfer_setCustomizeVars(); // load settings, default if settings could not be loaded (fresh transfer) if ($ch->settingsLoad($transfer) !== true) { $ch->settingsDefault(); } // set running-field
modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // main.external require_once 'inc/main.external.php'; // init template-instance tmplInitializeInstance($cfg["default_theme"], "page.login.tmpl"); // start session @session_start(); // unregister globals if (@ini_get('register_globals')) { require_once 'inc/functions/functions.compat.php'; unregister_GLOBALS(); } // already got a session ? if (isset($_SESSION['user'])) { @header("location: index.php?iid=index"); exit; } // start ob @ob_start(); // authentication
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // search engine base require_once "inc/searchEngines/SearchEngineBase.php"; // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.searchSettings.tmpl"); // set vars $searchEngine = tfb_getRequestVar('searchEngine'); if (empty($searchEngine)) { $searchEngine = $cfg["searchEngine"]; } if (is_file('inc/searchEngines/' . $searchEngine . 'Engine.php')) { include_once 'inc/searchEngines/' . $searchEngine . 'Engine.php'; $sEngine = new SearchEngine(serialize($cfg)); if ($sEngine->initialized) { $tmpl->setvar('is_file', 1); $tmpl->setvar('mainTitle', $sEngine->mainTitle); $tmpl->setvar('searchEngine', $searchEngine); $tmpl->setvar('mainURL', $sEngine->mainURL); $tmpl->setvar('author', $sEngine->author); $tmpl->setvar('version', $sEngine->version);
SaveMessage($to_user, $cfg["user"], htmlentities($message), empty($to_all_r) ? 0 : 1, !empty($force_read_r) && $cfg['isAdmin'] ? 1 : 0); @header("location: index.php?iid=readmsg"); exit; } // rmid if (isset($_REQUEST['rmid'])) { $rmid = tfb_getRequestVar('rmid'); if (!empty($rmid)) { list($from_user, $message, $ip, $time) = GetMessage($rmid); $message = $cfg['_DATE'] . ": " . date($cfg['_DATETIMEFORMAT'], $time) . "\n" . $from_user . " " . $cfg['_WROTE'] . ":\n\n" . $message; $message = ">" . str_replace("\n", "\n>", $message); $message = "\n\n\n" . $message; } } // init template-instance tmplInitializeInstance($cfg["theme"], "page.message.tmpl"); // set vars $tmpl->setvar('to_user', $to_user); $tmpl->setvar('user', $cfg["user"]); $tmpl->setvar('message', $message); // $tmpl->setvar('_TO', $cfg['_TO']); $tmpl->setvar('_FROM', $cfg['_FROM']); $tmpl->setvar('_YOURMESSAGE', $cfg['_YOURMESSAGE']); $tmpl->setvar('_SEND', $cfg['_SEND']); $tmpl->setvar('_SENDTOALLUSERS', $cfg['_SENDTOALLUSERS']); $tmpl->setvar('_FORCEUSERSTOREAD', $cfg['_FORCEUSERSTOREAD']); // tmplSetTitleBar($cfg["pagetitle"] . ' - ' . $cfg['_SENDMESSAGETITLE']); tmplSetFoot(); tmplSetIidVars();
if (!empty($dir)) { $dirS = str_replace($cfg["path"], '', $dir); if (!(tfb_isValidPath($dir) && hasPermission($dirS, $cfg["user"], 'r'))) { AuditAction($cfg["constants"]["error"], "ILLEGAL SFV-ACCESS: " . $cfg["user"] . " tried to check " . $dirS); @error("Illegal access. Action has been logged.", "", ""); } } if (!empty($file)) { $fileS = str_replace($cfg["path"], '', $file); if (!(tfb_isValidPath($file) && isValidEntry(basename($file)) && hasPermission($fileS, $cfg["user"], 'r'))) { AuditAction($cfg["constants"]["error"], "ILLEGAL SFV-ACCESS: " . $cfg["user"] . " tried to check " . $fileS); @error("Illegal access. Action has been logged.", "", ""); } } // init template-instance tmplInitializeInstance($cfg["theme"], "page.checkSFV.tmpl"); // process $cmd = $cfg['bin_cksfv'] . ' -C ' . tfb_shellencode($dir) . ' -f ' . tfb_shellencode($file); $handle = popen($cmd . ' 2>&1', 'r'); $buff = isset($cfg["debuglevel"]) && $cfg["debuglevel"] == 2 ? "<strong>Debug:</strong> Evaluating command:<br/><br/><pre>" . tfb_htmlencode($cmd) . "</pre><br/>Output follows below:<br/>" : ""; $buff .= "<pre>"; while (!feof($handle)) { $buff .= tfb_htmlencode(@fgets($handle, 30)); } $tmpl->setvar('buff', $buff); pclose($handle); $buff .= "</pre>"; // set vars tmplSetTitleBar($cfg["pagetitle"] . ' - checkSFV', false); tmplSetIidVars(); // parse template
LICENSE This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.cookiehelp.tmpl"); // set vars tmplSetTitleBar("Cookie Help", false); tmplSetFoot(false); tmplSetIidVars(); // parse template $tmpl->pparse();
// prevent direct invocation if (!isset($cfg['user']) or isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ if (isset($_REQUEST['ajax_update'])) { $isAjaxUpdate = true; $ajaxUpdateParams = tfb_getRequestVar('ajax_update'); // init template-instance tmplInitializeInstance($cfg["theme"], "inc.transferList.tmpl"); } else { $isAjaxUpdate = false; // init template-instance tmplInitializeInstance($cfg["theme"], "page.index.tmpl"); } // ============================================================================= // set common vars // ============================================================================= // language $tmpl->setvar('_STATUS', $cfg['_STATUS']); $tmpl->setvar('_ESTIMATEDTIME', $cfg['_ESTIMATEDTIME']); $tmpl->setvar('_RUNTRANSFER', $cfg['_RUNTRANSFER']); $tmpl->setvar('_STOPTRANSFER', $cfg['_STOPTRANSFER']); $tmpl->setvar('_DELQUEUE', $cfg['_DELQUEUE']); $tmpl->setvar('_SEEDTRANSFER', $cfg['_SEEDTRANSFER']); $tmpl->setvar('_DELETE', $cfg['_DELETE']); $tmpl->setvar('_WARNING', $cfg['_WARNING']); $tmpl->setvar('_NOTOWNER', $cfg['_NOTOWNER']); $tmpl->setvar('_STOPPING', $cfg['_STOPPING']);
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.fluxdSettings.tmpl"); // superadmin-links $tmpl->setvar('SuperAdminLink1', getSuperAdminLink('?f=1', '<font class="adminlink">log</font></a>')); $tmpl->setvar('SuperAdminLink2', getSuperAdminLink('?f=2', '<font class="adminlink">error-log</font></a>')); $tmpl->setvar('SuperAdminLink3', getSuperAdminLink('?f=3', '<font class="adminlink">ps</font></a>')); $tmpl->setvar('SuperAdminLink4', getSuperAdminLink('?f=4', '<font class="adminlink">status</font></a>')); $tmpl->setvar('SuperAdminLink5', getSuperAdminLink('?f=5', '<font class="adminlink">check</font></a>')); $tmpl->setvar('SuperAdminLink6', getSuperAdminLink('?f=6', '<font class="adminlink">db-debug</font></a>')); $tmpl->setvar('SuperAdminLink9', getSuperAdminLink('?f=9', '<font class="adminlink">version</font></a>')); // message section $message = tfb_getRequestVar('m'); if ($message != "") { $tmpl->setvar('message', urldecode($message)); } // fluxd requirements checks $failed = 0;
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // Image class require_once 'inc/classes/Image.php'; // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.webappSettings.tmpl"); // set vars // auth-vars $authlist = array(); // Form-Auth array_push($authlist, array('avalue' => 0, 'atype' => "Form-Auth", 'aselected' => $cfg["auth_type"] == 0 ? 1 : 0)); // Form-Auth + Cookie array_push($authlist, array('avalue' => 1, 'atype' => "Form-Auth + Cookie", 'aselected' => $cfg["auth_type"] == 1 ? 1 : 0)); // Form-Auth + Image-Validation if (Image::isSupported()) { array_push($authlist, array('avalue' => 4, 'atype' => "Form-Auth + Image-Validation", 'aselected' => $cfg["auth_type"] == 4 ? 1 : 0)); } // Basic-Auth array_push($authlist, array('avalue' => 2, 'atype' => "Basic-Auth", 'aselected' => $cfg["auth_type"] == 2 ? 1 : 0)); // Basic-Passthru array_push($authlist, array('avalue' => 3, 'atype' => "Basic-Passthru", 'aselected' => $cfg["auth_type"] == 3 ? 1 : 0));
@ob_end_clean(); @header("location: ../../index.php"); exit; } /******************************************************************************/ // common functions require_once 'inc/functions/functions.common.php'; // dir functions require_once 'inc/functions/functions.dir.php'; // is enabled ? if ($cfg["enable_rename"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use rename"); @error("rename is disabled. Action has been logged.", "", ""); } // init template-instance tmplInitializeInstance($cfg["theme"], "page.rename.tmpl"); // process move and set vars if (isset($_REQUEST['start']) && $_REQUEST['start'] == true) { $file = UrlHTMLSlashesDecode($_REQUEST['file']); $dir = UrlHTMLSlashesDecode($_REQUEST['dir']); $sourceDir = $cfg["path"] . $dir; // only valid dirs + entries with permission if (!(tfb_isValidPath($sourceDir) && tfb_isValidPath($sourceDir . $file) && isValidEntry($file) && hasPermission($dir, $cfg["user"], 'w'))) { AuditAction($cfg["constants"]["error"], "ILLEGAL RENAME: " . $cfg["user"] . " tried to rename " . $file . " in " . $dir); @error("Illegal rename. Action has been logged.", "", ""); } // template $tmpl->setvar('is_start', 1); $tmpl->setvar('file', $file); $tmpl->setvar('dir', $dir); $tmpl->setvar('_REN_FILE', $cfg['_REN_FILE']);
@header("location: ../../index.php"); exit; } /******************************************************************************/ // default-type define('_DEFAULT_TYPE', 'server'); // default-targets define('_DEFAULT_TARGET_SERVER', 'all'); define('_DEFAULT_TARGET_MRTG', 'traffic'); // input-dir mrtg define('_MRTG_DIR_INPUT', $cfg["path"] . '.mrtg'); // image-defines define('_IMAGE_URL', "image.php"); define('_IMAGE_PREFIX_MRTG', "?i=mrtg&f="); // init template-instance tmplInitializeInstance($cfg["theme"], "page.images.tmpl"); // request-vars $type = isset($_REQUEST['type']) ? tfb_getRequestVar('type') : _DEFAULT_TYPE; $target = tfb_getRequestVar('target'); // types $type_list = array(); array_push($type_list, array('name' => "server", 'selected' => $type == "server" ? 1 : 0)); array_push($type_list, array('name' => "mrtg", 'selected' => $type == "mrtg" ? 1 : 0)); $tmpl->setloop('type_list', $type_list); // type-switch switch ($type) { // server case "server": // target if ($target == "") { $target = _DEFAULT_TARGET_SERVER;
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // prevent direct invocation if (!isset($cfg['user']) || isset($_REQUEST['cfg'])) { @ob_end_clean(); @header("location: ../../../index.php"); exit; } /******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.admin.showUsers.tmpl"); // set vars $tmpl->setvar('enable_xfer', $cfg["enable_xfer"]); tmplSetTitleBar("Administration - Show Users"); tmplSetAdminMenu(); tmplSetUserSection(); tmplSetFoot(); tmplSetIidVars(); // parse template $tmpl->pparse();
if (!empty($_REQUEST["create"])) { switch ($_REQUEST["create"]) { default: case "tornado": $onLoad = createTorrentTornado(); break; case "mainline": $onLoad = createTorrentMainline(); break; } } /******************************************************************************* * page ******************************************************************************/ // init template-instance tmplInitializeInstance($cfg["theme"], "page.maketorrent.tmpl"); // set vars $tmpl->setvar('path', $path); $tmpl->setvar('torrent', $torrent); $tmpl->setvar('comment', $comment); if (!empty($onLoad)) { $tmpl->setvar('onLoad', $onLoad); } $tmpl->setvar('alert', $alert); // client-specific $tmpl->setvar('client', $client); $tmpl->setvar('client_select_action', $_SERVER['REQUEST_URI']); switch ($client) { default: case "tornado": $tmpl->setvar('form_action', $_SERVER['REQUEST_URI'] . "&create=tornado");