admin->__get('list')->getURL() . '#plugins' : $_REQUEST['redir']; # -- Get settings -- $s = dcCore::app()->blog->settings->addNamespace(basename(__DIR__)); $lb_overwrite = (bool) $s->get('overwrite'); $lb_write_full = (bool) $s->get('write_full'); $lb_write_php = (bool) $s->get('write_php'); $lb_write_js = (bool) $s->get('write_js'); $lb_exclude_locales = (bool) $s->get('exclude_locales'); $lb_license_name = licenseBootstrap::getName($s->get('license_name')); $lb_license_head = licenseBootstrap::gethead($s->get('license_name'), licenseBootstrap::decode($s->get('license_head'))); # -- Set settings -- if (!empty($_POST['save'])) { try { $lb_overwrite = !empty($_POST['lb_overwrite']); $lb_write_full = !empty($_POST['lb_write_full']); $lb_write_php = !empty($_POST['lb_write_php']); $lb_write_js = !empty($_POST['lb_write_js']); $lb_exclude_locales = !empty($_POST['lb_exclude_locales']); $lb_license_name = $_POST['lb_license_name']; $lb_license_head = licenseBootstrap::gethead($lb_license_name, !empty($_POST['lb_license_head_' . $lb_license_name]) ? $_POST['lb_license_head_' . $lb_license_name] : ''); $s->put('overwrite', $lb_overwrite); $s->put('write_full', $lb_write_full); $s->put('write_php', $lb_write_php); $s->put('write_js', $lb_write_js); $s->put('exclude_locales', $lb_exclude_locales); $s->put('license_name', licenseBootstrap::getName($lb_license_name)); $s->put('license_head', licenseBootstrap::encode($lb_license_head)); dcPage::addSuccessNotice( __('Configuration has been successfully updated.') ); http::redirect( dcCore::app()->admin->__get('list')->getURL('module=' . basename(__DIR__) . '&conf=1&redir=' . dcCore::app()->admin->__get('list')->getRedir()) ); } catch (Exception $e) { dcCore::app()->error->add($e->getMessage()); } } # -- Display form -- echo '
' . form::textarea('lb_license_head_' . $name, 50, 10, html::escapeHTML($head)) . '
'; } echo '