<?php
// +------------------------------------------------------------------------+
// | PHP Melody version 1.6.7 ( www.phpsugar.com )
// +------------------------------------------------------------------------+
// | PHP Melody IS NOT FREE SOFTWARE
// | If you have downloaded this software from a website other
// | than www.phpsugar.com or if you have received
// | this software from someone who is not a representative of
// | phpSugar, you are involved in an illegal activity.
// | ---
// | In such case, please contact: support@phpsugar.com.
// +------------------------------------------------------------------------+
// | Developed by: phpSugar (www.phpsugar.com) / support@phpsugar.com
// | Copyright: (c) 2004-2011 PhpSugar.com. All rights reserved.
// +------------------------------------------------------------------------+

session_start();
require_once('../config.php');
include_once('functions.php');
include_once( ABSPATH . 'include/user_functions.php');
include_once( ABSPATH . 'include/islogged.php');
require ABSPATH . 'include/article_functions.php';

if ( ! defined('U_ADMIN'))
{
	define('U_ADMIN', 1);	//	1 by default
}

if( ! $logged_in || ! is_admin())
{
	exit();
}

$message = '';
$action  = $_GET['do'];

switch ($action)
{
	case 'delete':
		
		$result = delete_page($_GET['id']);				
		if ($result['type'] == 'error')
		{
			echo '<div class="info_msg_errimg">'. $result['msg'] .'</div>';
		}
		else
		{
			echo '<div class="info_msg_ok">'. $result['msg'] .'</div>';
		}
		
		exit();

	break;
	
	default: 
		exit();
	break;
}

exit();
?>