From: vincent@cubedesigners.com Date: Thu, 16 Sep 2010 08:18:25 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5600d7941b01a31246e2fe3545c13c7cb8ffad29;p=cubeextranet.git --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 60aa55c19..14edad776 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -474,7 +474,7 @@ class wsDAOBook extends extranetDAO { $flex->addVariable('traductions', wsLang::getTraductionWithId($book->traductions)); $flex->addVariable('chapters', $book->chapters); $flex->addVariable('extras', '' . $book->extras . '', false, true, 'XML'); - $flex->addVariable('numerotation', $book->numerotation); + $flex->addVariable('numerotation', $book->numerotation, false, true, 'String'); $flexLight->addVariable('theme', $theme->parametres->toStandardObject()); $flexLight->addVariable('pages', count($pages)); $flexLight->addVariable('fwidth', $size[0], false, true, 'Number'); @@ -483,19 +483,24 @@ class wsDAOBook extends extranetDAO { $flex->addVariable('index', $index); $flex->addVariable('textes', $textes); foreach($pages as $i => $infos) { + $swffile = ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf'; if ($i == 1) { $flexLight->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb1'); + $flexLight->addVariable('size_p_' . $i, filesize($swffile), false, true, 'Number'); } else { $flex->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb' . $i); + $flex->addVariable('size_p_' . $i, filesize($swffile), false, true, 'Number'); } } if ($complete) { foreach($pages as $i => $infos) { + $swffile = ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf'; if ($i == 1) { - $flexLight->addSWF(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf', 'page' . $i); + $flexLight->addSWF($swffile, 'page' . $i); + } else { - $flex->addSWF(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.swf', 'page' . $i); + $flex->addSWF($swffile, 'page' . $i); } } } @@ -520,8 +525,9 @@ class wsDAOBook extends extranetDAO { $flex->addFont(FONT_PATH . '/FFFATLAN_0.TTF', 'CreditsFont', 'ASCII'); $flex->addFont(FONT_PATH . '/DIN Medium_0.ttf', 'GeneralFont', 'Latin'); $flexLight->addFont(FONT_PATH . '/DIN Medium_0.ttf', 'GeneralFont', 'Numerals'); - $res .= $flexLight->compile() . "\n\n-------------------\n\n"; - $res .= $flex->compile(); + $res .= $flex->compile() . "\n\n-------------------\n\n"; + $flexLight->addVariable('datasSize', filesize(ROOT . '/books/datasCompiler/' . $book_id . '/FluidbookDatas.swf')); + $res .= $flexLight->compile(); // $flex->clean(); // $flexLight->clean(); return $res;