/** * Adds a new region for a layout * @return */ function AddRegion() { $db =& $this->db; $user =& $this->user; //ajax request handler $response = new ResponseManager(); $layoutid = Kit::GetParam('layoutid', _REQUEST, _INT, 0); if ($layoutid == 0) { trigger_error(__("No layout information available, please refresh the page."), E_USER_ERROR); } include_once "lib/data/region.data.class.php"; $region = new region($db); if (!$region->AddRegion($layoutid, $user->userid)) { //there was an ERROR trigger_error($region->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse(__('Region Added.'), true, "index.php?p=layout&modify=true&layoutid={$layoutid}"); $response->Respond(); }