discourse-legacysite-perl/site/runshops/delete_X.php
2024-06-17 22:42:14 +10:00

29 lines
792 B
PHP

<?PHP
include("config.php");
if (!$_POST || !is_admin()){ header('Location: '.$site_url); }
$sql = "DELETE FROM ".$prefix."Runshops WHERE runshop_id = '$_POST[runshop_id]'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM ".$prefix."RunshopsEdits WHERE runshop_id_fk = '$_POST[runshop_id]'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM ".$prefix."RunshopsEditors WHERE runshop_id_fk = '$_POST[runshop_id]'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM ".$prefix."RunshopsComment WHERE runshop_id_fk = '$_POST[runshop_id]'";
mysql_query($sql) or die(mysql_error());
$sql = "DELETE FROM ".$prefix."RunshopsRating WHERE runshop_id_fk = '$_POST[runshop_id]'";
mysql_query($sql) or die(mysql_error());
header('Location: '.$site_url);
?>