]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 6 Sep 2012 17:42:06 +0000 (17:42 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 6 Sep 2012 17:42:06 +0000 (17:42 +0000)
inc/ws/Controlleur/class.ws.services.php
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Metier/class.ws.theme.parametres.php

index 32db0c7849454c77f74098cbeb80cdc5331bd874..0f4c2376a12422ca3d9ec0f559ad30e4d8c767a6 100644 (file)
@@ -45,8 +45,6 @@ class wsServices extends cubeFlashGateway {
                $query .= '<Trigger type="survey" code="VIRALGORDINI" />';\r
                $query .= '</Alert>';\r
 \r
-               fb($query);\r
-\r
                $datas = array('Emm_Login' => 'Publicis',\r
                        'Emm_Password' => '%K8\'hQi/kr',\r
                        'XmlOutputType' => 'XML',\r
@@ -54,11 +52,7 @@ class wsServices extends cubeFlashGateway {
                        'XmlBatch' => '1',\r
                        'XmlQuery' => $query);\r
 \r
-               fb($datas);\r
-\r
                $http->post('/renault/Shared/WebServices/Ws_LaunchAlert.cfm', $datas);\r
-\r
-               fb($http->getContent());\r
        }\r
 \r
        public function sendEmail() {\r
@@ -286,6 +280,41 @@ class wsServices extends cubeFlashGateway {
                exit;\r
        }\r
 \r
+       public function grdfCoupon() {\r
+               $this->outputXML = false;\r
+               $couponsRoot = WS_BOOKS . '/working/10828/commerce/';\r
+\r
+               $xml = simplexml_load_file($couponsRoot . 'references.xml');\r
+               // Check hash\r
+               $hash = md5('ae' . $_GET['nom'] . '25' . $_GET['ref']);\r
+               if ($hash != $_GET['h']) {\r
+                       exit;\r
+               }\r
+               $refs = explode(',', $_GET['ref']);\r
+               $pdf = new FPDI();\r
+               foreach ($refs as $ref) {\r
+\r
+                       foreach ($xml->xpath('//item[@reference=\'' . $ref . '\']') as $item) {\r
+                               $code = (string) $item['code'];\r
+                       }\r
+\r
+                       $file = $couponsRoot . $ref . '.pdf';\r
+\r
+                       $pdf->setSourceFile($file);\r
+                       $idx = $pdf->importPage(1);\r
+                       $pdf->AddPage();\r
+                       $pdf->useTemplate($idx);\r
+                       $pdf->SetXY(15, 10);\r
+                       $pdf->SetFont('Helvetica', '', 12);\r
+                       $pdf->SetTextColor(0, 0, 0);\r
+                       $pdf->Cell(180, 10, trim($_GET['civilite'] . ' ' . $_GET['prenom'] . ' ' . $_GET['nom']) . ',');\r
+                       $pdf->SetXY(143, 203);\r
+                       $pdf->SetFont('Helvetica', 'B', 18);\r
+                       $pdf->Cell(33, 15, $code);\r
+               }\r
+               $pdf->Output('coupon.pdf', 'I');\r
+       }\r
+\r
        public function proxy() {\r
                ob_end_clean();\r
                fb(netHttp::quickGet($_GET['u'], 'php://output'));\r
index cce95328ff79c4e9974d9e9ebf35941a6348f040..fd5943078baeaa2d812e046ddf47053d08b0a795 100644 (file)
@@ -960,9 +960,9 @@ class wsDAOBook extends commonDAO {
 \r
                $daoLang = new wsDAOLang($this->con);\r
                $lang = $daoLang->selectById($book->lang);\r
-               \r
+\r
                fb($lang);\r
-               \r
+\r
                $langs = $daoLang->selectAll();\r
 \r
                $daoTheme = new wsDAOTheme($this->con);\r
@@ -1181,15 +1181,25 @@ class wsDAOBook extends commonDAO {
                                        $i++;\r
                                }\r
                        }\r
-                       $flex->addVariable('basketReferences', cubeXML::condense($xml->asXML()), false, true, "String");\r
+                       if (isset($xml)) {\r
+                               $flex->addVariable('basketReferences', cubeXML::condense($xml->asXML()), false, true, "String");\r
+                       }\r
                        if ($book->parametres->basketPDFBackground != '') {\r
                                $flex->addByteArray($workingDir . 'commerce/' . $book->parametres->basketPDFBackground, 'basket_pdf_background');\r
                        }\r
                }\r
                // Fonts\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
+               if ($theme->parametres->fontKit == 'auto') {\r
+                       $flex->addFont(FONT_PATH . '/' . $lang->font, 'BoldFont', $lang->charset);\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
+               } else if ($theme->parametres->fontKit == 'vagrounded') {\r
+                       $flex->addFont(FONT_PATH . '/vagrounded/VAGRoundedStd-Bold.otf', 'BoldFont', $lang->charset);\r
+                       $flex->addFont(FONT_PATH . '/vagrounded/VAGRoundedStd-Light.otf', 'GeneralFont', $lang->charset);\r
+                       $flex->addFont(FONT_PATH . '/FluidbookCredits.ttf', 'CreditsFont', 'ASCII');\r
+                       $flexLight->addFont(FONT_PATH . '/vagrounded/VAGRoundedStd-Bold.otf', 'LoaderFont', 'Numerals');\r
+               }\r
 \r
                $flexLight->addVariable('checksum', $hash, false, true, 'String');\r
        }\r
index ba5362b324d2a3c23a7945ccc848bfb99201d06b..a9ce0c5e62a453a6d3a81a58acc4f25fe5c2e281 100644 (file)
@@ -202,6 +202,7 @@ class wsBookParametres extends wsParametres {
                $this->fields['basket'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Panier activé'), 'grade' => 5);\r
                $this->fields['basketManager'] = array('type' => 'combo', 'default' => 'classic', 'editable' => true, 'label' => __("Manager de panier"),\r
                        'datas' => array(__('Classic') => 'com.fluidbook.player.basket.BasketManager',\r
+                               __('Grdf') => 'com.fluidbook.player.basket.custom.grdf.GrdfBasketManager',\r
                                __('Essilor') => 'com.fluidbook.player.basket.custom.essilor.EssilorBasketManager',\r
                                __('Essilor Recap') => 'com.fluidbook.player.basket.cursor.essilorrecap.EssilorRecapBasketManager'), 'grade' => 5);\r
                $this->fields['basketReferences'] = array('type' => 'freefile', 'default' => '', 'editable' => true,\r
index 9339f042d955211c8cd7a515e17a470787302c73..a41f265f95c4fcb7138cd1d6919df1cfc5c4a559 100644 (file)
@@ -36,9 +36,19 @@ class wsThemeParametres extends wsParametres {
                        'label' => __("Couleur des textes des champs d'édition"));\r
                $this->fields['subFieldColor'] = array('type' => 'couleurAlpha', 'default' => 'ffffffff', 'editable' => true,\r
                        'label' => __("Couleur des champs d'édition"));\r
+               $this->fields['subStrokeWidth'] = array('type' => 'integer', 'default' => 0, "editable" => true, 'label' => __('Largeur du contour'));\r
+               $this->fields['subStrokeColor'] = array('type' => 'couleur', 'default' => 'ffffff', "editable" => true, 'label' => __('Couleur du contour'));\r
+               $this->fields['subShade'] = array('type' => 'couleurAlpha', 'default' => '00000000', "editable" => true, 'label' => __('Ombre sous le sous-menu'));\r
+               $this->fields['subRound'] = array('type' => 'integer', 'default' => 10, "editable" => true, 'label' => __('Arrondi'));\r
+               $this->fields['subButtonCustom'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Personnalisation des boutons'));\r
+               $this->fields['subButtonBackground'] = array('type' => 'couleur', 'default' => 'cccccc', 'editable' => true, 'label' => __('Couleur de fond'));\r
+               $this->fields['subButtonColor'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true, 'label' => __('Couleur du texte'));\r
+               $this->fields['subButtonDecoration'] = array('type' => 'couleur', 'default' => '797979', 'editable' => true, 'label' => __('Couleur des décorations'));\r
 \r
                $this->forms['menu'] = array('label' => __('Personnalisation des menus'),\r
-                       'fieldsnames' => array('couleurB', 'subTextColor', '|', 'subSelectColor', 'subTextSelectColor', '|', 'subTextFieldColor', 'subFieldColor'));\r
+                       'fieldsnames' => array('couleurB', 'subTextColor', '|', 'subSelectColor', 'subTextSelectColor', '|', 'subTextFieldColor', 'subFieldColor',\r
+                               '|', 'subStrokeWidth', 'subStrokeColor', 'subShade', 'subRound',\r
+                               '|', 'subButtonCustom', 'subButtonBackground', 'subButtonColor', 'subButtonDecoration'));\r
 \r
                /* Search */\r
                $this->fields['couleurS'] = array('type' => 'couleur', 'default' => '000000', 'editable' => true,\r
@@ -70,8 +80,12 @@ class wsThemeParametres extends wsParametres {
                $this->fields['iconsHMargin'] = array('type' => 'integer', 'default' => 15, 'editable' => true,\r
                        'label' => __('Espace entre les icônes'), 'min' => 0, 'max' => 50);\r
 \r
+               $this->fields['fontKit'] = array('type' => 'combo', 'default' => 'auto', 'editable' => true,\r
+                       'label' => __('Police de caractères'), 'datas' => array(__('Automatique') => 'auto',\r
+                               'VAG Rounded' => 'vagrounded'));\r
+\r
                $this->forms['icones'] = array('label' => __('Personnalisation des icônes'),\r
-                       'fieldsnames' => array('iconSet', 'iconShadeColor', '|', 'iconsHMargin', '|', 'colorizeIcons', 'couleurI'));\r
+                       'fieldsnames' => array('iconSet', 'iconShadeColor', '|', 'iconsHMargin', '|', 'colorizeIcons', 'couleurI', '|', 'fontKit'));\r
 \r
                /* Book */\r
                $this->fields['bookShadeColor'] = array('type' => 'couleurAlpha', 'default' => '66000000', 'editable' => true,\r