Location: PHPKode > projects > H-tracker > indexdelete.php
<?
//
//  H-Tracker v0.2
//    http://h-tracker.org
//    Based on TorrentTrader (http://www.torrenttrader.org)
//
//

require "backend/functions.php";
dbconn();
loggedinonly();

if (get_user_class() < 7)
	show_error_msg("Error", "Acces Denied");
$action = $_GET["action"];
if ($action == 'delete') {
	$id = (int) $_GET["id"];
	if (!is_valid_id($id))
		show_error_msg("Error", "Invalid ID");
	$returnto = htmlentities($_GET["returnto"]);
	$sure = $_GET["sure"];
	if (!$sure)
		show_error_msg("Remove", "You really wish to remove this release? Click <a href=\"?action=delete&id=$id&returnto=$returnto&sure=1\">here</a> if you believe.");
	mysql_query("DELETE FROM indexreleases WHERE id = ".sqlesc($id)) or sqlerr(__FILE__,__LINE__);
		if ($returnto != "")
			header("Location: $returnto");
		else
		show_success_msg("Successfully", "Release removed.");
}
?>
Return current item: H-tracker