<?
//
// H-Tracker v0.2
// http://h-tracker.org
// Based on TorrentTrader (http://www.torrenttrader.org)
//
//
require_once("backend/functions.php");
dbconn();
loggedinonly();
if (get_user_class() < 7)
show_error_msg("Error", "Access Denied");
function bark($msg) {
stdhead();
stdmsg("Error!", $msg);
stdfoot();
exit;
}
$var_list = "name:poster:genre:director:actors:descr:quality:video_codec:video_size:video_kbps:audio_lang:audio_trans:audio_codec:audio_kbps:time:torrentid:cat";
$int_list = "quality:video_codec:video_kbps:audio_lang:audio_trans:audio_codec:audio_kbps:torrentid:cat";
foreach (explode(":", $var_list) as $x)
if (empty($_POST[$x]))
show_error_msg("Error", "You have not filled all fields!");
else
$GLOBALS[$x] = $_POST[$x];
foreach (explode(":", $int_list) as $x)
if (!is_valid_id($GLOBALS[$x]))
show_error_msg("error", "You have entered not number into a following field: $x");
$video_kbps = $_POST["video_kbps"];
$time = $_POST["time"];
$imdb = $_POST["imdb"];
$added = sqlesc(get_date_time());
mysql_query("INSERT INTO indexreleases (".implode(", ", explode(":", $var_list)).($imdb ? ", imdb" : "").", added) VALUES (".implode(", ", array_map("sqlesc", array($name, $poster, $genre, $director, $actors, $descr, $quality, $video_codec, $video_size, $video_kbps, $audio_lang, $audio_trans, $audio_codec, $audio_kbps, $time, $torrentid, $cat))).($imdb ? ", ".sqlesc($imdb) : "").", $added)") or sqlerr(__FILE__, __LINE__);
header("Refresh: 0; url=index.php");
?>