<?php
ob_start();
if(!(is_readable(realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc'))) {
	die('Error - Could not open or read file '.realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc');
} else {
	include_once(realpath(dirname(__FILE__).'/../').'/include/includesroutines.inc');
}
session_write_close();

$cn = db_connect();
if (getSetting('portal','useRights',0) != 1){
        exit;
}

if (!isset($_REQUEST['oguid'])) {
        //нет всех параметров 
        exit;
} else if (db_getIDObjectByGuid($cn, $_REQUEST['oguid']) && db_getUserRightsToObject($cn, GetUserIDs(), $_REQUEST['oguid'])) {
        echo "true";
} else {
        exit;
}

db_disconnect($cn);
ob_end_flush(); ?>
