[Settings]\r
-LastUsedSwfDir = C:\Users\Vincent\r
+LastUsedSwfDir = H:\Works\fluidbook3d\r
LastUsedOutputDir = C:\Users\Vincent\r
LastUsedDeobfuscationDir = C:\Users\Vincent\r
LastUsedLoaderDir = C:\Users\Vincent\r
LastUsedProjectDir = H:\Works\cubeExtranet\fluidbook\compile\_protect\r
LastUsedLibraryDir = C:\Users\Vincent\r
-RecentProjects = H:\Works\cubeExtranet\fluidbook\compile\_protect\fluidbook.sspj
\ No newline at end of file
+RecentProjects = H:\Works\cubeExtranet\fluidbook\compile\_protect\offline.sspj;H:\Works\cubeExtranet\fluidbook\compile\_protect\fluidbook.sspj
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.7.0_03" class="java.beans.XMLDecoder">
+<java version="1.8.0_31" class="java.beans.XMLDecoder">
<object class="secureSWF.userSettings.GuiSettings">
<void property="adtPath">
<string></string>
<void class="java.awt.Point" method="getField">
<string>x</string>
<void method="set">
- <object idref="Point0">
- <void class="java.awt.Point" method="getField">
- <string>y</string>
- <void method="set">
- <object idref="Point0"/>
- <int>-8</int>
- </void>
- </void>
- </object>
+ <object idref="Point0"/>
+ <int>-8</int>
+ </void>
+ </void>
+ <void class="java.awt.Point" method="getField">
+ <string>y</string>
+ <void method="set">
+ <object idref="Point0"/>
<int>-8</int>
</void>
</void>
<void class="java.awt.Dimension" method="getField">
<string>width</string>
<void method="set">
- <object idref="Dimension0">
- <void class="java.awt.Dimension" method="getField">
- <string>height</string>
- <void method="set">
- <object idref="Dimension0"/>
- <int>1036</int>
- </void>
- </void>
- </object>
+ <object idref="Dimension0"/>
<int>1696</int>
</void>
</void>
+ <void class="java.awt.Dimension" method="getField">
+ <string>height</string>
+ <void method="set">
+ <object idref="Dimension0"/>
+ <int>1036</int>
+ </void>
+ </void>
</object>
</void>
</object>
<!DOCTYPE html>
<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta http-equiv="Cache-Control" content="max-age=0">
- <meta http-equiv="Cache-Control" content="no-cache">
- <meta http-equiv="Expires" content="0">
- <meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
- <meta http-equiv="Pragma" content="no-cache">
- <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8">
- <meta name="google" value="notranslate">
- $favicon
- $robots
- $facebook
- $description
- $keywords
- <title>$title</title>
- <link href="$spstyle.css?junk=$junk" rel="stylesheet" type="text/css">
- <style type="text/css" media="print">*{ visibility: hidden; display: none }</style>
- <script type="text/javascript">
- FB_DEFAULT_LANG = '$lang';
- var backgroundColor = "$bgcolor";
- function redirect() {
- if (isMobile() || $alwaysHTML5) {
- $redirectMobile
- } else if (isBadMobile()) {
- $redirectPDF
- } else {
- document.getElementById('fluidbook').style.opacity = 1;
- swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion", "", getFlashvars($junk, $fv), {"allowScriptAccess": "always", "quality": "high", "scale": "noscale", "wmode": getWmode(), "allowFullScreen": "true", 'allowFullScreenInteractive': 'true'}, {"bgcolor": "#" + getBackgroundColor()});
- }
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Cache-Control" content="max-age=0">
+ <meta http-equiv="Cache-Control" content="no-cache">
+ <meta http-equiv="Expires" content="0">
+ <meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
+ <meta http-equiv="Pragma" content="no-cache">
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8">
+ <meta name="google" value="notranslate">
+ $favicon
+ $robots
+ $facebook
+ $description
+ $keywords
+ <title>$title</title>
+ <link href="$spstyle.css?junk=$junk" rel="stylesheet" type="text/css">
+ <style type="text/css" media="print">* {
+ visibility: hidden;
+ display: none
+ }</style>
+ <script type="text/javascript">
+ FB_DEFAULT_LANG = '$lang';
+ var backgroundColor = "$bgcolor";
+ function redirect() {
+ if (isMobile() || $alwaysHTML5) {
+ $redirectMobile
+ } else if (isBadMobile()) {
+ $redirectPDF
+ } else {
+ document.getElementById('fluidbook').style.opacity = 1;
+ swfobject.embedSWF("$pathToIndex?junk=$junk", "fluidbook", "100%", "100%", "$flashversion", "", getFlashvars($junk, $fv), {
+ "allowScriptAccess": "always",
+ "quality": "high",
+ "scale": "noscale",
+ "wmode": getWmode(),
+ "allowFullScreen": "true",
+ "allowNetworking": "$allowNetworking",
+ 'allowFullScreenInteractive': 'true'
+ }, {"bgcolor": "#" + getBackgroundColor()});
}
- </script>
- <script type="text/javascript" src="$spfluidbook.js?junk=$junk"></script>
- $ga
- $redirectScript
- </head>
- <body onload="ready();">
- <div id="fluidbook" style="opacity:0;">
- <div style="padding:20px;text-align:center;"><a class="getflash" href="http://get.adobe.com/flashplayer/" target="_blank" style="background-image:url('$pathToGetflash');"></a></div>
- <div style="padding:20px;">$alt</div>
- </div>
- </body>
+ }
+ </script>
+ <script type="text/javascript" src="$spfluidbook.js?junk=$junk"></script>
+ $ga
+ $redirectScript
+</head>
+<body onload="ready();">
+<div id="fluidbook" style="opacity:0;">
+ <div style="padding:20px;text-align:center;"><a class="getflash" href="http://get.adobe.com/flashplayer/"
+ target="_blank"
+ style="background-image:url('$pathToGetflash');"></a></div>
+ <div style="padding:20px;">$alt</div>
+</div>
+</body>
</html>
\ No newline at end of file
public static function saveClient($args, &$x) {
global $core;
$dao = new commonDAOEntreprise($core->con);
-// Creation de l'entreprise
+ // Creation de l'entreprise
if ($_POST['entreprise_id'] == 'new') {
if (!isset($_POST['ws_admin']) || !$_POST['ws_admin']) {
$_POST['ws_admin'] = $core->user->utilisateur_id;
$_POST['ws_admin'] = $core->user->utilisateur_id;
}
$entreprise = $dao->sauve($_POST);
-// Si c'est une nouvelle entreprise, on crée également le contact
+ // Si c'est une nouvelle entreprise, on crée également le contact
if ($_POST['entreprise_id'] == 'new') {
$data = $_POST['contact'];
$data['entreprise'] = $entreprise->entreprise_id;
if (!self::valideDemandeDevis($x)) {
return;
}
-// L'utilisateur est-il déjà dans la base ?
+ // L'utilisateur est-il déjà dans la base ?
$daoUtilisateur = new commonDAOUtilisateur($core->con);
$utilisateur = $daoUtilisateur->selectByEmail($_POST['email']);
if ($utilisateur != null) {
$utilisateur_id = $utilisateur->utilisateur_id;
} else {
-// Création de l'entreprise
+ // Création de l'entreprise
$daoEntreprise = new commonDAOEntreprise($core->con);
$datas = array();
$datas['entreprise_id'] = 'new';
$datas['ws_grade'] = 1;
$datas['ws_admin'] = 1;
$entreprise = $daoEntreprise->sauve($datas);
-// Création de l'utilisateur
+ // Création de l'utilisateur
$datas = array();
$datas['utilisateur_id'] = 'new';
$datas['prenom'] = $_POST['prenom'];
$daoDemande->sauve($datas);
$fields = array('prenom' => 'Prenom',
- 'nom' => 'Nom',
- 'email' => 'E-mail',
- 'telephone' => 'Telephone',
- 'rs' => 'Société',
- 'site' => 'Site web',
- 'adresse' => 'Adresse',
- 'code_postal' => 'Code postal',
- 'ville' => 'Ville',
- 'pays' => 'Pays',
- 'produits' => 'Type',
- 'lang' => 'Langue du visiteur',
- 'nombre_liens' => 'Liens',
- 'nombre_pages' => 'Pages',
- 'nombre_langues' => 'Langues',
- 'detail' => 'Commentaires');
+ 'nom' => 'Nom',
+ 'email' => 'E-mail',
+ 'telephone' => 'Telephone',
+ 'rs' => 'Société',
+ 'site' => 'Site web',
+ 'adresse' => 'Adresse',
+ 'code_postal' => 'Code postal',
+ 'ville' => 'Ville',
+ 'pays' => 'Pays',
+ 'produits' => 'Type',
+ 'lang' => 'Langue du visiteur',
+ 'nombre_liens' => 'Liens',
+ 'nombre_pages' => 'Pages',
+ 'nombre_langues' => 'Langues',
+ 'detail' => 'Commentaires');
$mail = new cubeMail();
$mail->charset = 'UTF-8';
$mail->from = $_POST['prenom'] . ' ' . $_POST['nom'] . '<' . $_POST['email'] . '>';
$_POST['site'] = $_POST['site_internet'];
}
file_put_contents(ROOT . '/cache/demandeDevis.txt', print_r($_POST, true));
-// Validation des champs de formulaires
+ // Validation des champs de formulaires
$ok = true;
return $ok;
}
} elseif ($demande->status > 1) {
$res = __("Cette demande est actuellement en cours de traitement");
} else {
-// On place la demande comme en cours d'édition
+ // On place la demande comme en cours d'édition
$dao->setAdministrateur($demande->demande_id, $core->user->utilisateur_id);
-// On vérifie que l'utilisateur n'est pas déjà géré par un revendeur
+ // On vérifie que l'utilisateur n'est pas déjà géré par un revendeur
$demandeur = $daoUtilisateur->selectById($demande->utilisateur, 'utilisateurs_entreprise');
$administrateurs = $daoUtilisateur->selectWSAdministrateursId();
if (!is_null($demandeur->ws_admin) && !in_array($demandeur->ws_admin, $administrateurs)) {
-// Si déjà géré par un revendeur
+ // Si déjà géré par un revendeur
$revendeur = $daoUtilisateur->selectById($demandeur->ws_admin, 'utilisateurs_entreprise');
$actions[__('Je confie la demande à') . ' ' . $revendeur->rs . ' (' . $revendeur->prenom . ' ' . $revendeur->nom . ')'] = $demandeur->ws_admin;
} else {
$rlinks = array();
foreach ($links as $k => $link) {
if ($link['page'] >= $from) {
- $link['page']+=$offset;
+ $link['page'] += $offset;
}
if ($internal && $link['type'] == 5) {
if ($link['numerotation'] == 'physical') {
if ($link['to'] >= $from) {
- $link['to']+=$offset;
+ $link['to'] += $offset;
}
} else {
$ph = array_search($link['to'], $numerotation) + 1;
if ($ph >= $from) {
- $ph+=$offset;
+ $ph += $offset;
$vi = $numerotation[($ph - 1)];
$link['to'] = $vi;
}
$rrulers = array();
foreach ($rulers as $k => $ruler) {
if ($ruler['page'] > $from) {
- $ruler['page']+=$offset;
+ $ruler['page'] += $offset;
}
$rrulers[$k] = $ruler;
}
public static function formExportBook($book_id) {
global $core;
$choices = array(__('Télécharger') => 'download',
- __("Installer sur le serveur d'hébergement") => 'install_hosting',
- __("Installer sur l'espace de références") => 'install_references',
- __('Installer sur un serveur distant') => 'install_ftp',
- __('Envoyer vers un projet Phonegap Android') => 'phonegap_android',
- __('Envoyer vers un projet Phonegap iOS') => 'phonegap_ios'
+ __("Installer sur le serveur d'hébergement") => 'install_hosting',
+ __("Installer sur l'espace de références") => 'install_references',
+ __('Installer sur un serveur distant') => 'install_ftp',
+ __('Envoyer vers un projet Phonegap Android') => 'phonegap_android',
+ __('Envoyer vers un projet Phonegap iOS') => 'phonegap_ios'
);
$formatInstall = array('online' => false,
- 'v1' => false,
- 'html' => false,
- 'v2' => false,
- 'win-exe' => 'zip',
- 'win-ins' => 'exe',
- 'mac-exe' => 'zip',
- 'win-cd' => 'zip',
- 'phonegap' => 'zip');
+ 'v1' => false,
+ 'html' => false,
+ 'v2' => false,
+ 'win-exe' => 'zip',
+ 'win-ins' => 'exe',
+ 'win-html' => 'zip',
+ 'mac-exe' => 'zip',
+ 'win-cd' => 'zip',
+ 'phonegap' => 'zip');
$defaultVersion = isset($_POST['version']) ? $_POST['version'] : 'online';
$version = '<tr><td class="right">' . __('Version') . '</td><td>' . form::combo('version', wsUrl::getFluidbookVersions(true), $defaultVersion) . '</td></tr>';
$datas = json_decode($book->exportdatas, true);
}
- $res.=$version;
+ $res .= $version;
if (!isset($datas[$defaultAction][$defaultVersion])) {
$datas[$defaultAction][$defaultVersion] = array('dir' => '', 'file' => '');
$res .= '<tr><td class="right"><em>' . $s . '</em></td><td>' . form::field(array('destination[dir]', 'destination'), 50, 128, $defaultDestination['dir']) . ' / ' . $destinationFile . '</td></tr>';
} else {
- $res.=$version;
+ $res .= $version;
}
$res .= '<tr><td colspan="2" class="right">' . form::hidden('changed', '') . '<a href="#" class="submit">' . $core->typo->BoutonOK(__('Exporter')) . '</a></td></tr>';
$env = Zend_Mobile_Push_Apns::SERVER_SANDBOX_URI;
-// Notifications
+ // Notifications
$apns = new Zend_Mobile_Push_Apns();
if ($env == Zend_Mobile_Push_Apns::SERVER_SANDBOX_URI) {
$versions['win-ins'] = array('title' => __('Version offline') . ' - ' . __('Installeur Auto-executable Windows'), 'icon' => cubeMedia::silk('application_view_tile.png'));
$versions['mac-exe'] = array('title' => __('Version offline') . ' - ' . __('Exécutable Mac OS X'), 'icon' => cubeMedia::image(IMG . '/macos.png'));
$versions['win-cd'] = array('title' => __('Version offline') . ' - ' . __('CD-ROM') . ' / ' . __('Clé USB'), 'icon' => cubeMedia::silk('cd.png'));
+ $versions['win-html'] = array('title' => __('Version offline') . ' - ' . __('HTML'), 'icon' => cubeMedia::silk('cd.png'));
if ($droits->admin) {
$versions['phonegap'] = array('title' => __('Version offline') . ' - ' . __('Application mobile'), 'icon' => cubeMedia::image(IMG . '/phonegap.png'));
}
<?php\r
+\r
class wsSecureSWF {\r
public static $files = array('index.swf', 'player.swf');\r
public static $configOriginal;\r
public static $protected;\r
public static $unprotected;\r
\r
- public static function checkProtectedSWF()\r
- {\r
+ public static function _checkProtectedSWF($type) {\r
+ if ($type == 'offline') {\r
+ self::$files = array('offline.swf');\r
+ } else if ($type == 'fluidbook') {\r
+ self::$files = array('index.swf', 'player.swf');\r
+ }\r
self::$protected = WS_COMPILE_ASSETS . '/';\r
self::$unprotected = WS_COMPILE_ASSETS . '/_unprotected/';\r
- self::$configOriginal = WS_COMPILE_ASSETS . '/_protect/fluidbook.sspj';\r
- self::$configLocal = WS_COMPILE_ASSETS . '/_protect/_fluidbook.sspj';\r
+ self::$configOriginal = WS_COMPILE_ASSETS . '/_protect/' . $type . '.sspj';\r
+ self::$configLocal = WS_COMPILE_ASSETS . '/_protect/_' . $type . '.sspj';\r
\r
$protect = false;\r
-\r
self::checkConfigFile();\r
-\r
$configmtime = filemtime(self::$configLocal);\r
\r
- foreach(self::$files as $f) {\r
+ foreach (self::$files as $f) {\r
$p = self::$protected . '/' . $f;\r
$u = self::$unprotected . '/' . $f;\r
$pfilemtime = filemtime($p);\r
return;\r
}\r
\r
- self::protectFiles();\r
+ self::protectFiles($type);\r
}\r
\r
- public static function checkConfigFile()\r
- {\r
+ public static function checkProtectedSWF() {\r
+ self::_checkProtectedSWF('fluidbook');\r
+ self::_checkProtectedSWF('offline');\r
+ }\r
+\r
+ public static function checkConfigFile() {\r
if (!file_exists(self::$configLocal) || filemtime(self::$configOriginal) > filemtime(self::$configLocal)) {\r
self::updateConfigFile();\r
}\r
}\r
\r
- protected static function updateConfigFile()\r
- {\r
+ protected static function updateConfigFile() {\r
$x = simplexml_load_file(self::$configOriginal);\r
// Remplace les chemins par les chemins des fichiers sur le serveur\r
self::replacePathFiles($x, 'inputFiles', self::$unprotected);\r
self::replacePathFiles($x, 'outputFiles', self::$protected);\r
\r
- foreach($x->xpath("//void[@property='fileFullName']") as $f) {\r
+ foreach ($x->xpath("//void[@property='fileFullName']") as $f) {\r
$fname = trim((string)$f->string);\r
$fname = str_replace('\\', '/', $fname);\r
\r
file_put_contents(self::$configLocal, $x->asXML());\r
}\r
\r
- protected static function replacePathFiles($x, $property, $dir)\r
- {\r
+ protected static function replacePathFiles($x, $property, $dir) {\r
$o1 = $x->xpath("//void[@property='$property']");\r
$o = array_pop($o1);\r
$l = simplexml_load_string('<void property="' . $property . '" />');\r
$a = $l->addChild('array');\r
$a->addAttribute('class', 'java.lang.String');\r
$a->addAttribute('length', count(self::$files));\r
- foreach(self::$files as $k => $f) {\r
+ foreach (self::$files as $k => $f) {\r
$v = $a->addChild('void');\r
$v->addAttribute('index', $k);\r
$s = $v->addChild('string', $dir . $f);\r
cubeXML::replace($o, $l);\r
}\r
\r
- protected static function protectFiles()\r
- {\r
+ protected static function protectFiles($type) {\r
$secureSWF = new cubeCommandLine('secureSWF', null, true);\r
$secureSWF->setSudo();\r
$secureSWF->setPath(CONVERTER_PATH);\r
$secureSWF->setManualArg(self::$protected);\r
$secureSWF->execute();\r
\r
- file_put_contents(WS_COMPILE_ASSETS . '/_protect/secure.log', $secureSWF->commande . "\n\n\n" . $secureSWF->output);\r
+ file_put_contents(WS_COMPILE_ASSETS . '/_protect/secure_' . $type . '.log', $secureSWF->commande . "\n\n\n" . $secureSWF->output);\r
}\r
}\r
-\r
-?>
\ No newline at end of file
$__autoload['wsPackagerWinEXE'] = dirname(__FILE__) . '/class.ws.packager.win.exe.php';\r
$__autoload['wsPackagerWinINST'] = dirname(__FILE__) . '/class.ws.packager.win.inst.php';\r
$__autoload['wsPackagerWinCD'] = dirname(__FILE__) . '/class.ws.packager.win.cd.php';\r
+$__autoload['wsPackagerWinHTML'] = dirname(__FILE__) . '/class.ws.packager.win.html.php';\r
$__autoload['wsPackagerMacEXE'] = dirname(__FILE__) . '/class.ws.packager.mac.exe.php';\r
$__autoload['wsPackagerAIR'] = dirname(__FILE__) . '/class.ws.packager.air.php';\r
$__autoload['wsPackagerV1'] = dirname(__FILE__) . '/class.ws.packager.v1.php';\r
$__autoload['wsPackagerPhonegap'] = dirname(__FILE__) . '/class.ws.packager.phonegap.php';\r
-?>
\ No newline at end of file
protected $origHTML;
protected $_labels = array();
+ protected $_allowNeworking = 'all';
public function __construct($book_id, $vdir = null, $whole = true) {
parent::__construct($book_id, $vdir, $whole);
// Stuffs to replace in html
$toReplace = array('lang' => strtolower($this->book->lang),
- 'ga' => $ga,
- 'facebook' => $facebook,
- 'bgcolor' => $this->theme->parametres->loadingBackColor,
- 'redirectMobile' => $redirectMobile,
- 'redirectPDF' => $redirectPDF,
- 'junk' => TIME,
- 'description' => $description,
- 'robots' => $robots,
- 'favicon' => $favicon,
- 'flashversion' => $this->getMinFlashVersion(),
- 'fv' => json_encode($this->getFlashvars()),
- 'alwaysHTML5' => $alwaysHTML5,
- 'keywords' => $keywords);
-
+ 'ga' => $ga,
+ 'facebook' => $facebook,
+ 'bgcolor' => $this->theme->parametres->loadingBackColor,
+ 'redirectMobile' => $redirectMobile,
+ 'redirectPDF' => $redirectPDF,
+ 'junk' => TIME,
+ 'description' => $description,
+ 'robots' => $robots,
+ 'favicon' => $favicon,
+ 'flashversion' => $this->getMinFlashVersion(),
+ 'fv' => json_encode($this->getFlashvars()),
+ 'alwaysHTML5' => $alwaysHTML5,
+ 'keywords' => $keywords,
+ 'allowNetworking' => $this->_allowNeworking);
$this->origHTML = file_get_contents($this->vdir . '/index.html');
$packager = new wsPackagerMacEXE($book_id);
} elseif ($version == 'v1') {
$packager = new wsPackagerV1($book_id);
+ } elseif ($version == 'win-html') {
+ $packager = new wsPackagerWinHTML($book_id);
} else if ($version == 'phonegap') {
$packager = new wsPackagerPhonegap($book_id);
}
--- /dev/null
+<?php\r
+\r
+class wsPackagerWinHTML extends wsPackagerHTML {\r
+ protected $_allowNeworking = 'internal';\r
+\r
+ protected function copyFluidbookFiles() {\r
+ parent::copyFluidbookFiles();\r
+ unlink($this->vdir . '/index.swf');\r
+ unlink($this->vdir . '/player.swf');\r
+ copy(WS_COMPILE_ASSETS . '/offline.swf', $this->vdir . '/index.swf');\r
+ }\r
+}
\ No newline at end of file