]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 2 Apr 2010 10:17:28 +0000 (10:17 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 2 Apr 2010 10:17:28 +0000 (10:17 +0000)
inc/ws/Controlleur/class.ws.flash.php
swf/_src/wsComposer.fla

index e7ebd2f40735d9da6f66e31eb501c5cb72c6625a..bff99cc33e6daddf587412d7f0cf2bef6feae917 100644 (file)
@@ -128,7 +128,11 @@ class wsFlash extends cubeFlashGateway {
        {\r
                global $core;\r
                $dao = new wsDAOTheme($core->con);\r
-               $theme = $dao->getThemeOfBook($this->args['book_id']);\r
+               if (isset($this->args['theme_id'])) {\r
+                       $theme = $dao->selectById($this->args['theme_id']);\r
+               } else {\r
+                       $theme = $dao->getThemeOfBook($this->args['book_id']);\r
+               }\r
 \r
                $this->_themeToXML($theme);\r
        }\r
@@ -139,10 +143,17 @@ class wsFlash extends cubeFlashGateway {
                $dao = new wsDAOTheme($core->con);\r
                $themes = $dao->getAllThemes();\r
                foreach($themes as $theme) {\r
-                       $this->_themeToXML($theme);\r
+                       $t = $this->xml->addChild('theme');\r
+                       $t->addAttribute('id', $theme->theme_id);\r
+                       $t->addAttribute('nom', $theme->nom);\r
                }\r
        }\r
 \r
+       public function postThemeShot()\r
+       {\r
+               file_put_contents(ROOT . '/themes/' . $this->args['theme_id'] . '.jpg', base64_decode($this->args['data']));\r
+       }\r
+\r
        public function getAllIcones()\r
        {\r
                global $core;\r
@@ -152,7 +163,7 @@ class wsFlash extends cubeFlashGateway {
                        $i = $this->xml->addChild('icone');\r
                        $i->addAttribute('id', $icone->icone_id);\r
                        $i->addAttribute('nom', $icone->nom);\r
-                       $i->addAttribute('path', ICONS  . $icone->icone_id . '.png');\r
+                       $i->addAttribute('path', ICONS . $icone->icone_id . '.png');\r
                }\r
        }\r
 \r
index 1d92c219db055179c703ca46a2d72ef996b6d82b..441e120c47440933fb60e757613f3c81ca7fd592 100644 (file)
Binary files a/swf/_src/wsComposer.fla and b/swf/_src/wsComposer.fla differ