false, 'result' => false))); }else{ print_r(Zend_Json::encode(array('success' => true, 'result' => true))); } } else { Webforms::checkAdminAccess($current_user); $webform = new Webforms_Model($_REQUEST); try { $webform->save(); $URL = 'index.php?module=Webforms&action=WebformsDetailView&parenttab=Settings&id=' . $webform->getId(); } catch (Exception $e) { $URL = 'index.php?module=Webforms&action=Error&parenttab=Settings&errormsg=' . $e->getMessage(); } header(sprintf("Location: %s", $URL)); } ?>