mirror of https://github.com/Maecenas/tt-rss.git
Browse Source
* move most OTP-related stuff into userhelper * remove old phpqrcode and otphp librariesmaster

788 changed files with 63179 additions and 11705 deletions
@ -0,0 +1,6 @@
|
||||
{ |
||||
"require": { |
||||
"spomky-labs/otphp": "^10.0", |
||||
"chillerlan/php-qrcode": "^3.3" |
||||
} |
||||
} |
@ -0,0 +1,495 @@
|
||||
{ |
||||
"_readme": [ |
||||
"This file locks the dependencies of your project to a known state", |
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
||||
"This file is @generated automatically" |
||||
], |
||||
"content-hash": "51b3544b18f6b9f21242d9f647e29fcb", |
||||
"packages": [ |
||||
{ |
||||
"name": "beberlei/assert", |
||||
"version": "v3.2.7", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/beberlei/assert.git", |
||||
"reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/beberlei/assert/zipball/d63a6943fc4fd1a2aedb65994e3548715105abcf", |
||||
"reference": "d63a6943fc4fd1a2aedb65994e3548715105abcf", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"ext-ctype": "*", |
||||
"ext-json": "*", |
||||
"ext-mbstring": "*", |
||||
"ext-simplexml": "*", |
||||
"php": "^7" |
||||
}, |
||||
"require-dev": { |
||||
"friendsofphp/php-cs-fixer": "*", |
||||
"phpstan/phpstan-shim": "*", |
||||
"phpunit/phpunit": ">=6.0.0 <8" |
||||
}, |
||||
"suggest": { |
||||
"ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles" |
||||
}, |
||||
"type": "library", |
||||
"autoload": { |
||||
"psr-4": { |
||||
"Assert\\": "lib/Assert" |
||||
}, |
||||
"files": [ |
||||
"lib/Assert/functions.php" |
||||
] |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"BSD-2-Clause" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Benjamin Eberlei", |
||||
"email": "kontakt@beberlei.de", |
||||
"role": "Lead Developer" |
||||
}, |
||||
{ |
||||
"name": "Richard Quadling", |
||||
"email": "rquadling@gmail.com", |
||||
"role": "Collaborator" |
||||
} |
||||
], |
||||
"description": "Thin assertion library for input validation in business models.", |
||||
"keywords": [ |
||||
"assert", |
||||
"assertion", |
||||
"validation" |
||||
], |
||||
"support": { |
||||
"issues": "https://github.com/beberlei/assert/issues", |
||||
"source": "https://github.com/beberlei/assert/tree/v3" |
||||
}, |
||||
"time": "2019-12-19T17:51:41+00:00" |
||||
}, |
||||
{ |
||||
"name": "chillerlan/php-qrcode", |
||||
"version": "3.4.0", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/chillerlan/php-qrcode.git", |
||||
"reference": "d8bf297e6843a53aeaa8f3285ce04fc349d133d6" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/d8bf297e6843a53aeaa8f3285ce04fc349d133d6", |
||||
"reference": "d8bf297e6843a53aeaa8f3285ce04fc349d133d6", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"chillerlan/php-settings-container": "^1.2", |
||||
"ext-mbstring": "*", |
||||
"php": "^7.2" |
||||
}, |
||||
"require-dev": { |
||||
"phpunit/phpunit": "^8.5", |
||||
"setasign/fpdf": "^1.8.2" |
||||
}, |
||||
"suggest": { |
||||
"chillerlan/php-authenticator": "Yet another Google authenticator! Also creates URIs for mobile apps.", |
||||
"setasign/fpdf": "Required to use the QR FPDF output." |
||||
}, |
||||
"type": "library", |
||||
"autoload": { |
||||
"psr-4": { |
||||
"chillerlan\\QRCode\\": "src/" |
||||
} |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Kazuhiko Arase", |
||||
"homepage": "https://github.com/kazuhikoarase" |
||||
}, |
||||
{ |
||||
"name": "Smiley", |
||||
"email": "smiley@chillerlan.net", |
||||
"homepage": "https://github.com/codemasher" |
||||
}, |
||||
{ |
||||
"name": "Contributors", |
||||
"homepage": "https://github.com/chillerlan/php-qrcode/graphs/contributors" |
||||
} |
||||
], |
||||
"description": "A QR code generator. PHP 7.2+", |
||||
"homepage": "https://github.com/chillerlan/php-qrcode", |
||||
"keywords": [ |
||||
"phpqrcode", |
||||
"qr", |
||||
"qr code", |
||||
"qrcode", |
||||
"qrcode-generator" |
||||
], |
||||
"support": { |
||||
"issues": "https://github.com/chillerlan/php-qrcode/issues", |
||||
"source": "https://github.com/chillerlan/php-qrcode/tree/3.4.0" |
||||
}, |
||||
"funding": [ |
||||
{ |
||||
"url": "https://www.paypal.com/donate?hosted_button_id=WLYUNAT9ZTJZ4", |
||||
"type": "custom" |
||||
}, |
||||
{ |
||||
"url": "https://ko-fi.com/codemasher", |
||||
"type": "ko_fi" |
||||
} |
||||
], |
||||
"time": "2020-11-18T20:51:41+00:00" |
||||
}, |
||||
{ |
||||
"name": "chillerlan/php-settings-container", |
||||
"version": "1.2.1", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/chillerlan/php-settings-container.git", |
||||
"reference": "b9b0431dffd74102ee92348a63b4c33fc8ba639b" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/b9b0431dffd74102ee92348a63b4c33fc8ba639b", |
||||
"reference": "b9b0431dffd74102ee92348a63b4c33fc8ba639b", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"ext-json": "*", |
||||
"php": "^7.2" |
||||
}, |
||||
"require-dev": { |
||||
"phpunit/phpunit": "^8.3" |
||||
}, |
||||
"type": "library", |
||||
"autoload": { |
||||
"psr-4": { |
||||
"chillerlan\\Settings\\": "src/" |
||||
} |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Smiley", |
||||
"email": "smiley@chillerlan.net", |
||||
"homepage": "https://github.com/codemasher" |
||||
} |
||||
], |
||||
"description": "A container class for immutable settings objects. Not a DI container. PHP 7.2+", |
||||
"homepage": "https://github.com/chillerlan/php-settings-container", |
||||
"keywords": [ |
||||
"PHP7", |
||||
"Settings", |
||||
"container", |
||||
"helper" |
||||
], |
||||
"support": { |
||||
"issues": "https://github.com/chillerlan/php-settings-container/issues", |
||||
"source": "https://github.com/chillerlan/php-settings-container" |
||||
}, |
||||
"time": "2019-09-10T00:09:44+00:00" |
||||
}, |
||||
{ |
||||
"name": "paragonie/constant_time_encoding", |
||||
"version": "v2.4.0", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/paragonie/constant_time_encoding.git", |
||||
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", |
||||
"reference": "f34c2b11eb9d2c9318e13540a1dbc2a3afbd939c", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": "^7|^8" |
||||
}, |
||||
"require-dev": { |
||||
"phpunit/phpunit": "^6|^7|^8|^9", |
||||
"vimeo/psalm": "^1|^2|^3|^4" |
||||
}, |
||||
"type": "library", |
||||
"autoload": { |
||||
"psr-4": { |
||||
"ParagonIE\\ConstantTime\\": "src/" |
||||
} |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Paragon Initiative Enterprises", |
||||
"email": "security@paragonie.com", |
||||
"homepage": "https://paragonie.com", |
||||
"role": "Maintainer" |
||||
}, |
||||
{ |
||||
"name": "Steve 'Sc00bz' Thomas", |
||||
"email": "steve@tobtu.com", |
||||
"homepage": "https://www.tobtu.com", |
||||
"role": "Original Developer" |
||||
} |
||||
], |
||||
"description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", |
||||
"keywords": [ |
||||
"base16", |
||||
"base32", |
||||
"base32_decode", |
||||
"base32_encode", |
||||
"base64", |
||||
"base64_decode", |
||||
"base64_encode", |
||||
"bin2hex", |
||||
"encoding", |
||||
"hex", |
||||
"hex2bin", |
||||
"rfc4648" |
||||
], |
||||
"support": { |
||||
"email": "info@paragonie.com", |
||||
"issues": "https://github.com/paragonie/constant_time_encoding/issues", |
||||
"source": "https://github.com/paragonie/constant_time_encoding" |
||||
}, |
||||
"time": "2020-12-06T15:14:20+00:00" |
||||
}, |
||||
{ |
||||
"name": "spomky-labs/otphp", |
||||
"version": "v10.0.1", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/Spomky-Labs/otphp.git", |
||||
"reference": "f44cce5a9db4b8da410215d992110482c931232f" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/Spomky-Labs/otphp/zipball/f44cce5a9db4b8da410215d992110482c931232f", |
||||
"reference": "f44cce5a9db4b8da410215d992110482c931232f", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"beberlei/assert": "^3.0", |
||||
"ext-mbstring": "*", |
||||
"paragonie/constant_time_encoding": "^2.0", |
||||
"php": "^7.2|^8.0", |
||||
"thecodingmachine/safe": "^0.1.14|^1.0" |
||||
}, |
||||
"require-dev": { |
||||
"php-coveralls/php-coveralls": "^2.0", |
||||
"phpstan/phpstan": "^0.12", |
||||
"phpstan/phpstan-beberlei-assert": "^0.12", |
||||
"phpstan/phpstan-deprecation-rules": "^0.12", |
||||
"phpstan/phpstan-phpunit": "^0.12", |
||||
"phpstan/phpstan-strict-rules": "^0.12", |
||||
"phpunit/phpunit": "^8.0", |
||||
"thecodingmachine/phpstan-safe-rule": "^1.0" |
||||
}, |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"v10.0": "10.0.x-dev", |
||||
"v9.0": "9.0.x-dev", |
||||
"v8.3": "8.3.x-dev" |
||||
} |
||||
}, |
||||
"autoload": { |
||||
"psr-4": { |
||||
"OTPHP\\": "src/" |
||||
} |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"authors": [ |
||||
{ |
||||
"name": "Florent Morselli", |
||||
"homepage": "https://github.com/Spomky" |
||||
}, |
||||
{ |
||||
"name": "All contributors", |
||||
"homepage": "https://github.com/Spomky-Labs/otphp/contributors" |
||||
} |
||||
], |
||||
"description": "A PHP library for generating one time passwords according to RFC 4226 (HOTP Algorithm) and the RFC 6238 (TOTP Algorithm) and compatible with Google Authenticator", |
||||
"homepage": "https://github.com/Spomky-Labs/otphp", |
||||
"keywords": [ |
||||
"FreeOTP", |
||||
"RFC 4226", |
||||
"RFC 6238", |
||||
"google authenticator", |
||||
"hotp", |
||||
"otp", |
||||
"totp" |
||||
], |
||||
"support": { |
||||
"issues": "https://github.com/Spomky-Labs/otphp/issues", |
||||
"source": "https://github.com/Spomky-Labs/otphp/tree/v10.0.1" |
||||
}, |
||||
"time": "2020-01-28T09:24:19+00:00" |
||||
}, |
||||
{ |
||||
"name": "thecodingmachine/safe", |
||||
"version": "v1.3.3", |
||||
"source": { |
||||
"type": "git", |
||||
"url": "https://github.com/thecodingmachine/safe.git", |
||||
"reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc" |
||||
}, |
||||
"dist": { |
||||
"type": "zip", |
||||
"url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc", |
||||
"reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc", |
||||
"shasum": "" |
||||
}, |
||||
"require": { |
||||
"php": ">=7.2" |
||||
}, |
||||
"require-dev": { |
||||
"phpstan/phpstan": "^0.12", |
||||
"squizlabs/php_codesniffer": "^3.2", |
||||
"thecodingmachine/phpstan-strict-rules": "^0.12" |
||||
}, |
||||
"type": "library", |
||||
"extra": { |
||||
"branch-alias": { |
||||
"dev-master": "0.1-dev" |
||||
} |
||||
}, |
||||
"autoload": { |
||||
"psr-4": { |
||||
"Safe\\": [ |
||||
"lib/", |
||||
"deprecated/", |
||||
"generated/" |
||||
] |
||||
}, |
||||
"files": [ |
||||
"deprecated/apc.php", |
||||
"deprecated/libevent.php", |
||||
"deprecated/mssql.php", |
||||
"deprecated/stats.php", |
||||
"lib/special_cases.php", |
||||
"generated/apache.php", |
||||
"generated/apcu.php", |
||||
"generated/array.php", |
||||
"generated/bzip2.php", |
||||
"generated/calendar.php", |
||||
"generated/classobj.php", |
||||
"generated/com.php", |
||||
"generated/cubrid.php", |
||||
"generated/curl.php", |
||||
"generated/datetime.php", |
||||
"generated/dir.php", |
||||
"generated/eio.php", |
||||
"generated/errorfunc.php", |
||||
"generated/exec.php", |
||||
"generated/fileinfo.php", |
||||
"generated/filesystem.php", |
||||
"generated/filter.php", |
||||
"generated/fpm.php", |
||||
"generated/ftp.php", |
||||
"generated/funchand.php", |
||||
"generated/gmp.php", |
||||
"generated/gnupg.php", |
||||
"generated/hash.php", |
||||
"generated/ibase.php", |
||||
"generated/ibmDb2.php", |
||||
"generated/iconv.php", |
||||
"generated/image.php", |
||||
"generated/imap.php", |
||||
"generated/info.php", |
||||
"generated/ingres-ii.php", |
||||
"generated/inotify.php", |
||||
"generated/json.php", |
||||
"generated/ldap.php", |
||||
"generated/libxml.php", |
||||
"generated/lzf.php", |
||||
"generated/mailparse.php", |
||||
"generated/mbstring.php", |
||||
"generated/misc.php", |
||||
"generated/msql.php", |
||||
"generated/mysql.php", |
||||
"generated/mysqli.php", |
||||
"generated/mysqlndMs.php", |
||||
"generated/mysqlndQc.php", |
||||
"generated/network.php", |
||||
"generated/oci8.php", |
||||
"generated/opcache.php", |
||||
"generated/openssl.php", |
||||
"generated/outcontrol.php", |
||||
"generated/password.php", |
||||
"generated/pcntl.php", |
||||
"generated/pcre.php", |
||||
"generated/pdf.php", |
||||
"generated/pgsql.php", |
||||
"generated/posix.php", |
||||
"generated/ps.php", |
||||
"generated/pspell.php", |
||||
"generated/readline.php", |
||||
"generated/rpminfo.php", |
||||
"generated/rrd.php", |
||||
"generated/sem.php", |
||||
"generated/session.php", |
||||
"generated/shmop.php", |
||||
"generated/simplexml.php", |
||||
"generated/sockets.php", |
||||
"generated/sodium.php", |
||||
"generated/solr.php", |
||||
"generated/spl.php", |
||||
"generated/sqlsrv.php", |
||||
"generated/ssdeep.php", |
||||
"generated/ssh2.php", |
||||
"generated/stream.php", |
||||
"generated/strings.php", |
||||
"generated/swoole.php", |
||||
"generated/uodbc.php", |
||||
"generated/uopz.php", |
||||
"generated/url.php", |
||||
"generated/var.php", |
||||
"generated/xdiff.php", |
||||
"generated/xml.php", |
||||
"generated/xmlrpc.php", |
||||
"generated/yaml.php", |
||||
"generated/yaz.php", |
||||
"generated/zip.php", |
||||
"generated/zlib.php" |
||||
] |
||||
}, |
||||
"notification-url": "https://packagist.org/downloads/", |
||||
"license": [ |
||||
"MIT" |
||||
], |
||||
"description": "PHP core functions that throw exceptions instead of returning FALSE on error", |
||||
"support": { |
||||
"issues": "https://github.com/thecodingmachine/safe/issues", |
||||
"source": "https://github.com/thecodingmachine/safe/tree/v1.3.3" |
||||
}, |
||||
"time": "2020-10-28T17:51:34+00:00" |
||||
} |
||||
], |
||||
"packages-dev": [], |
||||
"aliases": [], |
||||
"minimum-stability": "stable", |
||||
"stability-flags": [], |
||||
"prefer-stable": false, |
||||
"prefer-lowest": false, |
||||
"platform": [], |
||||
"platform-dev": [], |
||||
"plugin-api-version": "2.0.0" |
||||
} |
@ -1,24 +1,17 @@
|
||||
<?php |
||||
spl_autoload_register(function($class) { |
||||
$namespace = ''; |
||||
$class_name = $class; |
||||
|
||||
if (strpos($class, '\\') !== false) |
||||
list ($namespace, $class_name) = explode('\\', $class, 2); |
||||
$root_dir = dirname(__DIR__); // we were in tt-rss/include |
||||
|
||||
$root_dir = dirname(__DIR__); // we're in tt-rss/include |
||||
// - internal tt-rss classes are loaded from classes/ and use special naming logic instead of namespaces |
||||
// - plugin classes are loaded by PluginHandler from plugins.local/ and plugins/ |
||||
|
||||
// 1. third party libraries with namespaces are loaded from vendor/ |
||||
// 2. internal tt-rss classes are loaded from classes/ and use special naming logic instead of namespaces |
||||
// 3. plugin classes are loaded by PluginHandler from plugins.local/ and plugins/ (TODO: use generic autoloader?) |
||||
|
||||
if ($namespace && $class_name) { |
||||
$class_file = "$root_dir/vendor/$namespace/" . str_replace('\\', '/', $class_name) . ".php"; |
||||
} else { |
||||
$class_file = "$root_dir/classes/" . str_replace("_", "/", strtolower($class)) . ".php"; |
||||
} |
||||
$class_file = "$root_dir/classes/" . str_replace("_", "/", strtolower($class)) . ".php"; |
||||
|
||||
if (file_exists($class_file)) |
||||
include $class_file; |
||||
|
||||
}); |
||||
|
||||
// also pull composer autoloader |
||||
require_once "vendor/autoload.php"; |
||||
|
@ -1,38 +0,0 @@
|
||||
* 1.0.0 build 2010031920 |
||||
|
||||
- first public release |
||||
- help in readme, install |
||||
- cleanup ans separation of QRtools and QRspec |
||||
- now TCPDF binding requires minimal changes in TCPDF, having most of job |
||||
done in QRtools tcpdfBarcodeArray |
||||
- nicer QRtools::timeBenchmark output |
||||
- license and copyright notices in files |
||||
- indent cleanup - from tab to 4spc, keep it that way please :) |
||||
- sf project, repository, wiki |
||||
- simple code generator in index.php |
||||
|
||||
* 1.1.0 build 2010032113 |
||||
|
||||
- added merge tool wich generate merged version of code |
||||
located in phpqrcode.php |
||||
- splited qrconst.php from qrlib.php |
||||
|
||||
* 1.1.1 build 2010032405 |
||||
|
||||
- patch by Rick Seymour allowing saving PNG and displaying it at the same time |
||||
- added version info in VERSION file |
||||
- modified merge tool to include version info into generated file |
||||
- fixed e-mail in almost all head comments |
||||
|
||||
* 1.1.2 build 2010032722 |
||||
|
||||
- full integration with TCPDF thanks to Nicola Asuni, it's author |
||||
- fixed bug with alphanumeric encoding detection |
||||
|
||||
* 1.1.3 build 2010081807 |
||||
|
||||
- short opening tags replaced with standard ones |
||||
|
||||
* 1.1.4 build 2010100721 |
||||
|
||||
- added missing static keyword QRinput::check (found by Luke Brookhart, Onjax LLC) |
@ -1,67 +0,0 @@
|
||||
== REQUIREMENTS == |
||||
|
||||
* PHP5 |
||||
* PHP GD2 extension with JPEG and PNG support |
||||
|
||||
== INSTALLATION == |
||||
|
||||
If you want to recreate cache by yourself make sure cache directory is |
||||
writable and you have permisions to write into it. Also make sure you are |
||||
able to read files in it if you have cache option enabled |
||||
|
||||
== CONFIGURATION == |
||||
|
||||
Feel free to modify config constants in qrconfig.php file. Read about it in |
||||
provided comments and project wiki page (links in README file) |
||||
|
||||
== QUICK START == |
||||
|
||||
Notice: probably you should'nt use all of this in same script :) |
||||
|
||||
<?phpb |
||||
|
||||
//include only that one, rest required files will be included from it |
||||
include "qrlib.php" |
||||
|
||||
//write code into file, Error corection lecer is lowest, L (one form: L,M,Q,H) |
||||
//each code square will be 4x4 pixels (4x zoom) |
||||
//code will have 2 code squares white boundary around |
||||
|
||||
QRcode::png('PHP QR Code :)', 'test.png', 'L', 4, 2); |
||||
|
||||
//same as above but outputs file directly into browser (with appr. header etc.) |
||||
//all other settings are default |
||||
//WARNING! it should be FIRST and ONLY output generated by script, otherwise |
||||
//rest of output will land inside PNG binary, breaking it for sure |
||||
QRcode::png('PHP QR Code :)'); |
||||
|
||||
//show benchmark |
||||
QRtools::timeBenchmark(); |
||||
|
||||
//rebuild cache |
||||
QRtools::buildCache(); |
||||
|
||||
//code generated in text mode - as a binary table |
||||
//then displayed out as HTML using Unicode block building chars :) |
||||
$tab = $qr->encode('PHP QR Code :)'); |
||||
QRspec::debug($tab, true); |
||||
|
||||
== TCPDF INTEGRATION == |
||||
|
||||
Inside bindings/tcpdf you will find slightly modified 2dbarcodes.php. |
||||
Instal phpqrcode liblaty inside tcpdf folder, then overwrite (or merge) |
||||
2dbarcodes.php |
||||
|
||||
Then use similar as example #50 from TCPDF examples: |
||||
|
||||
<?php |
||||
|
||||
$style = array( |
||||
'border' => true, |
||||
'padding' => 4, |
||||
'fgcolor' => array(0,0,0), |
||||
'bgcolor' => false, //array(255,255,255) |
||||
); |
||||
|
||||
//code name: QR, specify error correction level after semicolon (L,M,Q,H) |
||||
$pdf->write2DBarcode('PHP QR Code :)', 'QR,L', '', '', 30, 30, $style, 'N'); |
@ -1,165 +0,0 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE |
||||
Version 3, 29 June 2007 |
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> |
||||
Everyone is permitted to copy and distribute verbatim copies |
||||
of this license document, but changing it is not allowed. |
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates |
||||
the terms and conditions of version 3 of the GNU General Public |
||||
License, supplemented by the additional permissions listed below. |
||||
|
||||
0. Additional Definitions. |
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser |
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU |
||||
General Public License. |
||||
|
||||
"The Library" refers to a covered work governed by this License, |
||||
other than an Application or a Combined Work as defined below. |
||||
|
||||
An "Application" is any work that makes use of an interface provided |
||||
by the Library, but which is not otherwise based on the Library. |
||||
Defining a subclass of a class defined by the Library is deemed a mode |
||||
of using an interface provided by the Library. |
||||
|
||||
A "Combined Work" is a work produced by combining or linking an |
||||
Application with the Library. The particular version of the Library |
||||
with which the Combined Work was made is also called the "Linked |
||||
Version". |
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the |
||||
Corresponding Source for the Combined Work, excluding any source code |
||||
for portions of the Combined Work that, considered in isolation, are |
||||
based on the Application, and not on the Linked Version. |
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the |
||||
object code and/or source code for the Application, including any data |
||||
and utility programs needed for reproducing the Combined Work from the |
||||
Application, but excluding the System Libraries of the Combined Work. |
||||
|
||||
1. Exception to Section 3 of the GNU GPL. |
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License |
||||
without being bound by section 3 of the GNU GPL. |
||||
|
||||
2. Conveying Modified Versions. |
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a |
||||
facility refers to a function or data to be supplied by an Application |
||||
that uses the facility (other than as an argument passed when the |
||||
facility is invoked), then you may convey a copy of the modified |
||||
version: |
||||
|
||||
a) under this License, provided that you make a good faith effort to |
||||
ensure that, in the event an Application does not supply the |
||||
function or data, the facility still operates, and performs |
||||
whatever part of its purpose remains meaningful, or |
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of |
||||
this License applicable to that copy. |
||||
|
||||
3. Object Code Incorporating Material from Library Header Files. |
||||
|
||||
The object code form of an Application may incorporate material from |
||||
a header file that is part of the Library. You may convey such object |
||||
code under terms of your choice, provided that, if the incorporated |
||||
material is not limited to numerical parameters, data structure |
||||
layouts and accessors, or small macros, inline functions and templates |
||||
(ten or fewer lines in length), you do both of the following: |
||||
|
||||
a) Give prominent notice with each copy of the object code that the |
||||
Library is used in it and that the Library and its use are |
||||
covered by this License. |
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license |
||||
document. |
||||
|
||||
4. Combined Works. |
||||
|
||||
You may convey a Combined Work under terms of your choice that, |
||||
taken together, effectively do not restrict modification of the |
||||
portions of the Library contained in the Combined Work and reverse |
||||
engineering for debugging such modifications, if you also do each of |
||||
the following: |
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that |
||||
the Library is used in it and that the Library and its use are |
||||
covered by this License. |
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license |
||||
document. |
||||
|
||||
c) For a Combined Work that displays copyright notices during |
||||
execution, include the copyright notice for the Library among |
||||
these notices, as well as a reference directing the user to the |
||||
copies of the GNU GPL and this license document. |
||||
|
||||
d) Do one of the following: |
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this |
||||
License, and the Corresponding Application Code in a form |
||||
suitable for, and under terms that permit, the user to |
||||
recombine or relink the Application with a modified version of |
||||
the Linked Version to produce a modified Combined Work, in the |
||||
manner specified by section 6 of the GNU GPL for conveying |
||||
Corresponding Source. |
||||
|
||||
1) Use a suitable shared library mechanism for linking with the |
||||
Library. A suitable mechanism is one that (a) uses at run time |
||||
a copy of the Library already present on the user's computer |
||||
system, and (b) will operate properly with a modified version |
||||
of the Library that is interface-compatible with the Linked |
||||
Version. |
||||
|
||||
e) Provide Installation Information, but only if you would otherwise |
||||
be required to provide such information under section 6 of the |
||||
GNU GPL, and only to the extent that such information is |
||||
necessary to install and execute a modified version of the |
||||
Combined Work produced by recombining or relinking the |
||||
Application with a modified version of the Linked Version. (If |
||||
you use option 4d0, the Installation Information must accompany |
||||
the Minimal Corresponding Source and Corresponding Application |
||||
Code. If you use option 4d1, you must provide the Installation |
||||
Information in the manner specified by section 6 of the GNU GPL |
||||
for conveying Corresponding Source.) |
||||
|
||||
5. Combined Libraries. |
||||
|
||||
You may place library facilities that are a work based on the |
||||
Library side by side in a single library together with other library |
||||
facilities that are not Applications and are not covered by this |
||||
License, and convey such a combined library under terms of your |
||||
choice, if you do both of the following: |
||||
|
||||
a) Accompany the combined library with a copy of the same work based |
||||
on the Library, uncombined with any other library facilities, |
||||
conveyed under the terms of this License. |
||||
|
||||
b) Give prominent notice with the combined library that part of it |
||||
is a work based on the Library, and explaining where to find the |
||||
accompanying uncombined form of the same work. |
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License. |
||||
|
||||
The Free Software Foundation may publish revised and/or new versions |
||||
of the GNU Lesser General Public License from time to time. Such new |
||||
versions will be similar in spirit to the present version, but may |
||||
differ in detail to address new problems or concerns. |
||||
|
||||
Each version is given a distinguishing version number. If the |
||||
Library as you received it specifies that a certain numbered version |
||||
of the GNU Lesser General Public License "or any later version" |
||||
applies to it, you have the option of following the terms and |
||||
conditions either of that published version or of any later version |
||||
published by the Free Software Foundation. If the Library as you |
||||
received it does not specify a version number of the GNU Lesser |
||||
General Public License, you may choose any version of the GNU Lesser |
||||
General Public License ever published by the Free Software Foundation. |
||||
|
||||
If the Library as you received it specifies that a proxy can decide |
||||
whether future versions of the GNU Lesser General Public License shall |
||||
apply, that proxy's public statement of acceptance of any version is |
||||
permanent authorization for you to choose that version for the |
||||
Library. |
@ -1,45 +0,0 @@
|
||||
This is PHP implementation of QR Code 2-D barcode generator. It is pure-php |
||||
LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi. |
||||
|
||||
== LICENSING == |
||||
|
||||
Copyright (C) 2010 by Dominik Dzienia |
||||
|
||||
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 (LICENSE file) |
||||
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 |
||||
|
||||
== INSTALATION AND USAGE == |
||||
|
||||
* INSTALL file |
||||
* http://sourceforge.net/apps/mediawiki/phpqrcode/index.php?title=Main_Page |
||||
|
||||
== CONTACT == |
||||
|
||||
Fell free to contact me via e-mail (deltalab at poczta dot fm) or using |
||||
folowing project pages: |
||||
|
||||
* http://sourceforge.net/projects/phpqrcode/ |
||||
* http://phpqrcode.sourceforge.net/ |
||||
|
||||
== ACKNOWLEDGMENTS == |
||||
|
||||
Based on C libqrencode library (ver. 3.1.1) |
||||
Copyright (C) 2006-2010 by Kentaro Fukuchi |
||||
http://megaui.net/fukuchi/works/qrencode/index.en.html |
||||
|
||||
QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other |
||||
countries. |
||||
|
||||
Reed-Solomon code encoder is written by Phil Karn, KA9Q. |
||||
Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q |
||||
|
@ -1,2875 +0,0 @@
|
||||
<?php |
||||
//============================================================+ |
||||
// File name : qrcode.php |
||||
// Begin : 2010-03-22 |
||||
// Last Update : 2010-03-29 |
||||
// Version : 1.0.002 |
||||
// License : GNU LGPL v.3 (http://www.gnu.org/copyleft/lesser.html) |
||||
// ---------------------------------------------------------------------------- |
||||
// |
||||
// 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 |
||||
// or browse http://www.gnu.org/copyleft/lesser.html |
||||
// |
||||
// ---------------------------------------------------------------------------- |
||||
// |
||||
// DESCRIPTION : |
||||
// |
||||
// Class to create QR-code arrays for TCPDF class. |
||||
// QR Code symbol is a 2D barcode that can be scanned by |
||||
// handy terminals such as a mobile phone with CCD. |
||||
// The capacity of QR Code is up to 7000 digits or 4000 |
||||
// characters, and has high robustness. |
||||
// This class supports QR Code model 2, described in |
||||
// JIS (Japanese Industrial Standards) X0510:2004 |
||||
// or ISO/IEC 18004. |
||||
// Currently the following features are not supported: |
||||
// ECI and FNC1 mode, Micro QR Code, QR Code model 1, |
||||
// Structured mode. |
||||
// |
||||
// This class is derived from the following projects: |
||||
// --------------------------------------------------------- |
||||
// "PHP QR Code encoder" |
||||
// License: GNU-LGPLv3 |
||||
// Copyright (C) 2010 by Dominik Dzienia <deltalab at poczta dot fm> |
||||
// http://phpqrcode.sourceforge.net/ |
||||
// https://sourceforge.net/projects/phpqrcode/ |
||||
// |
||||
// The "PHP QR Code encoder" is based on |
||||
// "C libqrencode library" (ver. 3.1.1) |
||||
// License: GNU-LGPL 2.1 |
||||
// Copyright (C) 2006-2010 by Kentaro Fukuchi |
||||
// http://megaui.net/fukuchi/works/qrencode/index.en.html |
||||
// |
||||
// Reed-Solomon code encoder is written by Phil Karn, KA9Q. |
||||
// Copyright (C) 2002-2006 Phil Karn, KA9Q |
||||
// |
||||
// QR Code is registered trademark of DENSO WAVE INCORPORATED |
||||
// http://www.denso-wave.com/qrcode/index-e.html |
||||
// --------------------------------------------------------- |
||||
// |
||||
// Author: Nicola Asuni |
||||
// |
||||
// (c) Copyright 2010: |
||||
// Nicola Asuni |
||||
// Tecnick.com S.r.l. |
||||
// Via della Pace, 11 |
||||
// 09044 Quartucciu (CA) |
||||
// ITALY |
||||
// www.tecnick.com |
||||
// info@tecnick.com |
||||
//============================================================+ |
||||
|
||||
/** |
||||
* Class to create QR-code arrays for TCPDF class. |
||||
* QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. |
||||
* The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. |
||||
* This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. |
||||
* Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. |
||||
* |
||||
* This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). |
||||
* Please read comments on this class source file for full copyright and license information. |
||||
* |
||||
* @package com.tecnick.tcpdf |
||||
* @abstract Class for generating QR-code array for TCPDF. |
||||
* @author Nicola Asuni |
||||
* @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com |
||||
* @link http://www.tcpdf.org |
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL |
||||
* @version 1.0.002 |
||||
*/ |
||||
|
||||
// definitions |
||||
if (!defined('QRCODEDEFS')) { |
||||
|
||||
/** |
||||
* Indicate that definitions for this class are set |
||||
*/ |
||||
define('QRCODEDEFS', true); |
||||
|
||||
// ----------------------------------------------------- |
||||
|
||||
// Encoding modes (characters which can be encoded in QRcode) |
||||
|
||||
/** |
||||
* Encoding mode |
||||
*/ |
||||
define('QR_MODE_NL', -1); |
||||
|
||||
/** |
||||
* Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. |
||||
*/ |
||||
define('QR_MODE_NM', 0); |
||||
|
||||
/** |
||||
* Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. |
||||
*/ |
||||
define('QR_MODE_AN', 1); |
||||
|
||||
/** |
||||
* Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. |
||||
*/ |
||||