<?php

$cms_root_path = "../../../";
require_once($cms_root_path."includes/compatibility_includer.php");

$page = new Page();
if ( isset($_GET['page_id']) && is_numeric($_GET['page_id']) ) {
	$page->Get($_GET['page_id']);
} else {
	die("Page not found.");
}

$premission_to_delete_all = false;
//if ( $_SESSION['content_manager']['is_mtcadmin'] ) {
//    $premission_to_delete_all = true;
//}

$result = Pagedata::deleteItem($_POST, $page, $premission_to_delete_all);
Pagedata::orderFix($page->id);

if ( $result ) {
	die('true');
} else {
	die('false');
}

