<?php

require_once('../config/config.php');
require_once('../foo/functions.php');
dbconnect();
session_start();

if ($_SERVER['REQUEST_METHOD'] === 'GET') {

	if (delete_msg($_GET['msgid'])) {
		delete_rply($_GET['msgid']);
		log_info($_SERVER['REMOTE_ADDR'], $_SESSION['admin_login'], $_GET['acc'], 'Message Successfully Deleted');
		redirect('messages.php');
	}
}

?>