diff --git a/.gitignore b/.gitignore index b4b0f99..419b5e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /nbproject/private +/cache/ \ No newline at end of file diff --git a/.htaccess b/.htaccess index 071ed2b..7a5985e 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,7 @@ RewriteEngine On -RewriteCond %{HTTP_HOST} !^www\.neopolimatrix\.eu [NC] -RewriteRule ^(.*)$ http://www.neopolimatrix.eu/$1 [R=301,L] \ No newline at end of file + +RewriteRule ^(.*)/fonts/fontawesome-webfont(.*)$ lib/system/lib/font_awesome/lib/fonts/fontawesome-webfont$2 [L] +RewriteRule ^sai$ sai.php$1 [L] + +RewriteRule ^(.*)/files/([^/]+)/([^/]+)$ api.php?call=files&cat=$2&id=$3 [L] +RewriteRule ^cache/([^/]+)/([^/]+)$ api.php?call=cache&id=$1&ident=$2 [L] \ No newline at end of file diff --git a/api.php b/api.php index 6add64d..4941937 100644 --- a/api.php +++ b/api.php @@ -1,9 +1,5 @@ SERVERPATH(), $element); } public static function full($element = array()) { $element['published'] = date_format(new DateTime($element['time_create']), 'H:i d-m-Y'); $element['ago'] = \SYSTEM\time::time_ago_string(strtotime($element['time_create'])); - return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'article/tpl/article.tpl'), $element); + return SYSTEM\PAGE\replace::replaceFile((new PPAGE('article/tpl/article.tpl'))->SERVERPATH(), $element); } } \ No newline at end of file diff --git a/neopolimatrix/page/default_article/default_article.php b/neopolimatrix/page/default_article/default_article.php index 977266b..655dc25 100644 --- a/neopolimatrix/page/default_article/default_article.php +++ b/neopolimatrix/page/default_article/default_article.php @@ -1,10 +1,18 @@ id = $id;} + + public static function title(){ + return null;} + public static function meta(){ + return array();} + + public static function css(){ + return array();} public static function js(){ - return array( \SYSTEM\WEBPATH(new PPAGE(),'default_article/js/default_article.js'));} + return array( new PPAGE('default_article/js/default_article.js'));} public function html(){ $element = \SYSTEM\PAGE\text::get_adv($this->id); diff --git a/neopolimatrix/page/default_impressum/default_impressum.php b/neopolimatrix/page/default_impressum/default_impressum.php index ecf66d5..5fb9f3d 100644 --- a/neopolimatrix/page/default_impressum/default_impressum.php +++ b/neopolimatrix/page/default_impressum/default_impressum.php @@ -1,7 +1,17 @@ SERVERPATH(), $vars); } } \ No newline at end of file diff --git a/neopolimatrix/page/default_list/default_list.php b/neopolimatrix/page/default_list/default_list.php index 7c6fb53..2e61ec5 100644 --- a/neopolimatrix/page/default_list/default_list.php +++ b/neopolimatrix/page/default_list/default_list.php @@ -1,10 +1,19 @@ tag = $tag;} + + public static function title(){ + return null;} + public static function meta(){ + return array();} + + public static function css(){ + return array();} + public static function js(){ - return array( \SYSTEM\WEBPATH(new PPAGE(),'default_list/js/default_list.js'));} + return array( new PPAGE('default_list/js/default_list.js'));} private static function switch_list_title($tag){ switch($tag){ @@ -37,6 +46,6 @@ class default_list extends \SYSTEM\PAGE\Page { foreach($elements as $element){ $vars['list'] .= article::preview($element);} $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time')); - return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/tpl/default_list.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_list/tpl/default_list.tpl'))->SERVERPATH(), $vars); } } diff --git a/neopolimatrix/page/default_page/default_page.php b/neopolimatrix/page/default_page/default_page.php index 6e49f9e..13a3c75 100644 --- a/neopolimatrix/page/default_page/default_page.php +++ b/neopolimatrix/page/default_page/default_page.php @@ -1,17 +1,17 @@ WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()->WEBPATH()). + \SYSTEM\HTML\html::script(\LIB\lib_system::js()->WEBPATH()). + \SYSTEM\HTML\html::script((new PPAGE('default_page/js/default_page.js'))->WEBPATH()); } - private function css(){ - return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()). - \SYSTEM\HTML\html::link(\LIB\lib_font_awesome::css()). - \SYSTEM\HTML\html::link(\SYSTEM\WEBPATH(new PPAGE(),'default_page/css/default_page.css')). - \SYSTEM\HTML\html::link(\SYSTEM\WEBPATH(new PPAGE(),'default_page/css/table.css')); + public static function css(){ + return \SYSTEM\HTML\html::link(\LIB\lib_bootstrap::css()->WEBPATH()). + \SYSTEM\HTML\html::link(\LIB\lib_font_awesome::css()->WEBPATH()). + \SYSTEM\HTML\html::link((new PPAGE('default_page/css/default_page.css'))->WEBPATH()). + \SYSTEM\HTML\html::link((new PPAGE('default_page/css/table.css'))->WEBPATH()); } public function html($_escaped_fragment_ = NULL){ @@ -20,12 +20,12 @@ class default_page extends \SYSTEM\PAGE\Page { if(!$_escaped_fragment_){ $vars['js'] = $this->js();} $vars['css'] = $this->css(); - $vars['content_facebook'] = \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/content_facebook.tpl')); - $vars['content_header'] = \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/content_header.tpl')); - $vars['content_menu'] = \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/content_menu.tpl')); - $vars['content'] = \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/content.tpl')); - $vars['content_footer'] = \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/content_footer.tpl')); + $vars['content_facebook'] = \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_facebook.tpl'))->SERVERPATH()); + $vars['content_header'] = \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_header.tpl'))->SERVERPATH()); + $vars['content_menu'] = \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_menu.tpl'))->SERVERPATH()); + $vars['content'] = \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content.tpl'))->SERVERPATH()); + $vars['content_footer'] = \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/content_footer.tpl'))->SERVERPATH()); $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('meta')); - return \SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/default_page.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_page/tpl/default_page.tpl'))->SERVERPATH(), $vars); } } diff --git a/neopolimatrix/page/default_search/default_search.php b/neopolimatrix/page/default_search/default_search.php index 44204a2..45dafb9 100644 --- a/neopolimatrix/page/default_search/default_search.php +++ b/neopolimatrix/page/default_search/default_search.php @@ -1,8 +1,18 @@ param = $param;} + + public static function title(){ + return null;} + public static function meta(){ + return array();} + + public static function css(){ + return array();} + public static function js(){ + return array();} public function html(){ $vars = array(); @@ -12,6 +22,6 @@ class default_search extends \SYSTEM\PAGE\Page { foreach($elements as $element){ $vars['search'] .= article::preview($element);} $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time')); - return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_search/tpl/search.tpl'), $vars); + return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_search/tpl/search.tpl'))->SERVERPATH(), $vars); } } \ No newline at end of file diff --git a/neopolimatrix/page/page_neopolimatrix.php b/neopolimatrix/page/page_neopolimatrix.php index 41e25bc..dfa3a00 100644 --- a/neopolimatrix/page/page_neopolimatrix.php +++ b/neopolimatrix/page/page_neopolimatrix.php @@ -4,6 +4,8 @@ class page_neopolimatrix extends \SYSTEM\API\api_default { return 1;} public static function get_class($params = null){ return self::class;} + public static function get_default_state() { + return 'start';} public static function default_page($_escaped_fragment_ = NULL){ return (new default_page())->html($_escaped_fragment_);} diff --git a/neopolimatrix/path/PLIB.php b/neopolimatrix/path/PLIB.php index f0bb5dd..239ae59 100644 --- a/neopolimatrix/path/PLIB.php +++ b/neopolimatrix/path/PLIB.php @@ -1,5 +1,5 @@ SERVERPATH(), + (new \PSQL('/mysql/system_api.sql'))->SERVERPATH(), + (new \PSQL('/mysql/system_text.sql'))->SERVERPATH()); } } \ No newline at end of file diff --git a/sai.php b/sai.php index d53bce2..01c87c4 100644 --- a/sai.php +++ b/sai.php @@ -1,8 +1,4 @@ html(); \ No newline at end of file +echo (new SYSTEM\SAI\sai_gui())->html(); \ No newline at end of file diff --git a/setup.php b/setup.php index 749afd0..74bcd29 100644 --- a/setup.php +++ b/setup.php @@ -1,8 +1,4 @@