<?php
/* Include Files ***************************/
require_once('../db-config.php');
	if(  defined('LTDVERSION')  )
		die('');
require_once('../inc/lib-compat-class.php');
require_once('../inc/lib-db-class.php');
require_once('../inc/lib-login-class.php');
/*******************************************/
global $rSdb;

$user	= new userManagement();
if(  !$user->_logged_in  )
	die(__('Access denied.','recipeshelf'));

if( ! check_ajax_referer('image-remove', false) )
	die('0|'.__('Security Alert: Direct access not permitted!','recipeshelf'));


$uploaddir	= dirname(__FILE__).'/../photos/';
$file		= basename( _rem_magic_quote($_POST['photo']) );

if ( unlink( $uploaddir.$file ) )
	echo $file;
else
	echo '';

?>