updates for system
This commit is contained in:
parent
16a318b62f
commit
c9ea4720eb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
/nbproject/private
|
||||
/cache/
|
||||
@ -1,3 +1,7 @@
|
||||
RewriteEngine On
|
||||
RewriteCond %{HTTP_HOST} !^www\.neopolimatrix\.eu [NC]
|
||||
RewriteRule ^(.*)$ http://www.neopolimatrix.eu/$1 [R=301,L]
|
||||
|
||||
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]
|
||||
6
api.php
6
api.php
@ -1,9 +1,5 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc';
|
||||
require_once 'neopolimatrix/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
require_once 'autoload.inc';
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify','api_neopolimatrix',array_merge($_POST,$_GET));
|
||||
new \SYSTEM\LOG\COUNTER("API was called sucessfully.");
|
||||
6
autoload.inc
Normal file
6
autoload.inc
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'neopolimatrix/autoload.inc'; //Project Classes
|
||||
require_once '../../config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
@ -1,9 +1,5 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc';
|
||||
require_once 'neopolimatrix/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
require_once 'autoload.inc';
|
||||
|
||||
echo \SYSTEM\API\api::run('\SYSTEM\API\verify', 'page_neopolimatrix', array_merge($_POST,$_GET), 1, true, true);
|
||||
new \SYSTEM\LOG\COUNTER("Page was called sucessfully.");
|
||||
@ -3,13 +3,13 @@ class article {
|
||||
public static function preview($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/preview.tpl'), $element);
|
||||
return SYSTEM\PAGE\replace::replaceFile((new PPAGE('article/tpl/preview.tpl'))->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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,10 +1,18 @@
|
||||
<?php
|
||||
class default_article extends \SYSTEM\PAGE\Page {
|
||||
class default_article implements \SYSTEM\PAGE\Page {
|
||||
var $id = null;
|
||||
public function __construct($id) {
|
||||
$this->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);
|
||||
|
||||
@ -1,7 +1,17 @@
|
||||
<?php
|
||||
class default_impressum extends \SYSTEM\PAGE\Page {
|
||||
class default_impressum implements \SYSTEM\PAGE\Page {
|
||||
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 = \SYSTEM\PAGE\text::tag('neopolimatrix');
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_impressum/tpl/impressum.tpl'), $vars);
|
||||
return \SYSTEM\PAGE\replace::replaceFile((new PPAGE('default_impressum/tpl/impressum.tpl'))->SERVERPATH(), $vars);
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,19 @@
|
||||
<?php
|
||||
class default_list extends \SYSTEM\PAGE\Page {
|
||||
class default_list implements \SYSTEM\PAGE\Page {
|
||||
var $tag = null;
|
||||
public function __construct($tag = null) {
|
||||
$this->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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<?php
|
||||
class default_page extends \SYSTEM\PAGE\Page {
|
||||
private function js(){
|
||||
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()).
|
||||
\SYSTEM\HTML\html::script(\LIB\lib_bootstrap::js()).
|
||||
\SYSTEM\HTML\html::script(\LIB\lib_system::js()).
|
||||
\SYSTEM\HTML\html::script(\SYSTEM\WEBPATH(new PPAGE(),'default_page/js/default_page.js'));
|
||||
class default_page implements \SYSTEM\PAGE\DefaultPage {
|
||||
public static function js(){
|
||||
return \SYSTEM\HTML\html::script(\LIB\lib_jquery::js()->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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,18 @@
|
||||
<?php
|
||||
class default_search extends \SYSTEM\PAGE\Page {
|
||||
class default_search implements \SYSTEM\PAGE\Page {
|
||||
var $param = null;
|
||||
public function __construct($param) {
|
||||
$this->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);
|
||||
}
|
||||
}
|
||||
@ -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_);}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PLIB extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'lib/'.\SYSTEM\C_SUBPATH;}
|
||||
}
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'lib/', $subpath);}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PPAGE extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'neopolimatrix/page/'.\SYSTEM\C_SUBPATH;}
|
||||
}
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'neopolimatrix/page/', $subpath);}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PSAI extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'neopolimatrix/sai/'.\SYSTEM\C_SUBPATH;}
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'neopolimatrix/sai/', $subpath);}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PSQL extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'neopolimatrix/sql/'.\SYSTEM\C_SUBPATH;}
|
||||
}
|
||||
public function __construct($subpath = '') {
|
||||
parent::__construct(new \SYSTEM\PROOT(), 'neopolimatrix/sql/', $subpath);}
|
||||
}
|
||||
@ -3,8 +3,8 @@ namespace SQL;
|
||||
class DATA_NEOPOLIMATRIX extends \SYSTEM\DB\QI {
|
||||
public static function get_class(){return \get_class();}
|
||||
public static function files_mysql(){
|
||||
return array( \SYSTEM\SERVERPATH(new \PSQL(),'/mysql/system_page.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/system_api.sql'),
|
||||
\SYSTEM\SERVERPATH(new \PSQL(),'/mysql/system_text.sql'));
|
||||
return array( (new \PSQL('/mysql/system_page.sql'))->SERVERPATH(),
|
||||
(new \PSQL('/mysql/system_api.sql'))->SERVERPATH(),
|
||||
(new \PSQL('/mysql/system_text.sql'))->SERVERPATH());
|
||||
}
|
||||
}
|
||||
8
sai.php
8
sai.php
@ -1,8 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'neopolimatrix/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
require_once 'autoload.inc';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
|
||||
echo (new SYSTEM\SAI\saigui())->html();
|
||||
echo (new SYSTEM\SAI\sai_gui())->html();
|
||||
@ -1,8 +1,4 @@
|
||||
<?php
|
||||
require_once 'lib/autoload.inc'; //SYSTEM Classes
|
||||
require_once 'neopolimatrix/autoload.inc'; //Project Classes
|
||||
require_once '/home/web/web/config/get_config.php';
|
||||
|
||||
\SYSTEM\system::start(\WEBCRAFT\get_config(dirname(__FILE__)));
|
||||
require_once 'autoload.inc';
|
||||
|
||||
echo \SYSTEM\SQL\setup::install();
|
||||
Loading…
x
Reference in New Issue
Block a user