Пример #1
0
#category
$s = "<select name=\"type\">\n<option value=\"0\">(choose one)</option>\n";
$cats = genrelist();
foreach ($cats as $row) {
    $s .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
}
$s .= "</select>\n";
tr("Category", $s, 1);
#Morgan: license
$lic = "<select name=\"lic\">\n<option value=\"0\">(choose one)</option>\n";
$lic_cats = licenselist();
foreach ($lic_cats as $row) {
    $lic .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . ' (' . htmlspecialchars($row["description"]) . ')' . "</option>\n";
}
$lic .= "</select>\n";
tr("License", $lic, 1);
#Morgan: version
$version = "<select name=\"version\">\n<option value=\"0\">(Select alternative version of this torrent)</option>\n";
$version_list = torrentlist();
foreach ($version_list as $row) {
    $version .= "<option value=\"" . $row["id"] . "\">" . htmlspecialchars($row["name"]) . "</option>\n";
}
$version .= "</select>\n";
tr("Version Group<br />(optional)", $version, 1);
?>
<tr><td align="center" colspan="2"><input type="submit" class='btn' value="Do it!" /></td></tr>
</table>
</form>
</div>
<?php 
stdfoot();
Пример #2
0
// Common Heading
$boxName = "box";
if (array_key_exists($boxName, $_POST)) {
    // Test if form was submitted
    $aWhitelist = $_POST[$boxName];
    foreach ($aWhitelist as $wl) {
        $table = "torrents";
        // Set column and table to be updated
        $column = "whitelist";
        $setColumnTo = "1";
        $hash = $wl;
        checkboxUpdate($table, $column, $setColumnTo, $hash);
        // UpdateDB
    }
}
$list = torrentlist();
// Get a list of Hashes for all torrents
$output = array();
while ($names = mysql_fetch_array($list, MYSQL_ASSOC)) {
    foreach ($names as $l) {
        $out = performance($l);
        array_push($output, $out);
    }
}
rsort($output);
$update = $output[1][7];
// Get latest update information
print "Last Update: " . $update;
$whitelist = 2;
$minSeeders = -2;
$minDuration = 0;