diff --git a/lib/system b/lib/system index 59af1d3..45543a4 160000 --- a/lib/system +++ b/lib/system @@ -1 +1 @@ -Subproject commit 59af1d3bb32e507fc51a3aaedabb764e5d6aca2b +Subproject commit 45543a45b8bd0f6277edf66b66bf88e8dc29f086 diff --git a/neopolimatrix/api/api_neopolimatrix.php b/neopolimatrix/api/api_neopolimatrix.php index 5f974d9..8f3054f 100644 --- a/neopolimatrix/api/api_neopolimatrix.php +++ b/neopolimatrix/api/api_neopolimatrix.php @@ -1,6 +1,2 @@ id, $val, $c_ID, \SYSTEM\SECURITY\Security::getUser()->id, $val));} -} diff --git a/neopolimatrix/api/elements/elements.php b/neopolimatrix/api/elements/elements.php deleted file mode 100644 index 49f19b8..0000000 --- a/neopolimatrix/api/elements/elements.php +++ /dev/null @@ -1,12 +0,0 @@ -next()){ - $result[] = array( 0 => $row['day'], - 'match' => $row['class_match'] > 0 ? round($row['class_match'] / ($row['class_match']+$row['class_mismatch']),2) : 0, - 'mismatch' => $row['class_match'] > 0 ? round($row['class_mismatch'] / ($row['class_match']+$row['class_mismatch']),2) : 0); - } - return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; - } - - public static function graph_bt_to_user_overall_by_time ($timespan = 84600,$returnasjson = true){ - $result = array(); - $res = \DBD\UVOTE_DATA_GRAPH_BT_TO_USER_OVERALL_BY_TIME::QQ(array($timespan, \SYSTEM\SECURITY\Security::getUser()->id, \SYSTEM\SECURITY\Security::getUser()->id)); - while ($row = $res->next()){ - $result[] = array( 0 => $row['day'], - 'class_match' => $row['class_match'] / ($row['class_match']+$row['class_mismatch']+1), - 'class_mismatch' => $row['class_mismatch'] / ($row['class_match']+$row['class_mismatch']+1)); - } - return $returnasjson ? SYSTEM\LOG\JsonResult::toString($result) : $result; - } - -} diff --git a/neopolimatrix/api/elements/should_be_in_backend.php b/neopolimatrix/api/elements/should_be_in_backend.php deleted file mode 100644 index d382206..0000000 --- a/neopolimatrix/api/elements/should_be_in_backend.php +++ /dev/null @@ -1,13 +0,0 @@ -registerFolder(dirname(__FILE__).'/tbl/definitions/','DBD\DEFINITIONS'); -//$autoload->registerFolder(dirname(__FILE__).'/tbl/data/','DBD\DATA'); -//$autoload->registerFolder(dirname(__FILE__).'/tbl/data_processed/','DBD\DATA_PROCESSED'); \ No newline at end of file +\SYSTEM\autoload::registerFolder(dirname(__FILE__).'/tbl/','DBD'); \ No newline at end of file diff --git a/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST.php b/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST.php deleted file mode 100644 index 4118301..0000000 --- a/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST.php +++ /dev/null @@ -1,9 +0,0 @@ -article_id = $id;} + $this->id = $id;} public static function js(){ return array( \SYSTEM\WEBPATH(new PPAGE(),'default_article/js/default_article.js'));} public function html(){ $vars = array(); - $element = elements::getText($this->article_id); - $element['title'] = $element['id']; - $element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y'); - $element['ago'] = \SYSTEM\time::time_ago_string(strtotime($element['timestamp'])); + $element = \SYSTEM\PAGE\text::get_adv($this->id); + $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'])); $vars['text'] = SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_article/tpl/element.tpl'), $element); $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time')); return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_article/tpl/default_article.tpl'), $vars); diff --git a/neopolimatrix/page/default_article/tpl/element.tpl b/neopolimatrix/page/default_article/tpl/element.tpl index 9afd05e..9d8a419 100644 --- a/neopolimatrix/page/default_article/tpl/element.tpl +++ b/neopolimatrix/page/default_article/tpl/element.tpl @@ -1,15 +1,17 @@ -

-
-

Author: ${author}

+ +
+
+
+

Author: ${author_name}

${ago}

-

${title}

+

${id}


-${deDE} +${text}

Veröffentlicht: ${published}




-
+
\ No newline at end of file diff --git a/neopolimatrix/page/default_impressum/autoload.inc b/neopolimatrix/page/default_impressum/autoload.inc new file mode 100644 index 0000000..8fd92c5 --- /dev/null +++ b/neopolimatrix/page/default_impressum/autoload.inc @@ -0,0 +1,2 @@ +filter = $filter;} + var $tag = null; + public function __construct($tag = null) { + $this->tag = $tag;} public static function js(){ return array( \SYSTEM\WEBPATH(new PPAGE(),'default_list/js/default_list.js'));} - private function switch_filter($filter){ - switch($filter){ - case 1: - return '%'; - case 2: - return '%surveillance%'; - case 3: - return '%verteilung%'; - case 4: - return '%korruption%'; - case 5: - return '%polizei%'; - case 6: - return '%demokratie%'; - case 7: - return '%fof%'; - case 8: - return '%start%'; - default: - return '%';} - - } - - private function switch_list_title($filter){ - switch($filter){ - case 1: - return 'Neuheiten'; - case 2: + private static function switch_list_title($tag){ + switch($tag){ + case 'surveillance': return 'Überwachungsstaat'; - case 3: + case 'ungleichheit': return 'Ungerechtigkeiten'; - case 4: + case 'korruption': return 'Filz und Vetternwirtschaft'; - case 5: + case 'polizei': return 'Dein Freund und Helfer'; - case 6: + case 'demokratie': return 'Demokratie'; - case 7: + case 'fof': return 'Foes of Freedom'; - case 8: - return ''; default: - return '';} - + return 'Neuheiten'; + } } public function html(){ $vars = array(); - $vars['title'] = $this->switch_list_title($this->filter); - + $vars['title'] = self::switch_list_title($this->tag); $vars['list'] = ''; - $elements = elements::getAllElementsOfTag($this->switch_filter($this->filter)); + $elements = \SYSTEM\PAGE\text::tag_adv($this->tag ? $this->tag : 'neopolimatrix'); foreach($elements as $element){ - $element['title'] = $element['id']; - $element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y'); - $element['ago'] = \SYSTEM\time::time_ago_string(strtotime($element['timestamp'])); + $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'])); $vars['list'] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/tpl/element.tpl'), $element); } $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time')); diff --git a/neopolimatrix/page/default_list/tpl/element.tpl b/neopolimatrix/page/default_list/tpl/element.tpl index 701198a..e42d45b 100644 --- a/neopolimatrix/page/default_list/tpl/element.tpl +++ b/neopolimatrix/page/default_list/tpl/element.tpl @@ -1,15 +1,15 @@ -
-
-

Author: ${author}

- -

${ago}

-
-
-

${title}

-
-${deDE} -

Veröffentlicht: ${published}

-
-
-
Weiterlesen...
+
+
+

Author: ${author_name}

+ +

${ago}

+
+
+

${id}

+
+ ${text} +

Veröffentlicht: ${published}

+
+
+
Weiterlesen...
\ No newline at end of file diff --git a/neopolimatrix/page/default_page/autoload.inc b/neopolimatrix/page/default_page/autoload.inc new file mode 100644 index 0000000..8fd92c5 --- /dev/null +++ b/neopolimatrix/page/default_page/autoload.inc @@ -0,0 +1,2 @@ + diff --git a/neopolimatrix/page/default_search/autoload.inc b/neopolimatrix/page/default_search/autoload.inc new file mode 100644 index 0000000..af56333 --- /dev/null +++ b/neopolimatrix/page/default_search/autoload.inc @@ -0,0 +1,3 @@ +param.'%'); + $elements = \DBD\NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH::QA(array('%'.$this->param.'%','%'.$this->param.'%')); foreach($elements as $element){ $element['title'] = $element['id']; $element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y'); diff --git a/neopolimatrix/dbd/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH.php b/neopolimatrix/page/default_search/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH.php similarity index 100% rename from neopolimatrix/dbd/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH.php rename to neopolimatrix/page/default_search/qq/NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH.php diff --git a/neopolimatrix/page/page_neopolimatrix.php b/neopolimatrix/page/page_neopolimatrix.php index c8d6809..82bd463 100644 --- a/neopolimatrix/page/page_neopolimatrix.php +++ b/neopolimatrix/page/page_neopolimatrix.php @@ -5,8 +5,8 @@ class page_neopolimatrix extends \SYSTEM\API\api_default { public static function default_page($_escaped_fragment_ = NULL){ return (new default_page())->html($_escaped_fragment_);} - public static function page_list($filter=1){ - return (new default_list($filter))->html();} + public static function page_list($tag = null){ + return (new default_list($tag))->html();} public static function page_article($id){ return (new default_article($id))->html();}