diff --git a/base.php b/base.php index 670e79e..7e89a34 100644 --- a/base.php +++ b/base.php @@ -382,6 +382,8 @@ class Page return new PageBookDetail ($id, $query, $n); case Base::PAGE_ABOUT : return new PageAbout ($id, $query, $n); + case Base::PAGE_CUSTOMIZE : + return new PageCustomize ($id, $query, $n); default: $page = new Page ($id, $query, $n); $page->idPage = "cops:catalog"; @@ -690,6 +692,59 @@ class PageAbout extends Page } } +class PageCustomize extends Page +{ + public function InitializeContent () + { + global $config; + $this->title = localize ("customize.title"); + $this->entryArray = array (); + + $use_fancybox = ""; + if (getCurrentOption ("use_fancyapps") == 1) { + $use_fancybox = "checked='checked'"; + } + + $content = ""; + if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) { + $content .= ''; + } + array_push ($this->entryArray, new Entry (localize ("customize.style"), "", + $content, "text", + array ())); + + $content = ''; + array_push ($this->entryArray, new Entry (localize ("customize.fancybox"), "", + $content, "text", + array ())); + $content = ''; + array_push ($this->entryArray, new Entry (localize ("customize.paging"), "", + $content, "text", + array ())); + } +} + abstract class Base { @@ -712,6 +767,7 @@ abstract class Base const PAGE_ABOUT = "16"; const PAGE_ALL_LANGUAGES = "17"; const PAGE_LANGUAGE_DETAIL = "18"; + const PAGE_CUSTOMIZE = "19"; const COMPATIBILITY_XML_ALDIKO = "aldiko"; diff --git a/customize.php b/customize.php deleted file mode 100644 index a3c2afc..0000000 --- a/customize.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - */ - - require_once ("config.php"); - require_once ("base.php"); - - - header ("Content-Type:text/html;charset=utf-8"); - - $database = GetUrlParam (DB); - $use_fancybox = ""; - if (getCurrentOption ("use_fancyapps") == 1) { - $use_fancybox = "checked='checked'"; - } - $max_item_per_page = getCurrentOption ("max_item_per_page"); - -?> - - -
- -