From 695908c7ab2a5d5f011f616d2af3368da7131a6f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 22 Jan 2019 02:04:53 +0100 Subject: home columns and download function added --- app/class/controllerhome.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'app/class/controllerhome.php') diff --git a/app/class/controllerhome.php b/app/class/controllerhome.php index f5b3068..cc2850f 100644 --- a/app/class/controllerhome.php +++ b/app/class/controllerhome.php @@ -22,15 +22,22 @@ class Controllerhome extends Controller $table2 = $this->modelhome->table2($table, $this->opt); - $this->showtemplate('home', ['user' => $this->user, 'table2' => $table2, 'opt' =>$this->opt]); + $columns = $this->modelhome->setcolumns($this->user->columns()); + + $this->showtemplate('home', ['user' => $this->user, 'table2' => $table2, 'opt' =>$this->opt, 'columns' => $columns]); } - public function massedit() + public function columns() { - echo '

Mass Edit

'; - + if(isset($_POST['columns']) && $this->user->iseditor()) { + $user =$this->usermanager->get($this->user->id()); + $user->hydrate($_POST); + $this->usermanager->add($user); + $this->usermanager->writesession($user); + } + $this->routedirect('home'); } public function search() -- cgit v1.2.3