From c3c4be4a4efd1404aad19797c15d2a9a6ffe29a6 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 22 Sep 2018 14:05:19 +0200 Subject: 2.7 table duplicate + css edit + desktop color --- class/class.w.aff.php | 81 ++++++++++++++++++++++++++++++++++++++++++++++-- class/class.w.app.php | 24 ++++++++++++-- class/class.w.config.php | 13 ++++++++ 3 files changed, 113 insertions(+), 5 deletions(-) (limited to 'class') diff --git a/class/class.w.aff.php b/class/class.w.aff.php index d47ca7a..0c7aa24 100644 --- a/class/class.w.aff.php +++ b/class/class.w.aff.php @@ -207,7 +207,7 @@ public function copy(Art $art, $list) } -public function head($title, $tool) +public function head($title, $tool, $color4) { ?> @@ -216,6 +216,11 @@ public function head($title, $tool) + <?= $title ?> @@ -240,6 +245,23 @@ public function arthead(Art $art, $cssdir, $cssread = '', $edit = 0) } +public function noarthead($id, $cssdir, $cssread = '') +{ + ?> + + + + + + + + ❓ <?= $id ?> + + + '; echo 'Edit current CSS'; - echo '
'; - echo ''; + echo ''; + echo ''; + echo ''; echo ''; echo '
'; echo ''; @@ -910,12 +933,64 @@ public function nav($app) +
+ Duplicate Table +

If you want to save versions of your work.

+ +
+ + + + + + +
+ +
+ +
+

Display

+
+ Update favicon +
+ + +
+
+
+ Change desktop background color +
+ + + + +
+
+
+ bdd->query($table); - $req->closeCursor(); + $req = $this->bdd->query($alter); return 'tablecreated'; } else { @@ -423,6 +423,26 @@ class App + public function tableduplicate($dbname, $arttable, $tablename) + { + $arttable = strip_tags($arttable); + $tablename = str_clean($tablename); + if($this->tableexist($dbname, $arttable) && !$this->tableexist($dbname, $tablename)) { + $duplicate = " CREATE TABLE `$tablename` LIKE `$arttable`;"; + $alter = "ALTER TABLE `$tablename` ADD PRIMARY KEY (`id`);"; + $insert = "INSERT `$tablename` SELECT * FROM `$arttable`;"; + + + $req = $this->bdd->query($duplicate . $alter . $insert); + + return 'tableduplicated'; + } else { + return 'tablealreadyexist'; + } + } + + + // __________________________________________ M E D ________________________________________________________ diff --git a/class/class.w.config.php b/class/class.w.config.php index 839bf77..1d5f7b5 100644 --- a/class/class.w.config.php +++ b/class/class.w.config.php @@ -15,6 +15,7 @@ class Config private $invite; private $read; private $cssread; + private $color4; // _______________________________________ F U N _______________________________________ @@ -99,6 +100,11 @@ class Config return $this->cssread; } + public function color4() + { + return $this->color4; + } + // __________________________________________ S E T ______________________________________ @@ -158,6 +164,13 @@ class Config $this->cssread = strip_tags($cssread); } + public function setcolor4($color4) + { + if(strlen($color4) <= 8) { + $this->color4 = $color4; + } + } + } -- cgit v1.2.3