dolibarr  16.0.5
printqr.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
24 require '../../main.inc.php';
25 
26 // Security check
27 if (!$user->admin) {
29 }
30 
31 $langs->load("cashdesk");
32 
33 $id = GETPOST('id', 'int');
34 
35 $_GET['optioncss'] = "print";
36 
37 print '<center>';
38 
39 if (GETPOSTISSET("id")) {
40  print '<h1><b>'.$langs->trans("ScanToOrder").'</b></h1>';
41  print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode($id)."' width='30%'>";
42 } else {
43  print '<h1><b>'.$langs->trans("ScanToMenu").'</b></h1>';
44  print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' width='30%'>";
45 }
46 
47 print '<h1><b>'.$mysoc->name.'</b></h1>';
48 
49 print '</center>';
50 
51 llxFooter();
52 
53 $db->close();
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_encode
dol_encode($chain, $key='1')
Encode a string with base 64 algorithm + specific delta change.
Definition: security.lib.php:38
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933