<?php
/*===================================================+
|| # HoloCMS - Website and Content Management System
|+===================================================+
|| # Copyright © 2008 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|+===================================================+
|| # HoloCMS is provided "as is" and comes without
|| # warrenty of any kind. HoloCMS is free software!
|+===================================================*/

include('../core.php');
include('../includes/session.php');

$label = FilterText($_POST['label']);
$id = FilterText($_POST['messageId']);
$start = FilterText($_POST['start']);
$conversation = FilterText($_POST['conversationId']);

$sql = mysql_query("SELECT * FROM cms_minimail WHERE id = '".$id."' LIMIT 1");
$row = mysql_fetch_assoc($sql);

if($row['deleted'] == "1"){
mysql_query("DELETE FROM cms_minimail WHERE id = '".$id."' LIMIT 1");
$bypass = "true";
$page = "trash";
$message = "Messaggio Eliminato Con Successo";
include('loadMessage.php');
} else {
mysql_query("UPDATE cms_minimail SET deleted = '1' WHERE id = '".$id."' LIMIT 1");
$bypass = "true";
$page = "inbox";
$message = "Il Messaggio e stato Spostato Nel Cestino";
include('loadMessage.php');
} ?>