require("include/top.php");
if ($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator'):
if ($id && $action=='delete')
{
$query = "DELETE FROM prods WHERE id=$id LIMIT 1";
mysql_query($query);
$query = "DELETE FROM downloadlinks WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM comments WHERE which=$id";
mysql_query($query);
$query = "DELETE FROM nfos WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM screenshots WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM prods_platforms WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM sceneorgrecommended WHERE prodid=$id";
mysql_query($query);
$query = "DELETE FROM users_cdcs WHERE cdc=$id";
mysql_query($query);
$query = "DELETE FROM affiliatedprods WHERE original=$id or derivative=$id";
mysql_query($query);
$query = "DELETE FROM prods_refs WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM prodotherparty WHERE prod=$id";
mysql_query($query);
$query = "DELETE FROM cdc WHERE which=$id";
mysql_query($query);
if(file_exists("../nfo/$id.nfo"))
unlink("../nfo/$id.nfo");
if(file_exists("../screenshots/$id.gif"))
unlink("../screenshots/$id.gif");
if(file_exists("../screenshots/$id.jpg"))
unlink("../screenshots/$id.jpg");
if(file_exists("../screenshots/$id.png"))
unlink("../screenshots/$id.png");
print("prod $id deleted
\n");
logGloperatorAction("prod_del",$id);
}
?>
DOUBLE CHECK THAT YOU'RE DELETING THE RIGHT PROD NUMBER BEFORE CLICKING!
THE LOBSTER WILL EAT YOUR CHILDREN IF YOU DONT!!
THIS IS THE ONE AND ONLY WARNING!!!
DOUBLE CHECK THE NUMBER!!!
else: ?>dude, that's a dangerous page...
endif; ?>