<?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.");
}

$result = Pagedata::moveItem($_POST, $page, $_POST['direction']);
Pagedata::orderFix($page->id);

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