dolibarr 21.0.0-beta
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
37// Security check
38if (!$user->admin) {
40}
41
42$langs->load("cashdesk");
43
44$id = GETPOSTINT('id');
45
46//$_GET['optioncss'] = "print";
47
48print '<center>';
49
50if (GETPOSTISSET("id")) {
51 print '<h1><b>'.$langs->trans("ScanToOrder").'</b></h1>';
52 print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php?key=".dol_encode((string) $id)."' width='30%'>";
53} else {
54 print '<h1><b>'.$langs->trans("ScanToMenu").'</b></h1>';
55 print "<img src='".DOL_URL_ROOT."/takepos/genimg/qr.php' width='30%'>";
56}
57
58print '<h1><b>'.$mysoc->name.'</b></h1>';
59
60print '</center>';
61
62llxFooter();
63
64$db->close();
$id
Definition account.php:48
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.