\r
RewriteRule ^ajax/supprimeFichier/([0-9]+)/(.*)$ index.php/ajax/supprimeFichier/$1/$2 [L]\r
RewriteRule ^telecharger/([0-9]+)/(.*)$ index.php/telecharger/$1/$2 [L]\r
-RewriteRule ^([-_a-zA-Z0-9/]+)$ index.php/$1 [L]
\ No newline at end of file
+RewriteRule ^([-_a-zA-Z0-9/]+)$ index.php/$1 [L]\r
+\r
+RewriteRule ^viewer/([0-9]+)_([0-9a-fA-F]+)_([0-9]+)/(.+)$ fluidbook/books/final/$1/$4 [L]
\ No newline at end of file
global $core;\r
global $css;\r
global $js;\r
+ global $standard;\r
+\r
$args = cubePage::getArgs($args);\r
\r
$e = explode('_', $args[0]);\r
- if (count($e) == 2) {\r
- $e[] = TIME;\r
- http::redirect(SITE_PATH . '/viewer/' . implode('_', $e));\r
+ if (count($e) == 2 || $e[2] < TIME-10) {\r
+ $e[2] = TIME;\r
+ http::redirect(SITE_PATH . 'viewer/' . implode('_', $e) . '/');\r
exit;\r
}\r
\r
http::head(401);\r
exit;\r
}\r
+\r
+ if (!$dao->isUpToDate($e[0])) {\r
+ $dao->compile($e[0]);\r
+ $dao->touchCompile($e[0]);\r
+ }\r
+\r
+ $webcompile = WEBROOT . '/fluidbook/compile/';\r
+\r
+ $standard = 'XHTML 1.0 Transitional';\r
+ $css[] = $webcompile . '/style.css';\r
+ cubePage::swfaddress();\r
+\r
+ //$fv = array('base' => WEBROOT . '/fluidbook/books/final/' . $e[0]);\r
+ $fv = array();\r
+\r
+ $res = '<html>';\r
+ $res .= '<head>';\r
+ $res .= '<title>' . $book->nom . '</title>';\r
+ $res .= '</head>';\r
+ $res .= '<body>';\r
+ $res .= cubeMedia::flash2('index.swf', '100%', '100%', $fv, 'fluidbook', '', 10, '#ffffff', '', true);\r
+ $res .= '</body>';\r
+ $res .= '</html>';\r
+\r
+ echo $res;\r
}\r
\r
public static function statsxls($args)\r
public function isUpToDate($book_id)\r
{\r
$r = $this->con->select('SELECT changedate,compiledate FROM books WHERE book_id=\'' . $this->con->escape($book_id) . '\'');\r
- return $r->compiledate > $r->updatedate;\r
+ return $r->compiledate > $r->changedate;\r
}\r
\r
public function setComposition($book_id, $pages)\r
<?php\r
require_once(dirname(__FILE__) . '/inc/prepend.php');\r
ob_start();\r
-echo $core->url->getDocument();\r
-$buffer = ob_get_contents();\r
-\r
-ob_clean();\r
\r
$js[] = JS_PATH . '/common.js';\r
$js[] = JS_PATH . '/' . MODE . '.js';\r
$jsvar['IMG'] = IMG;\r
$jsvar['SITE_PATH'] = SITE_PATH;\r
$css[] = CSS_PATH . '/style.css';\r
+$standard='XHTML 1.0 Strict';\r
+\r
+echo $core->url->getDocument();\r
+$buffer = ob_get_contents();\r
+\r
+ob_clean();\r
+\r
// $css['IE'] = CSS_PATH . '/ie.css';\r
-echo cubePage::page($buffer, $js, $jsvar, $css, array(), 6);\r
+echo cubePage::page($buffer, $js, $jsvar, $css, array(), 6,false,array(),array(),$standard);\r
fb($core->debug());\r
\r
?>
\ No newline at end of file