<?php

if (!isset($gCms)) exit;

if (! $this->CheckPermission('Use Play'))
	return $this->DisplayErrorPage($id, $params, $returnid,$this->Lang('accessdenied'));

if (!isset($params['recordid']))
	return $this->DisplayErrorPage($id, $params, $returnid,$this->Lang('error_norecordid'));


include_once dirname(__FILE__).'/class.record.php';

$errors = array();


$recordid = $params['recordid'];
$record = new pRecord();
$record->loaddb($recordid);
if (!$record->deletedb())
	$errors[] = $this->lang('error_deletedb');


if (count($errors)>0)
{
	$module_error = '';
	foreach ($errors as $error)
		$module_error .= $error."<br />";
	$module_error = array("module_error"=>$module_error);
}
else
	$module_error = array();

$this->redirect($id,'defaultadmin','',$module_error);



?>