<?php
define('QR_MODE_NUL', -1);
define('QR_MODE_NUM', 0);
define('QR_MODE_AN', 1);
define('QR_MODE_8', 2);
define('QR_MODE_KANJI', 3);
define('QR_MODE_STRUCTURE', 4);
// Levels of error correction.
define('QR_ECLEVEL_L', 0);
define('QR_ECLEVEL_M', 1);
define('QR_ECLEVEL_Q', 2);
define('QR_ECLEVEL_H', 3);
// Supported output formats
define('QR_FORMAT_TEXT', 0);
define('QR_FORMAT_PNG', 1);
class qrstr {
public static function set(&$srctab, $x, $y, $repl, $replLen = false) {
$srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl));
}
}
//---- merged_config.php -----------------------------
/*
* PHP QR Code encoder
*
* Config file, tuned-up for merged verion
*/
define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there
define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true
define('QR_LOG_DIR', false); // default error logs dir
define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false
define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
//---- qrtools.php -----------------------------
/*
* PHP QR Code encoder
*
* Toolset, handy and debug utilites.
*
* PHP QR Code is distributed under LGPL 3
* Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
*
* 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
*/
class QRtools {
//----------------------------------------------------------------------
public static function binarize($frame)
{
$len = count($frame);
foreach ($frame as &$frameLine) {
for($i=0; $i<$len; $i++) {
$frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0';
}
}
return $frame;
}
//----------------------------------------------------------------------
public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037')
{
$barcode_array = array();
if (!is_array($mode))
$mode = explode(',', $mode);
$eccLevel = 'L';
if (count($mode) > 1) {
$eccLevel = $mode[1];
}
$qrTab = QRcode::text($code, false, $eccLevel);
$size = count($qrTab);
$barcode_array['num_rows'] = $size;
$barcode_array['num_cols'] = $size;
$barcode_array['bcode'] = array();
foreach ($qrTab as $line) {
$arrAdd = array();
foreach(str_split($line) as $char)
$arrAdd[] = ($char=='1')?1:0;
$barcode_array['bcode'][] = $arrAdd;
}
return $barcode_array;
}
//----------------------------------------------------------------------
public static function clearCache()
{
self::$frames = array();
}
//----------------------------------------------------------------------
public static function buildCache()
{
QRtools::markTime('before_build_cache');
$mask = new QRmask();
for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) {
$frame = QRspec::newFrame($a);
if (QR_IMAGE) {
$fileName = QR_CACHE_DIR.'frame_'.$a.'.png';
QRimage::png(self::binarize($frame), $fileName, 1, 0);
}
$width = count($frame);
$bitMask = array_fill(0, $width, array_fill(0, $width, 0));
for ($maskNo=0; $maskNo<8; $maskNo++)
$mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true);
}
QRtools::markTime('after_build_cache');
}
//----------------------------------------------------------------------
public static function log($outfile, $err)
{
if (QR_LOG_DIR !== false) {
if ($err != '') {
if ($outfile !== false) {
file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
} else {
file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
}
}
}
}
//----------------------------------------------------------------------
public static function dumpMask($frame)
{
$width = count($frame);
for($y=0;$y<$width;$y++) {
for($x=0;$x<$width;$x++) {
echo ord($frame[$y][$x]).',';
}
}
}
//----------------------------------------------------------------------
public static function markTime($markerId)
{
list($usec, $sec) = explode(" ", microtime());
$time = ((float)$usec + (float)$sec);
if (!isset($GLOBALS['qr_time_bench']))
$GLOBALS['qr_time_bench'] = array();
$GLOBALS['qr_time_bench'][$markerId] = $time;
}
//----------------------------------------------------------------------
public static function timeBenchmark()
{
self::markTime('finish');
$lastTime = 0;
$startTime = 0;
$p = 0;
echo '<table cellpadding="3" cellspacing="1">
<thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead>
<tbody>';
foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
if ($p > 0) {
echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime-$lastTime, 6).'s</td></tr>';
} else {
$startTime = $thisTime;
}
$p++;
$lastTime = $thisTime;
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
全新二开码支付系统,支持三网免挂(微信为店员代挂,支付宝QQCK免挂机秒回调) 全新二开码支付系统,支持三网免挂(微信为店员代挂,支付宝QQCK免挂机秒回调) 全新二开码支付系统,支持三网免挂(微信为店员代挂,支付宝QQCK免挂机秒回调)
资源推荐
资源详情
资源评论
收起资源包目录
三网免挂码支付系统/支付宝免输入金额/支付宝H5微信QQ免签/二维码收款免签支付 (676个子文件)
app.min.css 357KB
app.min.css 314KB
app.min.css 267KB
app.min.css 215KB
icons.css 211KB
bootstrap.css 149KB
bootstrap.min.css 142KB
bootstrap.css 138KB
bootstrap.min.css 138KB
bootstrap.min.css 138KB
qrcode.css 121KB
qrcode.css 121KB
qrcode.css 121KB
bootstrap.min.css 120KB
bootstrap.min.css 117KB
bootstrap.min.css 114KB
app.css 80KB
app.css 74KB
animate.css 73KB
style.css 65KB
animate.min.css 62KB
animate.min.css 56KB
style.css 56KB
components.css 33KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
style.css 24KB
sweetalert.css 23KB
core.css 23KB
common.css 19KB
swiper.css 19KB
swiper.css 19KB
index.css 17KB
responsive.css 17KB
style.css 16KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
demo_main.css 12KB
simple-line-icons.css 11KB
bootstrap-chosen.css 11KB
modules.css 10KB
login.css 9KB
index-top.css 8KB
nucleo.css 7KB
pay.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
layer.css 5KB
main.css 5KB
main.css 5KB
demo_reset.css 5KB
dataTables.bootstrap4.min.css 5KB
login1.css 4KB
flexslider.css 4KB
style.css 4KB
style.css 4KB
pjax.css 4KB
plugins.css 3KB
qietu.css 3KB
fonts.css 3KB
buttons.bootstrap4.min.css 3KB
reset.css 2KB
iconfont.css 2KB
sweetalert.css 2KB
common1.css 1KB
reset.css 1KB
captcha.css 1KB
m_reset.css 1KB
reset.css 1KB
demo.css 818B
font.css 782B
font.css 696B
materialdesignicons-webfont.eot 231KB
fontawesome-webfont.eot 162KB
fontawesome-webfont.eot 162KB
ionicons.eot 100KB
typicons.eot 98KB
themify.eot 77KB
dripicons-v2.eot 40KB
Simple-Line-Icons.eot 35KB
et-line.eot 32KB
glyphicons-halflings-regular.eot 20KB
glyphicons-halflings-regular.eot 20KB
iconfont.eot 10KB
loading.gif 36KB
loading-0.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
loading-0.gif 6KB
loading.gif 4KB
loading.gif 4KB
loading.gif 4KB
load.gif 3KB
共 676 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
- qunimabidashabi2024-10-05总算找到了想要的资源,搞定遇到的大问题,赞赞赞!
破碎的天堂鸟
- 粉丝: 9962
- 资源: 2943
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 信捷PLC 7轴伺服插补联动 XD5-48T6-E PLC 做的7轴联动设备,具备牵引示教功能 用PLC做配方,喷涂机程序 包括PLC和触摸屏程序,中文详细注释
- Unity雨下到玻璃上的效果shader
- 设计电路1-模电Multisim仿真实验
- 基于双向长短期记忆网络(BILSTM)的数据分类预测 matlab代码,要求2019版本及以上
- 数据分析-77-CDNow网站用户消费行为分析(包含代码和数据)
- 开关电源,高频变压器磁芯参数对照表
- Halcon 多区域绘制与掩膜
- 台达eh3与台达变频器modbus rtu通讯程序 程序有注释 实现正反转,写入频率,读取频率,读取电压的功能 plc为台达eh3,触摸屏为dop-107bv,变频器为台达VFD-M
- flyway支持达梦数据库版本jar包
- 基于ssm的酒店预定管理系统的设计与实现【附源码】
- 最近电平接近 NLM 模块化多电平变器matlab simulink仿真模型
- MATLAB仿真MIMO通信系统V-BALST结构ZF检测算 法与MMSE检测算法 形式:程序 1、仿真V-BALST结构ZF检测算法性能,调制方式为QPSK 2、仿真V-BALST结构MMSE检测算
- WPF LiveCharts动态曲线(折线图)
- 微信小程序开发基础与实践指南
- 任务驱动型作文提分训练.doc
- 人版五年级(下册)语文课后习题答案.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功