You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
1.9 KiB

  1. <?php
  2. define('IN_CB', true);
  3. include('include/header.php');
  4. $default_value['checksum'] = '';
  5. $checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
  6. registerImageKey('checksum', $checksum);
  7. registerImageKey('code', 'BCGcode39extended');
  8. $vals = array();
  9. for($i = 0; $i <= 127; $i++) {
  10. $vals[] = '%' . sprintf('%02X', $i);
  11. }
  12. $characters = array(
  13. 'NUL', 'SOH', 'STX', 'ETX', 'EOT', 'ENQ', 'ACK', 'BEL', 'BS', 'TAB', 'LF', 'VT', 'FF', 'CR', 'SO', 'SI', 'DLE', 'DC1', 'DC2', 'DC3', 'DC4', 'NAK', 'SYN', 'ETB', 'CAN', 'EM', 'SUB', 'ESC', 'FS', 'GS', 'RS', 'US',
  14. '&nbsp;', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
  15. '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
  16. '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', 'DEL'
  17. );
  18. ?>
  19. <ul id="specificOptions">
  20. <li class="option">
  21. <div class="title">
  22. <label for="checksum">Checksum</label>
  23. </div>
  24. <div class="value">
  25. <?php echo getCheckboxHtml('checksum', $checksum, array('value' => 1)); ?>
  26. </div>
  27. </li>
  28. </ul>
  29. <div id="validCharacters">
  30. <h3>Valid Characters</h3>
  31. <?php $c = count($characters); for ($i = 0; $i < $c; $i++) { echo getButton($characters[$i], $vals[$i]); } ?>
  32. </div>
  33. <div id="explanation">
  34. <h3>Explanation</h3>
  35. <ul>
  36. <li>Supports the ASCII 0 to 127.</li>
  37. <li>This mode is "optional" for Code 39, you have to specify your reader that you have extended code.</li>
  38. <li>Your browser may not be able to write the special characters (NUL, SOH, etc.) but you can write them with the code.</li>
  39. </ul>
  40. </div>
  41. <?php
  42. include('include/footer.php');
  43. ?>