diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-22 02:04:53 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-22 02:04:53 +0100 |
commit | 695908c7ab2a5d5f011f616d2af3368da7131a6f (patch) | |
tree | cbd6c2a43495e77863d3611e2f6b12985b1111d8 /app/class/controllerhome.php | |
parent | a8ed9070e7773f3147a33dbee7d45ce24bd8959d (diff) | |
download | wcms-695908c7ab2a5d5f011f616d2af3368da7131a6f.tar.gz wcms-695908c7ab2a5d5f011f616d2af3368da7131a6f.zip |
home columns and download function added
Diffstat (limited to 'app/class/controllerhome.php')
-rw-r--r-- | app/class/controllerhome.php | 15 |
1 files changed, 11 insertions, 4 deletions
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 '<h2>Mass Edit</h2>'; - + 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() |