function Add() { // Check the token if (!Kit::CheckToken()) { trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR); } $db =& $this->db; $user =& $this->user; $response = new ResponseManager(); $resolution = Kit::GetParam('resolution', _POST, _STRING); $width = Kit::GetParam('width', _POST, _INT); $height = Kit::GetParam('height', _POST, _INT); // Add the resolution $resObject = new Resolution($db); if (!$resObject->Add($resolution, $width, $height)) { trigger_error($resObject->GetErrorMessage(), E_USER_ERROR); } $response->SetFormSubmitResponse('New resolution added'); $response->Respond(); }