Location: PHPKode > scripts > ImageVine Image Hosting Script > ImageVine/Script/delete.php
<?php

/*

    File Name: delete.php
	Project: ImageVine
	Author: ScriptVine.com
	Revision: 1a

*/


// include header
include("header.php");

// set page name
$page = "delete";

// set page title
$page_title = "Delete Image";

// get delete id
$del_id = isset($_GET['del_id']) ? $_GET['del_id'] : 0;

// get task
$task = isset($_POST['task']) ? $_POST['task'] : '';

// switch task
switch($task)
{
    case "doDelete":
	    
		$core->deleteFile($del_id);
	
	break;
	
    default:    
	    
		// query database to find image
	    $q = mysql_query("SELECT * FROM uploads WHERE delete_code = '".$del_id."' LIMIT 1");
		$r = mysql_fetch_array($q);
		
		// assign smarty vars
		$smarty->assign('image_name', $r['image_name']);
}

// include footer
include("footer.php");

?>
Return current item: ImageVine Image Hosting Script