[Mapbender-commits] r10013 - trunk/mapbender/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Dec 14 00:19:17 PST 2018


Author: armin11
Date: 2018-12-14 00:19:16 -0800 (Fri, 14 Dec 2018)
New Revision: 10013

Added:
   trunk/mapbender/http/php/mod_mobileClientQr.php
Log:
New simple script to export qr code to mobile client

Added: trunk/mapbender/http/php/mod_mobileClientQr.php
===================================================================
--- trunk/mapbender/http/php/mod_mobileClientQr.php	                        (rev 0)
+++ trunk/mapbender/http/php/mod_mobileClientQr.php	2018-12-14 08:19:16 UTC (rev 10013)
@@ -0,0 +1,33 @@
+<?php
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS 
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once dirname(__FILE__) . "/../../core/globalSettings.php";
+require_once dirname(__FILE__) . "/../extensions/phpqrcode/phpqrcode.php";
+$filename = "qr_mobileclient.png";
+//generate qr on the fly in tmp folder
+//link to invoke wmc per get api if wrapper path isset
+if (defined("MAPBENDER_PATH") && MAPBENDER_PATH != "") {
+    $invokeLink = MAPBENDER_PATH."/extensions/mobilemap2/index.html";
+    QRcode::png($invokeLink,TMPDIR."/".$filename);
+    $htmlElement = "<a href = '".$invokeLink."'><img src='".TMPDIR."/".$filename."'></a>";
+} else {
+    echo "MAPBENDER_PATH not defined in mapbender.conf - please define it to activate linkage and qr code!";
+    die();
+}
+//echo html image tag with link to mobile client
+echo $htmlElement;
+?>



More information about the Mapbender_commits mailing list