Пример #1
0
         mkdir($cfg["path"] . "/" . $owner, 0777);
     } else {
         AuditAction($cfg["constants"]["error"], "Error -- " . $cfg["path"] . " is not writable.");
         if (IsAdmin()) {
             header("location: admin.php?op=configSettings");
             exit;
         } else {
             $messages .= "<b>Error</b> TorrentFlux settings are not correct (path is not writable) -- please contact an admin.<br>";
         }
     }
 }
 // create AliasFile object and write out the stat file
 $af = new AliasFile($cfg["torrent_file_path"] . $alias . ".stat", $owner);
 if ($cfg["AllowQueing"]) {
     if ($queue == "1") {
         $af->QueueTorrentFile();
         // this only writes out the stat file (does not start torrent)
     } else {
         $af->StartTorrentFile();
         // this only writes out the stat file (does not start torrent)
     }
 } else {
     $af->StartTorrentFile();
     // this only writes out the stat file (does not start torrent)
 }
 if (usingTornado()) {
     $command = escapeshellarg($runtime) . " " . escapeshellarg($sharekill) . " '" . $cfg["torrent_file_path"] . $alias . ".stat' " . $owner . " --responsefile '" . $cfg["torrent_file_path"] . $torrent . "' --display_interval 5 --max_download_rate " . escapeshellarg($drate) . " --max_upload_rate " . escapeshellarg($rate) . " --max_uploads " . escapeshellarg($maxuploads) . " --minport " . escapeshellarg($minport) . " --maxport " . escapeshellarg($maxport) . " --rerequest_interval " . escapeshellarg($rerequest) . " --super_seeder " . escapeshellarg($superseeder) . " --crypto_allowed " . escapeshellarg($crypto_allowed) . " --crypto_only " . escapeshellarg($crypto_only) . " --crypto_stealth " . escapeshellarg($crypto_stealth);
     if (file_exists($cfg["torrent_file_path"] . $alias . ".prio")) {
         $priolist = explode(',', file_get_contents($cfg["torrent_file_path"] . $alias . ".prio"));
         $priolist = implode(',', array_slice($priolist, 1, $priolist[0]));
         $command .= " --priority " . escapeshellarg($priolist);