aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerhome.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/class/Controllerhome.php')
-rw-r--r--app/class/Controllerhome.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php
index 1603511..d102930 100644
--- a/app/class/Controllerhome.php
+++ b/app/class/Controllerhome.php
@@ -27,16 +27,16 @@ class Controllerhome extends Controllerpage
} else {
-
-
$table = $this->modelhome->getlister();
$this->opt = $this->modelhome->optinit($table);
+ $colors = new Colors($this->opt->taglist());
+
$table2 = $this->modelhome->table2($table, $this->opt);
$columns = $this->modelhome->setcolumns($this->user->columns());
- $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>=')];
+ $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>='), 'colors' => $colors];
$vars['footer'] = ['version' => getversion(), 'total' => count($table), 'database' => Config::pagetable()];
if (isset($_POST['query']) && $this->user->iseditor()) {
@@ -61,6 +61,18 @@ class Controllerhome extends Controllerpage
$this->routedirect('home');
}
+ public function colors()
+ {
+ if (isset($_POST['tagcolor']) && $this->user->issupereditor()) {
+ $colors = new Colors();
+ $colors->hydrate($_POST);
+ $colors->tocss();
+ $colors->writecssfile();
+ }
+ $this->routedirect('home');
+
+ }
+
public function search()
{
if (isset($_POST['id']) && !empty($_POST['id'])) {