$editor->addChoice('entry_type_inactive', 0, _l('No')); $editor->addChoice('entry_type_inactive', 1, _l('Yes')); $editor->getDB(); if (isset($_POST['editor_submit'])) { if ($editor->input($_POST)) { if ($editor->performDBquery()) { // Redirect header('Location: admin_entry_type.php'); exit; } else { echo 'Error occured while performing query on database:<br>' . chr(10), exit; } } } include "include/admin_middel.php"; $editor->printEditor(); } elseif (isset($_GET['entry_type_id']) && isset($_GET['area_id'])) { $entry_type = getEntryType($_GET['entry_type_id']); if (!count($entry_type)) { echo 'Finner ikke typen.'; exit; } $area = getArea($_GET['area_id']); if (!count($area)) { echo __('Can\'t find the area.'); exit; } $entry_type_defaultattachment = getEntryTypeDefaultAttachment($_GET['entry_type_id'], $_GET['area_id']); $saved = false; if (isset($_POST['attSave'])) { if (!isset($_POST['attachment']) || !is_array($_POST['attachment'])) {