header('Location: http://www.wesco-eshop.fr');
}
+ public function wsref()
+ {
+ global $core;
+ $e = explode('|', $_GET['ref'], 2);
+ $type = trim($e[0]);
+ $ref = trim($e[1]);
+
+ $r = $core->con->select("SELECT * FROM wsref WHERE ref='" . $core->con->escape($ref) . "' AND type='" . $core->con->escape($type) . "'");
+ if ($r->count()) {
+ header('Location: ' . $r->url);
+ }
+ }
+
public function pierronRef()
{
global $core;
$version = 40;
-
$gpu = trim($gpu);
$c = $core->con->openCursor('gpu_log');
return new wescoSalesLink($id, $init, $compiler);
case 'AtlanticDownloadLink':
return new atlanticDownloadLink($id, $init, $compiler);
+ default :
+ return new customLink($id, $init, $compiler);
}
break;
case 8:
}
+class customLink extends wescoLink
+{
+ public function getURL()
+ {
+ global $core;
+ $e = explode(':', $this->to, 2);
+ if (!count($e) == 1) {
+ return 'https://workshop.fluidbook.com/services/wsref?ref=' . urlencode($this->to);
+ }
+ $type = trim($e[0]);
+ $ref = trim($e[1]);
+
+ $r = $core->con->select("SELECT * FROM wsref WHERE ref='" . $core->con->escape($ref) . "' AND type='" . $core->con->escape($type) . "'");
+ if ($r->count()) {
+ return $r->url;
+ }
+ return 'https://workshop.fluidbook.com/services/wsref?ref=' . urlencode($type . '|' . $ref);
+ }
+
+ public function getDefaultTooltip()
+ {
+ return 'click to open the link';
+ }
+}
+
class zoomLink extends normalLink
{
protected $maxzoom_default = 2;