<div id="site"> <?php } switch ($requri) { case "install": $stage = array(); ?> <h1>Installing <?php echo $torrent->setTitle($torrentName); ?> </h1> <div id="installer"> <ul id="installer_steps"> <li>Checking this directory is writable... <?php if (!is_writable($torrent->thisDir())) { echo "<span class=\"error\">Directory is not writable!</span> - CHMOD to 0777"; } else { echo "<span class=\"success\">Directory is writable!</span>"; $stage[] = 1; } if (count($stage) > 0) { ?> </li> <li>Setting up file structure... <?php if (!is_dir($CONFIG['torrent_folder'])) { mkdir($CONFIG['torrent_folder']); chmod($CONFIG['torrent_folder'], 0777); $torrent->write("FORBIDDEN", $CONFIG['torrent_folder'] . "/index.html"); chmod($CONFIG['torrent_folder'] . "/index.html", 0666);