$mail->send();
}
+ public function grdfCoupon2015() {
+ $id = $this->args['id'];
+
+ $this->outputXML = false;
+ $couponsRoot = WS_BOOKS . '/working/' . $id . '/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']);
+
+ $tmp = cubeFiles::tempnam();
+ $pdftk = new CubeIT_CommandLine('pdftk');
+ $pdftk->setPath(CONVERTER_PATH);
+ foreach ($refs as $ref) {
+ $file = $couponsRoot . $ref . '.pdf';
+ $pdftk->setArg(null, $file);
+ }
+ $pdftk->setArg(null, 'output');
+ $pdftk->setArg(null, $tmp);
+ $pdftk->execute();
+
+ header('Content-Type: application/pdf');
+ header('Content-Disposition: inline; filename="CouponChequier.pdf"');
+
+ readfile($tmp);
+ unlink($tmp);
+ exit;
+ }
+
public function grdfCoupon() {
+
$id = $this->args['id'];
+ if ($id == 13372) {
+ return $this->grdfCoupon2015();
+ }
+
$this->outputXML = false;
$couponsRoot = WS_BOOKS . '/working/' . $id . '/commerce/';
'datas' => array(__('Classic') => 'com.fluidbook.player.basket.BasketManager',
'Grdf' => 'com.fluidbook.player.basket.custom.grdf.GrdfBasketManager',
'Grdf 2013' => 'com.fluidbook.player.basket.custom.grdf.grdf2013.GrdfBasketManager2013',
+ 'Grdf 2015' => 'com.fluidbook.player.basket.custom.grdf.grdf2015.GrdfBasketManager2015',
'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,
}
}
-
-?>
\ No newline at end of file