dolibarr 21.0.0-alpha
printqr.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
25// Load Dolibarr environment
26require '../../main.inc.php';
27
28// Security check
29if (!$user->admin) {
31}
32
33$langs->load("cashdesk");
34
35$id = GETPOSTINT('id');
36
37//$_GET['optioncss'] = "print";
38
39print '<center>';
40
41if (GETPOSTISSET("id")) {
42 print '<h1><b>'.$langs->trans("ScanToOrder").'</b></h1>';
43 print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode((string) $id)."' width='30%'>";
44} else {
45 print '<h1><b>'.$langs->trans("ScanToMenu").'</b></h1>';
46 print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' width='30%'>";
47}
48
49print '<h1><b>'.$mysoc->name.'</b></h1>';
50
51print '</center>';
52
53llxFooter();
54
55$db->close();
$id
Definition account.php:39
llxFooter()
Footer empty.
Definition document.php:107
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_encode($chain, $key='1')
Encode a string with base 64 algorithm + specific delta change.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.