]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 26 Sep 2012 12:13:50 +0000 (12:13 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 26 Sep 2012 12:13:50 +0000 (12:13 +0000)
inc/commons/class.common.tools.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Util/html5/class.ws.html5.links.php

index 9ce572d3c019c519cc8c318e77cb9144c8a3b3c5..db507d66770efb561c7848befbca434ea45263a5 100644 (file)
@@ -393,6 +393,56 @@ class commonTools {
                return $res;
        }
 
+       public static function secureSWF() {
+               global $core;
+               commonDroits::min(1);
+
+               if (isset($_FILES) && isset($_FILES["file"])) {
+
+                       $tmp = cubeFiles::tempdir();
+                       if (!file_exists($tmp)) {
+                               mkdir($tmp, 0777, true);
+                       }
+
+                       $t = $_FILES['file']['tmp_name'];
+                       move_uploaded_file($t, $t . '.swf');
+
+                       $secure = new cubeCommandLine('secureSWF');
+                       $secure->setPath(CONVERTER_PATH);
+                       $secure->setArg(null, $t . '.swf');
+                       $secure->setArg(null, $tmp);
+
+                       $secure->execute();
+                       //fb($secure->commande);
+                       //fb($secure->output);
+
+                       $e = explode(DIRECTORY_SEPARATOR, $t);
+
+                       $result = $tmp . '/' . array_pop($e) . '.swf';
+                       cubeHTTP::downloadFile($result, $_FILES['file']['name']);
+
+                       `rm -rf $tmp`;
+                       unlink($t . '.swf');
+               }
+
+
+               $res = commonPage::barre();
+               $res .= commonPage::tMain();
+               $res .= commonPage::bh();
+               $res.='<form action="" method="post" class="notajax" enctype="multipart/form-data">';
+               $res.='<table class="liste">';
+               $res.='<tr><th><strong>' . __('Sécuriser un SWF') . '</strong></th></tr>';
+               $res.='<tr><td>' . __('Veuillez charger le fichier flash') . '</td></tr>';
+               $res.='<tr class="odd"><td><input type="file" name="file" /></td></tr>';
+               $res.='<tr><td class="right"><a href="#" class="submit">' . $core->typo->BoutonOK(__('Sécuriser le flash')) . '</a></td></td>';
+               $res.='</table>';
+               $res.='</form>';
+               $res .= '</div>';
+               $res .= commonPage::bf();
+               $res .= commonPage::bMain();
+               return $res;
+       }
+
        public static function csr() {
                commonDroits::min(1);
                global $core;
@@ -460,7 +510,7 @@ class commonTools {
                $zip->setArg('X');
                $zip->setArg(null, '.');
                $zip->execute();
-               
+
                cubeHTTP::downloadFile($tmpfile, 'csr.zip');
        }
 
index 5dcb054572912b3c5229c6ed7bfa8069f336871e..95bca2d50a9ccbb6c7c7356333f847aa36c76eeb 100644 (file)
@@ -83,15 +83,22 @@ class wsBookParametres extends wsParametres {
                $this->fields['extraYSpace'] = array('type' => 'integer', 'default' => '0', 'editable' => true, 'label' => __('Marge supplémentaire verticale'), 'grade' => 3);\r
                $this->fields['centerBook'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Centrer la publication sur les couvertures'), 'grade' => 2);\r
                $this->forms['3d_mode'] = array('label' => __('Options de visualisation'),\r
-                       'fieldsnames' => array('visualisationMode','antialiasReading', 'pagesBaseAngle', 'centerBook', '|', 'extraXSpace', 'extraYSpace', '|', 'viewMode'));\r
+                       'fieldsnames' => array('visualisationMode', 'antialiasReading', 'pagesBaseAngle', 'centerBook', '|', 'extraXSpace', 'extraYSpace', '|', 'viewMode'));\r
 \r
 \r
                $this->fields['bookmark'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer les marques-pages'));\r
                $this->fields['fullscreen'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer le mode plein-écran'));\r
-               $this->fields['help'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Activer l'aide"));\r
                $this->fields['navOrder'] = array('type' => 'textarea', 'default' => 'index, chapters, print, friend, bookmark, pdf, archives, basket, fullscreen, sound, 3d, help', 'editable' => true, 'label' => __('Ordre des icônes dans la nav'), 'grade' => 5);\r
                $this->forms['general'] = array('label' => __('Fonctionnalités générales'),\r
                        'fieldsnames' => array('bookmark', 'fullscreen', 'help', 'navOrder', 'pages', 'width', 'height'));\r
+               //.\r
+               //\r
+               \r
+               $this->fields['help'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Activer l'aide"));\r
+               $this->fields['helpStartup'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Afficher l'aide au démarrage"));\r
+               $this->fields['helpStartupTime'] = array('type' => 'integer', 'default' => 15, 'editable' => true, 'label' => __("Temps d'affichage en secondes"));\r
+               $this->forms['help'] = array('label' => __('Aide'),\r
+                       'fieldsnames' => array('help', '|', 'helpStartup', 'helpStartupTime'));\r
                // .\r
                //              \r
                $this->fields['indexAutoScroll'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Activer le scroll automatique'));\r
index 250d9d3df821c9dcba7eb8db47b9509af590665a..44a551749bdab4042d45f92508ff742c800921ac 100644 (file)
@@ -78,7 +78,11 @@ class wsHTML5Link {
        }
 
        public function getHTMLContainer() {
-               return '<div class="link" id="l_' . $this->id . '">' . $this->getHTMLContent() . '</div>';
+               return '<div class="' . $this->getHTMLContainerClass() . '" id="l_' . $this->id . '">' . $this->getHTMLContent() . '</div>';
+       }
+
+       public function getHTMLContainerClass() {
+               return 'link';
        }
 
        public function getHTMLContent() {
@@ -98,12 +102,12 @@ class wsHTML5Link {
        }
 
        public function getCSSContainer() {
-               
-               if($this->page%2==1){
+
+               if ($this->page % 2 == 1) {
                        $this->page--;
                        $this->left+=$this->compiler->width;
                }
-               
+
                $css = '#l_' . $this->id . '{';
                $css.='left:' . $this->left * $this->compiler->getCssScale() . 'px;top:' . $this->top * $this->compiler->getCssScale() . 'px;';
                $css.='width:' . $this->width * $this->compiler->getCssScale() . 'px;height:' . $this->height * $this->compiler->getCssScale() . 'px;';
@@ -161,7 +165,11 @@ class normalLink extends wsHTML5Link {
 }
 
 class contentLink extends wsHTML5Link {
-       
+
+       public function getHTMLContainerClass() {
+               return 'link contentLink';
+       }
+
 }
 
 class webLink extends normalLink {
@@ -301,9 +309,11 @@ class actionLink extends internalLink {
 }
 
 class basketLink extends contentLink {
+
        public function getCSS() {
                return 'background-color:#fff;';
        }
+
 }
 
 class colorLink extends contentLink {
@@ -348,6 +358,7 @@ class multimediaLink extends wsHTML5Link {
                $alt = $this->alternative == '' ? '' : '<img src="' . wsHTML5Link::getUniversalLocation($this->alternative) . '" width="' . $w . '" height="' . $h . '" />';
                return $alt;
        }
+
 }
 
 class webVideoPopupLink extends videoPopupLink {