From a91c916248f967da2d4218b575e665242b7c975b Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 25 Oct 2018 20:25:05 +0200 Subject: phoenixreborn\'NWY --- w/class/modelhome.php | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 w/class/modelhome.php (limited to 'w/class/modelhome.php') diff --git a/w/class/modelhome.php b/w/class/modelhome.php new file mode 100644 index 0000000..660352f --- /dev/null +++ b/w/class/modelhome.php @@ -0,0 +1,59 @@ +setcol(['id', 'tag', 'linkfrom', 'contenu', 'description', 'title', 'datemodif', 'datecreation', 'secure']); + $table = $artmanager->getlisteropt($opt); + $artmanager->listcalclinkfrom($table); + $opt->settaglist($table); + $opt->submit(); + + + $opt->setcol(['id', 'tag', 'linkfrom', 'contenu', 'description', 'title', 'datemodif', 'datecreation', 'secure', 'linkto']); + + + //$aff->option($app, $opt); + + echo '

Options

'; + + + $filtertagfilter = $artmanager->filtertagfilter($table, $opt->tagfilter(), $opt->tagcompare()); + $filtersecure = $artmanager->filtersecure($table, $opt->secure()); + + $filter = array_intersect($filtertagfilter, $filtersecure); + $table2 = []; + $table2invert = []; + foreach ($table as $art) { + if (in_array($art->id(), $filter)) { + $table2[] = $art; + } else { + $table2invert[] = $art; + } + + + } + + if (!empty($opt->invert())) { + $table2 = $table2invert; + } + + $artmanager->artlistsort($table2, $opt->sortby(), $opt->order()); + + + return $table2; + } +} + + + + + + + + +?> \ No newline at end of file -- cgit v1.2.3