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