// Check protection hash\r
$hash = md5(substr($this->args['fromemail'], 2, 6) . substr($this->args['email'], 3, 5) . 'SFGHF566!S' . $this->args['id']);\r
if ($hash != $this->args['hash']) {\r
+ $this->xml->addChild('hashOK', '0');\r
$this->xml->addChild('ok', '0');\r
return;\r
+ } else {\r
+ $this->xml->addChild('hashOK', '1');\r
}\r
// Send the email\r
$mail = new cubeMail();\r
$index = '';\r
$textes = '';\r
\r
+ $hash = $book_id;\r
+ $hash .= 'kjgl!az4.';\r
+ $hash .= count($pages);\r
+ $hash .= round($size[0]);\r
+ $hash = sha1($hash);\r
+\r
$this->makeTextsIndexes($book_id, $index, $textes);\r
$daoDoc->getLinksAndRulers($book_id, $links, $rulers);\r
\r
$flex->addFont(FONT_PATH . '/' . $lang->font, 'GeneralFont', $lang->charset);\r
$flex->addFont(FONT_PATH . '/FluidbookCredits.ttf', 'CreditsFont', 'ASCII');\r
$flexLight->addFont(FONT_PATH . '/FluidbookLoader.ttf', 'LoaderFont', 'Numerals');\r
+ $flexLight->addVariable('checksum', $hash, false, true, 'String');\r
$res .= $flex->compile() . "\n\n-------------------\n\n";\r
$flexLight->addVariable('datasSize', filesize($compilerDir . '/FluidbookDatas.swf'));\r
$res .= $flexLight->compile();\r