discourse-legacysite-perl/site/runshops/delete_X.php

29 lines
792 B
PHP
Raw Normal View History

2024-06-17 12:42:14 +00:00
<?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);
?>