]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 8 Dec 2010 18:54:28 +0000 (18:54 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 8 Dec 2010 18:54:28 +0000 (18:54 +0000)
.htaccess
inc/ws/Controlleur/class.ws.url.php
inc/ws/DAO/class.ws.dao.book.php
index.php

index 094a14aa962f9bc8c68b3cd14d75f44f703262e2..4335daaf99ac7eb9828f2c05c698edb4835f4720 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -24,4 +24,6 @@ RewriteRule ^docs - [L]
 \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
index 07fa6291910024bdaeaa0fc130c28cc10bab0375..e78dfb5a95f78c0c6ec122a2f39dd45976823a3c 100644 (file)
@@ -124,12 +124,14 @@ html{height:100%}' . "\n";
                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
@@ -139,6 +141,31 @@ html{height:100%}' . "\n";
                        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
index f298cb4b509fbee36ac152478ff95cf31fd54709..dbccf1ff6a0128bee210ba338e55193d76b06d08 100644 (file)
@@ -360,7 +360,7 @@ class wsDAOBook extends extranetDAO {
        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
index 410ff046da7439af6f8eeaed0b50957d3f9347f5..cb262771265b537ad2c42b7091960526643cb6b7 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,18 +1,21 @@
 <?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