qrconst.php 585 B

12345678910111213141516171819202122232425
  1. <?php
  2. class qrstr
  3. {
  4. static public function set(&$srctab, $x, $y, $repl, $replLen = false)
  5. {
  6. $srctab[$y] = substr_replace($srctab[$y], $replLen !== false ? substr($repl, 0, $replLen) : $repl, $x, $replLen !== false ? $replLen : strlen($repl));
  7. }
  8. }
  9. define('QR_MODE_NUL', -1);
  10. define('QR_MODE_NUM', 0);
  11. define('QR_MODE_AN', 1);
  12. define('QR_MODE_8', 2);
  13. define('QR_MODE_KANJI', 3);
  14. define('QR_MODE_STRUCTURE', 4);
  15. define('QR_ECLEVEL_L', 0);
  16. define('QR_ECLEVEL_M', 1);
  17. define('QR_ECLEVEL_Q', 2);
  18. define('QR_ECLEVEL_H', 3);
  19. define('QR_FORMAT_TEXT', 0);
  20. define('QR_FORMAT_PNG', 1);
  21. ?>