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 .= '"; + } + } + 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"); - -?> - - - - - <?php echo localize ("customize.title") ?> - - - - - " /> - - - -
-
- - " alt="" /> - - " alt="Settings and menu" /> -
-

-
-
- -
-
-

-

-'; - } - foreach (glob ("styles/style-*.css") as $filename) { - if (preg_match ('/styles\/style-(.*?)\.css/', $filename, $m)) { - $filename = $m [1]; - } - $selected = ""; - if (getCurrentOption ("style") == $filename) { - if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) { - $selected = "selected='selected'"; - } else { - $selected = "checked='checked'"; - } - } - if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) { - echo ""; - } else { - echo ""; - } - } - if (!preg_match("/(Kobo|Kindle\/3.0|EBRD1101)/", $_SERVER['HTTP_USER_AGENT'])) { - echo ''; - } - -?> -

-
-
-

-

/>

-
-
-

-

-
-
- - -
- - diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html index e5b5662..8550559 100644 --- a/templates/default/bookdetail.html +++ b/templates/default/bookdetail.html @@ -10,7 +10,7 @@ {{~it.book.datas:data:i}} {{=data.format}} {{? data.mail == 1}} - Mail + Mail {{?}}
{{~}} diff --git a/templates/default/footer.html b/templates/default/footer.html index 6c9863f..050c795 100644 --- a/templates/default/footer.html +++ b/templates/default/footer.html @@ -1,6 +1,6 @@