$daoTheme = new wsDAOTheme($core->con);\r
$theme = $daoTheme->getThemeOfBook(2963);\r
\r
- $flex = new cubeFlexCompiler('FluidbookDatas', ROOT . '/books/datasCompiler/test', 'flash.display.Sprite', explode(';', AS3_SOURCES),MXMLC_PATH);\r
+ $flex = new cubeFlexCompiler('FluidbookDatas', ROOT . '/books/datasCompiler/test', 'flash.display.Sprite', explode(';', AS3_SOURCES), MXMLC_PATH);\r
$flex->addVariable('links', $book->links);\r
$flex->addVariable('datas', $book->parametres->toStandardObject());\r
$flex->addVariable('traductions', wsLang::getTraductionWithId($book->traductions));\r
foreach($pages as $i => $infos) {\r
$flex->addBitmap(ROOT . '/docs/' . $infos['document_id'] . '/p' . $infos['document_page'] . '.jpg', 'thumb' . $i);\r
}\r
+ $themeRoot = ROOT . '/themes/' . $theme->theme_id . '/';\r
+ if ($theme->parametres->useBackgroundImage) {\r
+ $flex->addBitmap($themeRoot . $theme->parametres->backgroundImage, 'background');\r
+ }\r
+ if ($theme->parametres->useMenuImage) {\r
+ $flex->addBitmap($themeRoot . $theme->parametres->menuImage, 'menu');\r
+ }\r
+ $flex->addBitmap($themeRoot . $theme->parametres->logo, 'logo');\r
\r
ob_clean();\r
$flex->compile();\r
$value = intval($value);\r
}\r
break;\r
+ case 'file':\r
+ $e = explode('/', $value);\r
+ $value = array_pop($e);\r
+ break;\r
default:\r
$value = (string)$value;\r
break;\r
}\r
}\r
\r
- public function toStandardObject(){\r
- $res=new stdClass();\r
- foreach($this as $k=>$v){\r
- $res->$k=$v;\r
+ public function toStandardObject()\r
+ {\r
+ $res = new stdClass();\r
+ foreach($this as $k => $v) {\r
+ $res->$k = $v;\r
}\r
return $res;\r
}\r