aboutsummaryrefslogtreecommitdiff
path: root/app/class/controllerfont.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-29 01:53:17 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-29 01:53:17 +0100
commitd0ef17169701f90a9dab5f50e3eb61954653cae2 (patch)
tree03efa5a4e6eb1d2727b4c075b16a3627b1ad4591 /app/class/controllerfont.php
parent6e3ad2f1355e5f474cc02ab3b9eebe881dbb04ee (diff)
downloadwcms-d0ef17169701f90a9dab5f50e3eb61954653cae2.tar.gz
wcms-d0ef17169701f90a9dab5f50e3eb61954653cae2.zip
font upload
Diffstat (limited to 'app/class/controllerfont.php')
-rw-r--r--app/class/controllerfont.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/app/class/controllerfont.php b/app/class/controllerfont.php
index 29064d2..d85e60e 100644
--- a/app/class/controllerfont.php
+++ b/app/class/controllerfont.php
@@ -14,7 +14,14 @@ class Controllerfont extends Controller
public function desktop()
{
- var_dump($this->fontmanager->getfontlist());
+ if($this->user->isadmin()) {
+
+ $fontlist = $this->fontmanager->getfontlist();
+
+ $this->showtemplate('font', ['fontlist' => $fontlist, 'fonttypes' => $this->fontmanager->getfonttypes(), 'fontfile' => Model::globalpath().'fonts.css']);
+ } else {
+ $this->routedirect('home');
+ }
}
public function render()
@@ -23,9 +30,15 @@ class Controllerfont extends Controller
$this->routedirect('font');
}
- public function addfont()
+ public function add()
{
-
+ var_dump($_FILES);
+ if(isset($_POST['fontname'])) {
+ $fontname = $_POST['fontname'];
+ } else {
+ $fontname = '';
+ }
+ var_dump($this->fontmanager->upload($_FILES, 2 ** 16, $fontname));
}
}