From 70975dda4ae5237914b510ee61559fc8233ab34d Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 25 Jun 2015 19:05:49 -0700 Subject: remove all QR-code stuff from core - now in qrator addon --- library/phpqrcode/index.php | 94 --------------------------------------------- 1 file changed, 94 deletions(-) delete mode 100644 library/phpqrcode/index.php (limited to 'library/phpqrcode/index.php') diff --git a/library/phpqrcode/index.php b/library/phpqrcode/index.php deleted file mode 100644 index 9e14b7eaa..000000000 --- a/library/phpqrcode/index.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - echo "

PHP QR Code


"; - - //set it to writable location, a place for temp generated PNG files - $PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; - - //html PNG location prefix - $PNG_WEB_DIR = 'temp/'; - - include "qrlib.php"; - - //ofcourse we need rights to create temp dir - if (!file_exists($PNG_TEMP_DIR)) - mkdir($PNG_TEMP_DIR); - - - $filename = $PNG_TEMP_DIR.'test.png'; - - //processing form input - //remember to sanitize user input in real-life solution !!! - $errorCorrectionLevel = 'L'; - if (isset($_REQUEST['level']) && in_array($_REQUEST['level'], array('L','M','Q','H'))) - $errorCorrectionLevel = $_REQUEST['level']; - - $matrixPointSize = 4; - if (isset($_REQUEST['size'])) - $matrixPointSize = min(max((int)$_REQUEST['size'], 1), 10); - - - if (isset($_REQUEST['data'])) { - - //it's very important! - if (trim($_REQUEST['data']) == '') - die('data cannot be empty! back'); - - // user data - $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; - QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } else { - - //default data - echo 'You can provide data in GET parameter: like that
'; - QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } - - //display generated file - echo '
'; - - //config form - echo '
- Data:   - ECC:   - Size:   -

'; - - // benchmark - QRtools::timeBenchmark(); - - \ No newline at end of file -- cgit v1.2.3