} $dh = @opendir($dir); } $files = array(); $dirs = array(); if ($dh) { $dir = addslash($dir); while (false !== ($file = readdir($dh))) { $path = fullpath($dir . $file); if ($file == ".." && $dir == $topDirectory) { continue; } if (is_dir($path) && is_readable($path) && strpos(addslash($path), $topDirectory) === 0 && ($theSettings->uid < 0 || isUserHavePermission($theSettings->uid, $theSettings->gid, $path, 0x5))) { $dirs['/' . $file] = $path; } else { if (LFS::is_file($path) && is_readable($path) && ($theSettings->uid < 0 || isUserHavePermission($theSettings->uid, $theSettings->gid, $path, 0x4))) { $files[$file] = $path; } } } closedir($dh); ksort($files, SORT_STRING); ksort($dirs, SORT_STRING); $files = array_merge($dirs, $files); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru"> <head> <style> body { background-color: window; color: windowtext; border: 0px; margin: 0px; padding: 0px; -moz-user-select:none; }
foreach ($info['rtorrent.script.error'] as $external) { $fname = $rootPath . '/plugins/' . $file . '/' . $external; @chmod($fname, $profileMask & 0755); if (!isUserHavePermission($theSettings->uid, $theSettings->gid, $fname, 0x5)) { $jResult .= "noty('" . $file . ": '+theUILang.rTorrentBadScriptPath+' ('+'" . $fname . "'+').','error');"; $extError = true; } } if ($extError) { $disabled[$file] = $info; continue; } foreach ($info['rtorrent.php.error'] as $external) { $fname = $rootPath . '/plugins/' . $file . '/' . $external; @chmod($fname, $profileMask & 0644); if (!isUserHavePermission($theSettings->uid, $theSettings->gid, $fname, 0x4)) { $jResult .= "noty('" . $file . ": '+theUILang.rTorrentBadPHPScriptPath+' ('+'" . $fname . "'+').','error');"; $extError = true; } } if ($extError) { $disabled[$file] = $info; continue; } if (!isLocalMode()) { if ($info["rtorrent.remote"] == "error") { $jResult .= "noty('" . $file . ": '+theUILang.errMustBeInSomeHost,'error');"; $disabled[$file] = $info; continue; } if ($do_diagnostic && $info["rtorrent.remote"] == "warning") {
if (!$dh) { $dir = isLocalMode() ? $theSettings->directory : $topDirectory; if (strpos(addslash($dir), $topDirectory) !== 0) { $dir = $topDirectory; } $dh = @opendir($dir); } if ($dh) { $files = array(); $dir = addslash($dir); while (false !== ($file = readdir($dh))) { $path = fullpath($dir . $file); if ($file == ".." && $dir == $topDirectory) { continue; } if (is_dir($path) && is_readable($path) && strpos(addslash($path), $topDirectory) === 0 && ($theSettings->uid < 0 || isUserHavePermission($theSettings->uid, $theSettings->gid, $path, 0x7))) { $files[] = $file; } } closedir($dh); sort($files, SORT_STRING); $output["basedir"] = fullpath($dir); $output["dirlist"] = $files; } } if (in_array("channels", $modes) && $theSettings->isPluginRegistered('throttle')) { require_once '../throttle/throttle.php'; $trt = rThrottle::load(); $tnames = array(); foreach ($trt->thr as $thr) { $tnames[] = $thr["name"];
$jResult .= "log(theUILang.badUploadsPath+' (" . $up . ")');"; } if (!isUserHavePermission($theSettings->myuid, $theSettings->mygid, $st, 0x7)) { $jResult .= "log(theUILang.badSettingsPath+' (" . $st . ")');"; } if (!empty($theSettings->session)) { if ($theSettings->uid < 0 || $theSettings->gid < 0) { $jResult .= "log(theUILang.badSessionPath+' (" . $theSettings->session . ")');"; } else { if (!isUserHavePermission($theSettings->uid, $theSettings->gid, $up, 0x7)) { $jResult .= "log(theUILang.badUploadsPath2+' (" . $up . ")');"; } if (!isUserHavePermission($theSettings->uid, $theSettings->gid, $st, 0x7)) { $jResult .= "log(theUILang.badSettingsPath2+' (" . $st . ")');"; } if (!isUserHavePermission($theSettings->uid, $theSettings->gid, './test.sh', 0x5)) { $jResult .= "log(theUILang.badTestPath+' (" . realpath('./test.sh') . ")');"; } } } if ($theSettings->badXMLRPCVersion) { $jResult .= "log(theUILang.badXMLRPCVersion);"; } } } $plg = getConfFile('plugins.ini'); if (!$plg) { $plg = "../conf/plugins.ini"; } $permissions = parse_ini_file($plg, true); $init = array();