]> _ Git - cubeextranet.git/commitdiff
HTML5 links, redirection script #408 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 May 2016 13:23:50 +0000 (13:23 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 9 May 2016 13:23:50 +0000 (13:23 +0000)
inc/ws/Controlleur/class.ws.services.php
inc/ws/Util/html5/class.ws.html5.links.php

index 14773ef15d98a5fc99756dc482ff6a6aba29ba45..c60d3ce0e6439ba397cf9875857c1da8c2f9fade 100644 (file)
@@ -712,6 +712,18 @@ class wsServices extends cubeFlashGateway {
                header('Location: http://www.wesco-eshop.fr');
        }
 
+       public function pierronRef() {
+               global $core;
+               $ref = $this->args['ref'];
+
+               $r = $core->con->select('SELECT url FROM pierronref WHERE ref="' . $core->con->escape($ref) . '"');
+               if ($r->count()) {
+                       header('Location: http://www.pierron.fr/' . $r->url);
+                       exit;
+               }
+               header('Location: http://www.pierron.fr/');
+       }
+
        public function flfRef() {
                global $core;
 
index ece867e4aa9b203d46fbf59c0215a9b7cb3846c3..36055e7fdbe7d72b474b955f146290851cca1440 100644 (file)
@@ -65,6 +65,8 @@ class wsHTML5Link {
                                        return new flfLink($id, $init, $compiler);
                                } else if ($compiler->book->parametres->customLinkClass == 'InpesPopinLink') {
                                        return new inpesPopinLink($id, $init, $compiler);
+                               } else if ($compiler->book->parametres->customLinkClass == 'PierronLink') {
+                                       return new pierronLink($id, $init, $compiler);
                                }
                        case 8:
                        case 9:
@@ -885,7 +887,19 @@ class audioLink extends wsHTML5Link {
 class wescoLink extends normalLink {
 
        public function getURL() {
-               return 'http://workshop.fluidbook.com/services/wescoRef?ref=' . $this->to;
+               return 'https://workshop.fluidbook.com/services/wescoRef?ref=' . $this->to;
+       }
+
+       public function getTarget() {
+               return '_blank';
+       }
+
+}
+
+class pierronLink extends normalLink {
+
+       public function getURL() {
+               return 'https://workshop.fluidbook.com/services/pierronRef?ref=' . $this->to;
        }
 
        public function getTarget() {
@@ -967,7 +981,7 @@ class statsTagLink extends wsHTML5Link {
 class flfLink extends wescoLink {
 
        public function getURL() {
-               return 'http://workshop.fluidbook.com/services/flfRef?ref=' . $this->to;
+               return 'https://workshop.fluidbook.com/services/flfRef?ref=' . $this->to;
        }
 
        public function getTarget() {