AuditAction($cfg["constants"]["fm_download"], $sendname . "." . $cfg["package_type"]); exit; } else { AuditAction($cfg["constants"]["error"], "Illegal download: " . $cfg['user'] . " tried to download " . $tar); } } else { AuditAction($cfg["constants"]["error"], "ILLEGAL TAR DOWNLOAD: " . $cfg['user'] . " tried to download " . $tar); } header("Location: dir.php?dir=" . urlencode($current)); } // ----------------------------------------------------------------------------- if ($dir == "") { unset($dir); } if (isset($dir)) { if (isValidPath($dir) !== true) { unset($dir); } else { $dir = $dir . "/"; } } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- DisplayHead(_DIRECTORYLIST); ?> <script language="JavaScript"> function MakeTorrent(name_file) { window.open (name_file,'_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=430') } function ConfirmDelete(file)
GNU General Public License for more details. To read the license please visit http://www.gnu.org/copyleft/gpl.html *******************************************************************************/ // contributed by NovaKing -- thanks duder! include_once "config.php"; include_once "functions.php"; // is enabled ? if ($cfg["enable_view_nfo"] != 1) { AuditAction($cfg["constants"]["error"], "ILLEGAL ACCESS: " . $cfg["user"] . " tried to use nfo-viewer"); showErrorPage("nfo-viewer is disabled."); } // target-file $file = getRequestVar("path"); $fileIsValid = isValidPath($file, ".nfo") || isValidPath($file, ".txt") || isValidPath($file, ".log"); if (!$fileIsValid) { AuditAction($cfg["constants"]["error"], "Invalid NFO-file : " . $cfg["user"] . " tried to access " . $file); showErrorPage("Invalid NFO-file : <br>" . $file); } // get content $folder = htmlspecialchars(substr($file, 0, strrpos($file, "/"))); if (($output = @file_get_contents($cfg["path"] . $file)) === false) { $output = "Error opening NFO File."; } // output DisplayHead("View NFO"); ?> <div align="center" style="width: 740px;"> <a href="<?php echo "viewnfo.php?path={$file}&dos=1";
/** * deletes a dir-entry. recursive process via avddelete * * @param $del entry to delete * @return string with current */ function delDirEntry($del) { global $cfg; $current = ""; // The following lines of code were suggested by Jody Steele jmlsteele@stfu.ca // this is so only the owner of the file(s) or admin can delete if (IsAdmin($cfg["user"]) || preg_match("/^" . $cfg["user"] . "/", $del)) { // Yes, then delete it // we need to strip slashes twice in some circumstances // Ex. If we are trying to delete test/tester's file/test.txt // $del will be "test/tester\\\'s file/test.txt" // one strip will give us "test/tester\'s file/test.txt // the second strip will give us the correct // "test/tester's file/test.txt" $del = stripslashes(stripslashes($del)); if (isValidPath($del)) { avddelete($cfg["path"] . $del); $arTemp = explode("/", $del); if (count($arTemp) > 1) { array_pop($arTemp); $current = implode("/", $arTemp); } AuditAction($cfg["constants"]["fm_delete"], $del); } else { AuditAction($cfg["constants"]["error"], "ILLEGAL DELETE: " . $cfg['user'] . " tried to delete " . $del); } } else { AuditAction($cfg["constants"]["error"], "ILLEGAL DELETE: " . $cfg['user'] . " tried to delete " . $del); } return $current; }
if (isOK($response)) { printResult($response, " ---- ADDING TRACKABLES FAILED ---- ", " ---- ADDING TRACKABLES SUCCESSFULLY COMPLETED ----"); } else { echo $response->getMessage(); } } else { $msg = validateTrackablesFolderPath($localFolderName); if (isset($msg)) { echo $msg; break; } $localFolder = opendir($localFolderName); $localFolderName = updateTrackablesFolderPath($localFolderName); $trackableIndex = 0; while ($filename = readdir($localFolder)) { if (!isValidPath($localFolderName, $filename)) { continue; } $msg = replaceWhitespaces($filename, $localFolderName, "trackable"); if (isset($msg)) { continue; } $trackable = $localFolderName . $filename; $response = addTrackingData($email, $password, $dbName, $trackable); echo PHP_EOL . "... uploading " . $filename . "..." . PHP_EOL; if (isOK($response)) { printResult($response, " ---- ADDING TRACKABLE FAILED ---- ", " ---- ADDING TRACKABLE SUCCESSFULLY COMPLETED ----"); if (!isError($response->getBody())) { $trackableIndex++; } continue;