]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 16 Sep 2010 08:18:25 +0000 (08:18 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 16 Sep 2010 08:18:25 +0000 (08:18 +0000)
inc/ws/DAO/class.ws.dao.book.php

index 60aa55c1997a3f4bc63cd279ff4d18664c2e6da9..14edad77625c0c95b49b4acae5d49cd8d38bdf83 100644 (file)
@@ -474,7 +474,7 @@ class wsDAOBook extends extranetDAO {
                $flex->addVariable('traductions', wsLang::getTraductionWithId($book->traductions));\r
                $flex->addVariable('chapters', $book->chapters);\r
                $flex->addVariable('extras', '<extras>' . $book->extras . '</extras>', false, true, 'XML');\r
-               $flex->addVariable('numerotation', $book->numerotation);\r
+               $flex->addVariable('numerotation', $book->numerotation, false, true, 'String');\r
                $flexLight->addVariable('theme', $theme->parametres->toStandardObject());\r
                $flexLight->addVariable('pages', count($pages));\r
                $flexLight->addVariable('fwidth', $size[0], false, true, 'Number');\r
@@ -483,19 +483,24 @@ class wsDAOBook extends extranetDAO {
                $flex->addVariable('index', $index);\r
                $flex->addVariable('textes', $textes);\r
                foreach($pages as $i => $infos) {\r
+                       $swffile = ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf';\r
                        if ($i == 1) {\r
                                $flexLight->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb1');\r
+                               $flexLight->addVariable('size_p_' . $i, filesize($swffile), false, true, 'Number');\r
                        } else {\r
                                $flex->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb' . $i);\r
+                               $flex->addVariable('size_p_' . $i, filesize($swffile), false, true, 'Number');\r
                        }\r
                }\r
 \r
                if ($complete) {\r
                        foreach($pages as $i => $infos) {\r
+                               $swffile = ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf';\r
                                if ($i == 1) {\r
-                                       $flexLight->addSWF(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf', 'page' . $i);\r
+                                       $flexLight->addSWF($swffile, 'page' . $i);\r
+\r
                                } else {\r
-                                       $flex->addSWF(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf', 'page' . $i);\r
+                                       $flex->addSWF($swffile, 'page' . $i);\r
                                }\r
                        }\r
                }\r
@@ -520,8 +525,9 @@ class wsDAOBook extends extranetDAO {
                $flex->addFont(FONT_PATH . '/FFFATLAN_0.TTF', 'CreditsFont', 'ASCII');\r
                $flex->addFont(FONT_PATH . '/DIN Medium_0.ttf', 'GeneralFont', 'Latin');\r
                $flexLight->addFont(FONT_PATH . '/DIN Medium_0.ttf', 'GeneralFont', 'Numerals');\r
-               $res .= $flexLight->compile() . "\n\n-------------------\n\n";\r
-               $res .= $flex->compile();\r
+               $res .= $flex->compile() . "\n\n-------------------\n\n";\r
+               $flexLight->addVariable('datasSize', filesize(ROOT . '/books/datasCompiler/' . $book_id . '/FluidbookDatas.swf'));\r
+               $res .= $flexLight->compile();\r
                // $flex->clean();\r
                // $flexLight->clean();\r
                return $res;\r