$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
'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
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
\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
$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
$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
'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
$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