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