Fourth pass at adding key files
This commit is contained in:
28
site/slowtwitch.com/www/tick/pics_remove.php
Normal file
28
site/slowtwitch.com/www/tick/pics_remove.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?require ("global.php");?>
|
||||
<?php
|
||||
|
||||
if (isset($_GET['ID']))
|
||||
{
|
||||
$ID = $_GET["ID"];
|
||||
|
||||
$query = "SELECT fullname, stageID FROM pics WHERE ID = $ID LIMIT 1";
|
||||
$result = mysql_query($query, $db);
|
||||
if ($result)
|
||||
{
|
||||
if ($r = mysql_fetch_array($result))
|
||||
{
|
||||
$fullname = $r['fullname'];
|
||||
$stageID = $r['stageID'];
|
||||
unlink("$DOCUMENT_ROOT/tick/images/gallery/${fullname}");
|
||||
unlink("$DOCUMENT_ROOT/tick/images/gallery/t_${fullname}");
|
||||
}
|
||||
}
|
||||
|
||||
$query = "DELETE FROM pics WHERE ID = $ID LIMIT 1";
|
||||
$result = mysql_query($query, $db);
|
||||
staticify($stageID);
|
||||
}
|
||||
|
||||
header("Location: /tick/pics.php");
|
||||
|
||||
?>
|
Reference in New Issue
Block a user