1. Import
This commit is contained in:
1 parent
b0e00c1259
commit
a1129565af
4899 files changed
+3007593
No files matched your search
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test with embedded image</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="test_code39.php?text=Code39 from html" alt="barcode" />
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"require": {
|
||||
"barcode-bakery/barcode-common": ">=7.0.3",
|
||||
"barcode-bakery/barcode-1d": "7.0.4",
|
||||
"barcode-bakery/gs1ai": ">=1.0"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGcodabar');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '$', ':', '/', '.', '+', 'A', 'B', 'C', 'D');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Known also as Ames Code, NW-7, Monarch, 2 of 7, Rationalized Codabar.</li>
|
||||
<li>Codabar was developed in 1972 by Pitney Bowes, Inc.</li>
|
||||
<li>This symbology is useful to encode digital information. It is a self-checking code, there is no check digit.</li>
|
||||
<li>Codabar is used by blood bank, photo labs, library, FedEx...</li>
|
||||
<li>Coding can be with an unspecified length composed by numbers, plus and minus sign, colon, slash, dot, dollar.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGcode11');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Known also as USD-8.</li>
|
||||
<li>Code 11 was developed in 1977 as a high-density numeric symbology.</li>
|
||||
<li>Used to identify telecommunications equipment.</li>
|
||||
<li>Code 11 is a numeric symbology and its character set consists of 10 digital characters and the dash symbol (-).</li>
|
||||
<li>There is a "C" check digit. If the length of encoded message is greater thant 10, a "K" check digit may be used.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['start'] = '';
|
||||
$start = isset($_POST['start']) ? $_POST['start'] : $default_value['start'];
|
||||
registerImageKey('start', $start);
|
||||
registerImageKey('code', 'BCGcode128');
|
||||
|
||||
$vals = array();
|
||||
for ($i = 0; $i <= 127; $i++) {
|
||||
$vals[] = '%' . sprintf('%02X', $i);
|
||||
}
|
||||
$characters = array(
|
||||
'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',
|
||||
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
'@', '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', '[', '\\', ']', '^', '_',
|
||||
'`', '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'
|
||||
);
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="start">Starts with</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getSelectHtml('start', $start, array('NULL' => 'Auto', 'A' => 'Code 128-A', 'B' => 'Code 128-B', 'C' => 'Code 128-C')); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php $c = count($characters); for ($i = 0; $i < $c; $i++) {
|
||||
echo getButton($characters[$i], $vals[$i]);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Code 128 is a high-density alphanumeric symbology.</li>
|
||||
<li>Used extensively worldwide.</li>
|
||||
<li>Code 128 is designed to encode 128 full ASCII characters.</li>
|
||||
<li>The symbology includes a checksum digit.</li>
|
||||
<li>Code 128A handles capital letters<br />Code 128B handles capital letters and lowercase<br />Code 128C handles group of 2 numbers</li>
|
||||
<li>Your browser may not be able to write the special characters (NUL, SOH, etc.) but you can write them with the code.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['checksum'] = '';
|
||||
$checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
|
||||
registerImageKey('checksum', $checksum);
|
||||
registerImageKey('code', 'BCGcode39');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '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', '-', '.', ' ', '$', '/', '+', '%');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="checksum">Checksum</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getCheckboxHtml('checksum', $checksum, array('value' => 1)); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Known also as USS Code 39, 3 of 9.</li>
|
||||
<li>Code 39 can encode alphanumeric characters.</li>
|
||||
<li>The symbology is used in non-retail environment.</li>
|
||||
<li>Code 39 is designed to encode 26 upper case letters, 10 digits and 7 special characters.</li>
|
||||
<li>Code 39 has a checksum but it's rarely used.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['checksum'] = '';
|
||||
$checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
|
||||
registerImageKey('checksum', $checksum);
|
||||
registerImageKey('code', 'BCGcode39extended');
|
||||
|
||||
$vals = array();
|
||||
for ($i = 0; $i <= 127; $i++) {
|
||||
$vals[] = '%' . sprintf('%02X', $i);
|
||||
}
|
||||
$characters = array(
|
||||
'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',
|
||||
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
'@', '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', '[', '\\', ']', '^', '_',
|
||||
'`', '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'
|
||||
);
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="checksum">Checksum</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getCheckboxHtml('checksum', $checksum, array('value' => 1)); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php $c = count($characters); for ($i = 0; $i < $c; $i++) {
|
||||
echo getButton($characters[$i], $vals[$i]);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Supports the ASCII 0 to 127.</li>
|
||||
<li>This mode is "optional" for Code 39, you have to specify your reader that you have extended code.</li>
|
||||
<li>Your browser may not be able to write the special characters (NUL, SOH, etc.) but you can write them with the code.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGcode93');
|
||||
|
||||
$vals = array();
|
||||
for ($i = 0; $i <= 127; $i++) {
|
||||
$vals[] = '%' . sprintf('%02X', $i);
|
||||
}
|
||||
$characters = array(
|
||||
'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',
|
||||
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
'@', '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', '[', '\\', ']', '^', '_',
|
||||
'`', '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'
|
||||
);
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php $c = count($characters); for ($i = 0; $i < $c; $i++) {
|
||||
echo getButton($characters[$i], $vals[$i]);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Known also as USS Code 93.</li>
|
||||
<li>Code 93 was designed to provide a higher density and data security enhancement to Code 39.</li>
|
||||
<li>Used primarily by Canadian postal office to encode supplementary delivery information.</li>
|
||||
<li>Similar to Code 39, Code 93 has the same 43 characters plus 5 special ones to encode the ASCII 0 to 127.</li>
|
||||
<li>This symbology composed of 2 check digits ("C" and "K").</li>
|
||||
<li>Your browser may not be able to write the special characters (NUL, SOH, etc.) but you can write them with the code.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGean13');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>EAN means Internal Article Numbering.</li>
|
||||
<li>It is an extension of UPC-A to include the country information.</li>
|
||||
<li>Used with consumer products internationally.</li>
|
||||
<li>Composed by 2 number system, 5 manufacturer code, 5 product code and 1 check digit.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGean8');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>EAN-8 is a short version of EAN-13.</li>
|
||||
<li>Composed by 7 digits and 1 check digit.</li>
|
||||
<li>There is no conversion available between EAN-8 and EAN-13.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['start'] = 'C';
|
||||
$start = isset($_POST['start']) ? $_POST['start'] : $default_value['start'];
|
||||
registerImageKey('start', $start);
|
||||
|
||||
$identifiers = new stdClass;
|
||||
$identifiers->{''} = 'Select an identifier';
|
||||
|
||||
if (class_exists('BarcodeBakery\Common\GS1\GS1AI')) {
|
||||
foreach (BarcodeBakery\Common\GS1\GS1AI::getDefaultAIData() as $aiData) {
|
||||
$identifiers->{$aiData->getAI()} = $aiData->getAI() . ' - ' . $aiData->getDescription();
|
||||
}
|
||||
} else {
|
||||
$identifiers->{'0'} = 'Load the package barcode-bakery/gs1ai to populate this list.';
|
||||
}
|
||||
|
||||
registerImageKey('code', 'BCGgs1128');
|
||||
|
||||
$vals = array();
|
||||
for ($i = 0; $i <= 127; $i++) {
|
||||
$vals[] = '%' . sprintf('%02X', $i);
|
||||
}
|
||||
$characters = array(
|
||||
'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',
|
||||
' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?',
|
||||
'@', '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', '[', '\\', ']', '^', '_',
|
||||
'`', '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'
|
||||
);
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="start">Starts with</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getSelectHtml('start', $start, array('NULL' => 'Auto', 'A' => 'Code 128-A', 'B' => 'Code 128-B', 'C' => 'Code 128-C')); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="identifier">Identifiers</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getSelectHtml('identifier', null, $identifiers, array('style' => 'width: 100%')); ?>
|
||||
<div id="identifierContainer"></div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php $c = count($characters); for ($i = 0; $i < $c; $i++) {
|
||||
echo getButton($characters[$i], $vals[$i]);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Encoded as Code 128.</li>
|
||||
<li>The former correct name was UCC/EAN-128.</li>
|
||||
<li>Used for shipping containers.</li>
|
||||
<li>Based on the GS1 standard.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
var identifierSelect = $("#identifier"),
|
||||
identifierContainer = $("#identifierContainer"),
|
||||
generateText = $("#text");
|
||||
|
||||
var updateText = function() {
|
||||
var text = "";
|
||||
$(".gs1128_identifier").each(function() {
|
||||
var $this = $(this);
|
||||
text += "(" + $this.find(".gs1128_id").val() + ")" + $this.find(".gs1128_value").val() + "~F1";
|
||||
});
|
||||
text = text.substring(0, text.length - 3);
|
||||
generateText.val(text);
|
||||
};
|
||||
|
||||
var addIdentifier = function(id) {
|
||||
var identifier = $("<div class='gs1128_identifier'><input type='text' value='" + id + "' class='gs1128_id' readonly='readonly' /> - <input type='text' class='gs1128_value' /><a href='#' class='gs1128_delete'><img src='delete.png' alt='Delete' /></a></div>")
|
||||
.appendTo(identifierContainer)
|
||||
|
||||
identifier.find(".gs1128_delete").on("click", function() {
|
||||
$(this).closest(".gs1128_identifier").remove();
|
||||
updateText();
|
||||
return false;
|
||||
});
|
||||
identifier.find(".gs1128_value").on("keyup", function() {
|
||||
updateText();
|
||||
});
|
||||
|
||||
identifierSelect.val();
|
||||
return;
|
||||
};
|
||||
|
||||
identifierSelect.change(function() {
|
||||
addIdentifier($(this).find("option:selected").val());
|
||||
updateText();
|
||||
});
|
||||
|
||||
generateText.on("keyup", function() {
|
||||
var val = $(this).val(),
|
||||
section = val.split("~F1"),
|
||||
i = 0, regex = /^\(([0-9]*y?)\)(.*)$/,
|
||||
result;
|
||||
|
||||
// Let's remove all identifiers we put already
|
||||
$(".gs1128_identifier").remove();
|
||||
for (i = 0; i < section.length; i++) {
|
||||
// we are able to handle only if you have ()
|
||||
result = regex.exec(section[i]);
|
||||
if (result.length === 3) {
|
||||
addIdentifier(result[1]);
|
||||
$(".gs1128_identifier").eq(i).find(".gs1128_value").val(result[2]);
|
||||
} else {
|
||||
// Oups, you entered something wrong...
|
||||
$(".gs1128_identifier").remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function() {
|
||||
if (generateText.val() !== "") {
|
||||
generateText.keyup();
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['checksum'] = '';
|
||||
$checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
|
||||
registerImageKey('checksum', $checksum);
|
||||
registerImageKey('code', 'BCGi25');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="checksum">Checksum</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getCheckboxHtml('checksum', $checksum, array('value' => 1)); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Interleaved 2 of 5 is based on Standard 2 of 5 symbology.</li>
|
||||
<li>There is an optional checksum.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
if (!function_exists('bcadd')) {
|
||||
exit('The mathematical extension bcmath is not installed on your server.');
|
||||
}
|
||||
|
||||
$default_value['barcodeIdentifier'] = '';
|
||||
$barcodeIdentifier = isset($_POST['barcodeIdentifier']) ? $_POST['barcodeIdentifier'] : $default_value['barcodeIdentifier'];
|
||||
registerImageKey('barcodeIdentifier', $barcodeIdentifier);
|
||||
|
||||
$default_value['serviceType'] = '';
|
||||
$serviceType = isset($_POST['serviceType']) ? $_POST['serviceType'] : $default_value['serviceType'];
|
||||
registerImageKey('serviceType', $serviceType);
|
||||
|
||||
$default_value['mailerIdentifier'] = '';
|
||||
$mailerIdentifier = isset($_POST['mailerIdentifier']) ? $_POST['mailerIdentifier'] : $default_value['mailerIdentifier'];
|
||||
registerImageKey('mailerIdentifier', $mailerIdentifier);
|
||||
|
||||
$default_value['serialNumber'] = '';
|
||||
$serialNumber = isset($_POST['serialNumber']) ? $_POST['serialNumber'] : $default_value['serialNumber'];
|
||||
registerImageKey('serialNumber', $serialNumber);
|
||||
|
||||
registerImageKey('code', 'BCGintelligentmail');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="barcodeIdentifier">Barcode Identifier</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('barcodeIdentifier', $barcodeIdentifier, array('type' => 'text', 'maxlength' => 2, 'required' => 'required')); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="serviceType">Service Type</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('serviceType', $serviceType, array('type' => 'text', 'maxlength' => 3, 'required' => 'required')); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="mailerIdentifier">Mailer Identifier</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('mailerIdentifier', $mailerIdentifier, array('type' => 'text', 'maxlength' => 9, 'required' => 'required')); ?>
|
||||
</div>
|
||||
</li>
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="serialNumber">Serial Number</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('serialNumber', $serialNumber, array('type' => 'text', 'maxlength' => 9, 'required' => 'required')); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Used to encode enveloppe in USA.</li>
|
||||
<li>
|
||||
You can provide
|
||||
<br />5 digits (ZIP Code)
|
||||
<br />9 digits (ZIP+4 code)
|
||||
<br />11 digits (ZIP+4 code+2 digits)
|
||||
</li>
|
||||
<li>Contains a barcode identifier, service type identifier, mailer id and serial number.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
$(function() {
|
||||
var thickness = $("#thickness")
|
||||
.val(9)
|
||||
.removeAttr("min step")
|
||||
.prop("disabled", true);
|
||||
|
||||
$("form").on("submit", function() {
|
||||
thickness.prop("disabled", false);
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGisbn');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>ISBN stands for International Standard Book Number.</li>
|
||||
<li>ISBN type is based on EAN-13.</li>
|
||||
<li>Previously, all ISBN were in EAN-10 format. EAN-13 uses the same encoding but may contain different data in the ISBN number.</li>
|
||||
<li>Composed by a GS1 prefix (for ISBN-13), a group identifier, a publisher code, an item number and a check digit.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['checksum'] = '0';
|
||||
$checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
|
||||
registerImageKey('checksum', $checksum);
|
||||
registerImageKey('code', 'BCGmsi');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="checksum">Checksum</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('checksum', $checksum, array('type' => 'number', 'min' => 0, 'max' => 2)); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Developed by the MSI Data Corporation.</li>
|
||||
<li>Used primarily to mark retail shelves for inventory control.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['label'] = '';
|
||||
$label = isset($_POST['label']) ? $_POST['label'] : $default_value['label'];
|
||||
registerImageKey('label', $label);
|
||||
registerImageKey('code', 'BCGothercode');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="label">Label</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getInputTextHtml('label', $label); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Enter width of each bars with one characters. Begin by a bar.</li>
|
||||
<li>10523: Will do 2px bar, 1px space, 6px bar, 3px space, 4px bar.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGpostnet');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Used to encode enveloppe in USA.</li>
|
||||
<li>
|
||||
You can provide
|
||||
<br />5 digits (ZIP Code)
|
||||
<br />9 digits (ZIP+4 code)
|
||||
<br />11 digits (ZIP+4 code+2 digits)
|
||||
<br />(Those 2 digits are taken from your address. If your address is 6453, the code will be 53.)
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
$(function() {
|
||||
var thickness = $("#thickness")
|
||||
.val(9)
|
||||
.removeAttr("min step")
|
||||
.prop("disabled", true);
|
||||
|
||||
$("form").on("submit", function() {
|
||||
thickness.prop("disabled", false);
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
$default_value['checksum'] = '';
|
||||
$checksum = isset($_POST['checksum']) ? $_POST['checksum'] : $default_value['checksum'];
|
||||
registerImageKey('checksum', $checksum);
|
||||
registerImageKey('code', 'BCGs25');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<ul id="specificOptions">
|
||||
<li class="option">
|
||||
<div class="title">
|
||||
<label for="checksum">Checksum</label>
|
||||
</div>
|
||||
<div class="value">
|
||||
<?php echo getCheckboxHtml('checksum', $checksum, array('value' => 1)); ?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Known also as Industrial 2 of 5.</li>
|
||||
<li>Standard 2 of 5 is a low-density numeric symbology that has been with us since the 1960s.</li>
|
||||
<li>There is an optional checksum.</li>
|
||||
<li>Note: Standard 2 of 5 is really tough to read!</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGupca');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Encoded as EAN-13.</li>
|
||||
<li>Most common and well-known in the USA.</li>
|
||||
<li>There is 1 number system (NS), 5 manufacturer code, 5 product code and 1 check digit.</li>
|
||||
<li>
|
||||
NS Description :
|
||||
<br />0 = Regular UPC Code
|
||||
<br />2 = Weight Items
|
||||
<br />3 = Drug/Health Items
|
||||
<br />4 = In-Store Use on Non-Food Items
|
||||
<br />5 = Coupons
|
||||
<br />7 = Regular UPC Code
|
||||
<br />And other are Reserved.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGupce');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Short version of UPC symbol, 8 characters.</li>
|
||||
<li>It is a conversion of an UPC-A for small package.</li>
|
||||
<li>You can provide directly an UPC-A (11 chars) or UPC-E (6 chars) code.</li>
|
||||
<li>UPC-E contain a system number and a check digit.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGupcext2');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Extension for UPC-A, UPC-E, EAN-13 and EAN-8.</li>
|
||||
<li>Used for encode additional information for newspaper, books...</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
define('IN_CB', true);
|
||||
include('include/header.php');
|
||||
|
||||
registerImageKey('code', 'BCGupcext5');
|
||||
|
||||
$characters = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
|
||||
?>
|
||||
|
||||
<div id="validCharacters">
|
||||
<h3>Valid Characters</h3>
|
||||
<?php foreach ($characters as $character) {
|
||||
echo getButton($character);
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div id="explanation">
|
||||
<h3>Explanation</h3>
|
||||
<ul>
|
||||
<li>Extension for UPC-A, UPC-E, EAN-13 and EAN-8.</li>
|
||||
<li>Used to encode suggested retail price.</li>
|
||||
<li>If the first number is a 0, the price xx.xx is expressed in British Pounds. If it is a 5, it is expressed in US dollars.</li>
|
||||
<li>
|
||||
Special Code Description:
|
||||
<br />90000: No suggested retail price
|
||||
<br />99991: The item is a complementary of another one. Normally free
|
||||
<br />99990: Used bh National Association of College Stores to mark "used book"
|
||||
<br />90001 to 98999: Internal purposes for some publishers
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include('include/footer.php');
|
||||
?>
|
||||
@@ -0,0 +1,120 @@
|
||||
$(function() {
|
||||
var attachMainBehaviors = function() {
|
||||
$("select[name=type]").on("change", function() {
|
||||
var selected = $(this).find("option:selected");
|
||||
window.location.href = selected.val();
|
||||
});
|
||||
|
||||
$("select[name=filetype]").on("change", function() {
|
||||
var selected = $(this).find("option:selected"),
|
||||
val = selected.val(),
|
||||
dpi = $("input[name=dpi]"),
|
||||
dpiUnavailable = $("#dpiUnavailable");
|
||||
|
||||
if (val === "PNG" || val === "JPEG") {
|
||||
dpi.prop("disabled", false);
|
||||
dpiUnavailable.hide();
|
||||
} else {
|
||||
dpi.prop("disabled", true);
|
||||
dpiUnavailable.show();
|
||||
}
|
||||
}).change();
|
||||
|
||||
var text = $("input[name=text]");
|
||||
|
||||
$("#validCharacters").on("click", "[data-output]", function() {
|
||||
var $this = $(this),
|
||||
escaped = $this.data("escaped"),
|
||||
value = $this.data("output");
|
||||
if (escaped) {
|
||||
value = unescape(value);
|
||||
}
|
||||
|
||||
text
|
||||
.val(text.val() + value)
|
||||
.focus();
|
||||
});
|
||||
}, attachUIBehaviors = function() {
|
||||
$("table").each(function() {
|
||||
var $this = $(this);
|
||||
$this.find("tr:even").addClass("even");
|
||||
$this.find("tr:odd").addClass("odd");
|
||||
});
|
||||
}, attachSpecificBehaviors = function() {
|
||||
$("#specificOptions li").each(function() {
|
||||
var $this = $(this),
|
||||
code = $("<tr><td class='title'></td><td class='value'></td></tr>");
|
||||
code.find(".title").append($this.find(".title"));
|
||||
code.find(".value").append($this.find(".value"));
|
||||
|
||||
$("div.configurations tr:last").before(code);
|
||||
});
|
||||
}, attachInfoBehaviors = function() {
|
||||
var showTooltip = function(object) {
|
||||
object
|
||||
.on("mouseover", function() {
|
||||
var timer = $(this).data("timer");
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
})
|
||||
.on("mouseout", function() {
|
||||
var that = $(this);
|
||||
that.data("timer", setTimeout(function() {
|
||||
that.removeClass("visible");
|
||||
}, 1000));
|
||||
});
|
||||
|
||||
return function() {
|
||||
var $this = $(this),
|
||||
offset = $this.offset(),
|
||||
timer = object.data("timer");
|
||||
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
|
||||
// Show it once so we can get the outerWidth properly
|
||||
object
|
||||
.css({
|
||||
left: -99999,
|
||||
top: -99999
|
||||
})
|
||||
.addClass("visible")
|
||||
.css({
|
||||
left: offset.left + $this.width() - object.outerWidth(),
|
||||
top: offset.top + $this.height()
|
||||
});
|
||||
return false;
|
||||
};
|
||||
},
|
||||
hideTooltip = function(object) {
|
||||
return function() {
|
||||
object.data("timer", setTimeout(function() {
|
||||
object.removeClass("visible");
|
||||
}, 1000));
|
||||
};
|
||||
},
|
||||
bubbleize = function(object) {
|
||||
return object
|
||||
.addClass("bubble")
|
||||
.attr("role", "tooltip")
|
||||
.appendTo(document.body);
|
||||
},
|
||||
explanation = bubbleize($("#explanation")),
|
||||
validCharacters = bubbleize($("#validCharacters"));
|
||||
|
||||
$(".info.explanation")
|
||||
.on("mouseover focusin", showTooltip(explanation))
|
||||
.on("mouseout focusout", hideTooltip(explanation));
|
||||
|
||||
$(".info.characters")
|
||||
.on("mouseover focusin", showTooltip(validCharacters))
|
||||
.on("mouseout focusout", hideTooltip(validCharacters));
|
||||
};
|
||||
|
||||
attachSpecificBehaviors();
|
||||
attachMainBehaviors();
|
||||
attachUIBehaviors();
|
||||
attachInfoBehaviors();
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
use BarcodeBakery\Common\BCGFontFile;
|
||||
|
||||
function baseCustomSetup($barcode, $get)
|
||||
{
|
||||
$font_dir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'font';
|
||||
|
||||
if (isset($get['thickness'])) {
|
||||
$barcode->setThickness(max(9, min(90, intval($get['thickness']))));
|
||||
}
|
||||
|
||||
$font = 0;
|
||||
if ($get['font_family'] !== '0' && intval($get['font_size']) >= 1) {
|
||||
$font = new BCGFontFile($font_dir . '/' . $get['font_family'], intval($get['font_size']));
|
||||
}
|
||||
|
||||
$barcode->setFont($font);
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGcodabar.php';
|
||||
$className = 'BCGcodabar';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGcode11.php';
|
||||
$className = 'BCGcode11';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGcode128.php';
|
||||
$className = 'BCGcode128';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['start'])) {
|
||||
$barcode->setStart($get['start'] === 'NULL' ? null : $get['start']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGcode39.php';
|
||||
$className = 'BCGcode39';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['checksum'])) {
|
||||
$barcode->setChecksum($get['checksum'] === '1' ? true : false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGcode39extended.php';
|
||||
$className = 'BCGcode39extended';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['checksum'])) {
|
||||
$barcode->setChecksum($get['checksum'] === '1' ? true : false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGcode93.php';
|
||||
$className = 'BCGcode93';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGean13.php';
|
||||
$className = 'BCGean13';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGean8.php';
|
||||
$className = 'BCGean8';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$classFile = 'BCGgs1128.php';
|
||||
$className = 'BCGgs1128';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['start'])) {
|
||||
$barcode->setStart($get['start'] === 'NULL' ? null : $get['start']);
|
||||
}
|
||||
|
||||
$barcode->setApplicationIdentifiers(BarcodeBakery\Common\GS1\GS1AI::getDefaultAIData());
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGi25.php';
|
||||
$className = 'BCGi25';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['checksum'])) {
|
||||
$barcode->setChecksum($get['checksum'] === '1' ? true : false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGintelligentmail.php';
|
||||
$className = 'BCGintelligentmail';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['barcodeIdentifier']) && isset($get['serviceType']) && isset($get['mailerIdentifier']) && isset($get['serialNumber'])) {
|
||||
$barcode->setTrackingCode(intval($get['barcodeIdentifier']), intval($get['serviceType']), intval($get['mailerIdentifier']), intval($get['serialNumber']));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGisbn.php';
|
||||
$className = 'BCGisbn';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGmsi.php';
|
||||
$className = 'BCGmsi';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['checksum'])) {
|
||||
$barcode->setChecksum($get['checksum']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGothercode.php';
|
||||
$className = 'BCGothercode';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['label'])) {
|
||||
$barcode->setLabel($get['label']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGpostnet.php';
|
||||
$className = 'BCGpostnet';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$classFile = 'BCGs25.php';
|
||||
$className = 'BCGs25';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
|
||||
function customSetup($barcode, $get)
|
||||
{
|
||||
if (isset($get['checksum'])) {
|
||||
$barcode->setChecksum($get['checksum'] === '1' ? true : false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGupca.php';
|
||||
$className = 'BCGupca';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGupce.php';
|
||||
$className = 'BCGupce';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGupcext2.php';
|
||||
$className = 'BCGupcext2';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$classFile = 'BCGupcext5.php';
|
||||
$className = 'BCGupcext5';
|
||||
$baseClassFile = 'BCGBarcode1D.php';
|
||||
$codeVersion = '7.0.4';
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 438 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 288 B |
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
require __DIR__ . '../../vendor/autoload.php';
|
||||
|
||||
use BarcodeBakery\Common\BCGColor;
|
||||
use BarcodeBakery\Common\BCGDrawing;
|
||||
use BarcodeBakery\Common\BCGFontFile;
|
||||
use BarcodeBakery\Common\BCGLabel;
|
||||
|
||||
define('IN_CB', true);
|
||||
include_once('include/function.php');
|
||||
|
||||
function showError()
|
||||
{
|
||||
header('Content-Type: image/png');
|
||||
readfile('error.png');
|
||||
exit;
|
||||
}
|
||||
|
||||
$requiredKeys = array('code', 'filetype', 'dpi', 'scale', 'rotation', 'font_family', 'font_size', 'text');
|
||||
|
||||
// Check if everything is present in the request
|
||||
foreach ($requiredKeys as $key) {
|
||||
if (!isset($_GET[$key])) {
|
||||
showError();
|
||||
}
|
||||
}
|
||||
|
||||
if (!preg_match('/^[A-Za-z0-9]+$/', $_GET['code'])) {
|
||||
showError();
|
||||
}
|
||||
|
||||
$code = $_GET['code'];
|
||||
|
||||
// Check if the code is valid
|
||||
if (!file_exists('config' . DIRECTORY_SEPARATOR . $code . '.php')) {
|
||||
showError();
|
||||
}
|
||||
|
||||
include_once('config' . DIRECTORY_SEPARATOR . $code . '.php');
|
||||
|
||||
include_once('config' . DIRECTORY_SEPARATOR . $baseClassFile);
|
||||
|
||||
$filetypes = array('PNG' => BCGDrawing::IMG_FORMAT_PNG, 'JPEG' => BCGDrawing::IMG_FORMAT_JPEG, 'GIF' => BCGDrawing::IMG_FORMAT_GIF);
|
||||
$finalClassName = 'BarcodeBakery\\Barcode\\' . $className;
|
||||
|
||||
$drawException = null;
|
||||
$barcode = null;
|
||||
try {
|
||||
$colorBlack = new BCGColor(0, 0, 0);
|
||||
$colorWhite = new BCGColor(255, 255, 255);
|
||||
|
||||
$code_generated = new $finalClassName();
|
||||
|
||||
if (function_exists('baseCustomSetup')) {
|
||||
baseCustomSetup($code_generated, $_GET);
|
||||
}
|
||||
|
||||
if (function_exists('customSetup')) {
|
||||
customSetup($code_generated, $_GET);
|
||||
}
|
||||
|
||||
$code_generated->setScale(max(1, $_GET['scale']));
|
||||
$code_generated->setBackgroundColor($colorWhite);
|
||||
$code_generated->setForegroundColor($colorBlack);
|
||||
|
||||
if ($_GET['text'] !== '') {
|
||||
$text = convertText($_GET['text']);
|
||||
$code_generated->parse($text);
|
||||
}
|
||||
|
||||
$barcode = $code_generated;
|
||||
} catch (\Exception $exception) {
|
||||
$drawException = $exception;
|
||||
}
|
||||
|
||||
$drawing = new BCGDrawing($barcode, $colorWhite);
|
||||
if ($drawException) {
|
||||
$drawing->drawException($drawException);
|
||||
} else {
|
||||
$drawing->setRotationAngle($_GET['rotation']);
|
||||
$drawing->setDPI($_GET['dpi'] === 'NULL' ? null : max(72, min(300, intval($_GET['dpi']))));
|
||||
}
|
||||
|
||||
switch ($_GET['filetype']) {
|
||||
case 'PNG':
|
||||
header('Content-Type: image/png');
|
||||
break;
|
||||
case 'JPEG':
|
||||
header('Content-Type: image/jpeg');
|
||||
break;
|
||||
case 'GIF':
|
||||
header('Content-Type: image/gif');
|
||||
break;
|
||||
}
|
||||
|
||||
$drawing->finish($filetypes[$_GET['filetype']]);
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if (!defined('IN_CB')) {
|
||||
die('You are not allowed to access to this page.');
|
||||
}
|
||||
|
||||
$default_value['thickness'] = 30;
|
||||
$thickness = intval(isset($_POST['thickness']) ? $_POST['thickness'] : $default_value['thickness']);
|
||||
registerImageKey('thickness', $thickness);
|
||||
?>
|
||||
<tr>
|
||||
<td><label for="thickness">Thickness</label></td>
|
||||
<td><?php echo getInputTextHtml('thickness', $thickness, array('type' => 'number', 'min' => 20, 'max' => 90, 'step' => 5, 'required' => 'required')); ?></td>
|
||||
</tr>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// We could be more dynamic and open each file to find its name
|
||||
// But that would hinder the performance
|
||||
$supportedBarcodes = array(
|
||||
// 1D
|
||||
'BCGcodabar.php' => 'Codabar',
|
||||
'BCGcode11.php' => 'Code 11',
|
||||
'BCGcode39.php' => 'Code 39',
|
||||
'BCGcode39extended.php' => 'Code 39 Extended',
|
||||
'BCGcode93.php' => 'Code 93',
|
||||
'BCGcode128.php' => 'Code 128',
|
||||
'BCGean8.php' => 'EAN-8',
|
||||
'BCGean13.php' => 'EAN-13',
|
||||
'BCGgs1128.php' => 'GS1-128 (EAN-128)',
|
||||
'BCGisbn.php' => 'ISBN',
|
||||
'BCGi25.php' => 'Interleaved 2 of 5',
|
||||
'BCGs25.php' => 'Standard 2 of 5',
|
||||
'BCGmsi.php' => 'MSI Plessey',
|
||||
'BCGupca.php' => 'UPC-A',
|
||||
'BCGupce.php' => 'UPC-E',
|
||||
'BCGupcext2.php' => 'UPC Extenstion 2 Digits',
|
||||
'BCGupcext5.php' => 'UPC Extenstion 5 Digits',
|
||||
'BCGpostnet.php' => 'Postnet',
|
||||
'BCGintelligentmail.php' => 'Intelligent Mail',
|
||||
'BCGothercode.php' => 'Other Barcode',
|
||||
|
||||
// Databar
|
||||
'BCGdatabarexpanded.php' => 'Databar Expanded',
|
||||
'BCGdatabarlimited.php' => 'Databar Limited',
|
||||
'BCGdatabaromni.php' => 'Databar Omni',
|
||||
|
||||
// 2D
|
||||
'BCGaztec.php' => 'Aztec',
|
||||
'BCGdatamatrix.php' => 'DataMatrix',
|
||||
'BCGmaxicode.php' => 'MaxiCode',
|
||||
'BCGpdf417.php' => 'PDF417',
|
||||
'BCGqrcode.php' => 'QRCode'
|
||||
);
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if (!defined('IN_CB')) {
|
||||
die('You are not allowed to access to this page.');
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="output">
|
||||
<section class="output">
|
||||
<h3>Output</h3>
|
||||
<?php
|
||||
$finalRequest = '';
|
||||
foreach (getImageKeys() as $key => $value) {
|
||||
$finalRequest .= '&' . $key . '=' . urlencode($value);
|
||||
}
|
||||
if (strlen($finalRequest) > 0) {
|
||||
$finalRequest[0] = '?';
|
||||
}
|
||||
?>
|
||||
<div id="imageOutput">
|
||||
<?php if ($imageKeys['text'] !== '') {
|
||||
?><img src="image.php<?php echo $finalRequest; ?>" alt="Barcode Image" /><?php
|
||||
} else {
|
||||
?>Fill the form to generate a barcode.<?php
|
||||
} ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="footer">
|
||||
<footer>
|
||||
All Rights Reserved © <?php date_default_timezone_set('UTC'); echo date('Y'); ?> <a href="http://www.barcodebakery.com" target="_blank">Barcode Bakery</a>
|
||||
<br /><?php echo $code; ?> PHP-v<?php echo $codeVersion; ?>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
if (!defined('IN_CB')) {
|
||||
die('You are not allowed to access to this page.');
|
||||
}
|
||||
|
||||
$imageKeys = array();
|
||||
function registerImageKey($key, $value)
|
||||
{
|
||||
global $imageKeys;
|
||||
$imageKeys[$key] = $value;
|
||||
}
|
||||
|
||||
function getImageKeys()
|
||||
{
|
||||
global $imageKeys;
|
||||
return $imageKeys;
|
||||
}
|
||||
|
||||
function getElementHtml($tag, $attributes, $content = false)
|
||||
{
|
||||
$code = '<' . $tag;
|
||||
foreach ($attributes as $attribute => $value) {
|
||||
$code .= ' ' . $attribute . '="' . htmlentities(stripslashes($value), ENT_COMPAT) . '"';
|
||||
}
|
||||
|
||||
if ($content === false || $content === null) {
|
||||
$code .= ' />';
|
||||
} else {
|
||||
$code .= '>' . $content . '</' . $tag . '>';
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
function getInputTextHtml($name, $currentValue, $attributes = array())
|
||||
{
|
||||
$defaultAttributes = array(
|
||||
'id' => $name,
|
||||
'name' => $name
|
||||
);
|
||||
|
||||
$finalAttributes = array_merge($defaultAttributes, $attributes);
|
||||
if ($currentValue !== null) {
|
||||
$finalAttributes['value'] = $currentValue;
|
||||
}
|
||||
|
||||
return getElementHtml('input', $finalAttributes, false);
|
||||
}
|
||||
|
||||
function getOptionGroup($options, $currentValue)
|
||||
{
|
||||
$content = '';
|
||||
foreach ($options as $optionKey => $optionValue) {
|
||||
if (is_array($optionValue)) {
|
||||
$content .= '<optgroup label="' . $optionKey . '">' . getOptionGroup($optionValue, $currentValue) . '</optgroup>';
|
||||
} else {
|
||||
$optionAttributes = array();
|
||||
if ($currentValue == $optionKey) { // Keep weak
|
||||
$optionAttributes['selected'] = 'selected';
|
||||
}
|
||||
$content .= getOptionHtml($optionKey, $optionValue, $optionAttributes);
|
||||
}
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
function getOptionHtml($value, $content, $attributes = array())
|
||||
{
|
||||
$defaultAttributes = array(
|
||||
'value' => $value
|
||||
);
|
||||
|
||||
$finalAttributes = array_merge($defaultAttributes, $attributes);
|
||||
|
||||
return getElementHtml('option', $finalAttributes, $content);
|
||||
}
|
||||
|
||||
function getSelectHtml($name, $currentValue, $options, $attributes = array())
|
||||
{
|
||||
$defaultAttributes = array(
|
||||
'size' => 1,
|
||||
'id' => $name,
|
||||
'name' => $name
|
||||
);
|
||||
|
||||
$finalAttributes = array_merge($defaultAttributes, $attributes);
|
||||
$content = getOptionGroup($options, $currentValue);
|
||||
|
||||
return getElementHtml('select', $finalAttributes, $content);
|
||||
}
|
||||
|
||||
function getCheckboxHtml($name, $currentValue, $attributes = array())
|
||||
{
|
||||
$defaultAttributes = array(
|
||||
'type' => 'checkbox',
|
||||
'id' => $name,
|
||||
'name' => $name,
|
||||
'value' => isset($attributes['value']) ? $attributes['value'] : 'On'
|
||||
);
|
||||
|
||||
$finalAttributes = array_merge($defaultAttributes, $attributes);
|
||||
if ($currentValue == $finalAttributes['value']) { // Keep weak
|
||||
$finalAttributes['checked'] = 'checked';
|
||||
}
|
||||
|
||||
return getElementHtml('input', $finalAttributes, false);
|
||||
}
|
||||
|
||||
function getButton($value, $output = null)
|
||||
{
|
||||
$escaped = false;
|
||||
$finalValue = $value[0] === '&' ? $value : htmlentities($value);
|
||||
if ($output === null) {
|
||||
$output = $value;
|
||||
} else {
|
||||
$escaped = true;
|
||||
}
|
||||
|
||||
$code = '<input type="button" value="' . $finalValue . '" data-output="' . $output . '"' . ($escaped ? ' data-escaped="true"' : '') . ' />';
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the fonts available for drawing.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
function listfonts($folder)
|
||||
{
|
||||
$array = array();
|
||||
if (($handle = opendir($folder)) !== false) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
if (substr($file, -4, 4) === '.ttf') {
|
||||
$array[$file] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
array_unshift($array, 'No Label');
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the barcodes present for drawing.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
function listbarcodes()
|
||||
{
|
||||
include_once('barcode.php');
|
||||
|
||||
$availableBarcodes = array();
|
||||
foreach ($supportedBarcodes as $file => $title) {
|
||||
if (file_exists($file)) {
|
||||
$availableBarcodes[$file] = $title;
|
||||
}
|
||||
}
|
||||
|
||||
return $availableBarcodes;
|
||||
}
|
||||
|
||||
function findValueFromKey($haystack, $needle)
|
||||
{
|
||||
foreach ($haystack as $key => $value) {
|
||||
if (strcasecmp($key, $needle) === 0) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function convertText($text)
|
||||
{
|
||||
$text = stripslashes($text);
|
||||
if (function_exists('mb_convert_encoding')) {
|
||||
$text = mb_convert_encoding($text, 'ISO-8859-1', 'UTF-8');
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
if (!defined('IN_CB')) {
|
||||
die('You are not allowed to access to this page.');
|
||||
}
|
||||
|
||||
if (version_compare(phpversion(), '5.0.0', '>=') !== true) {
|
||||
exit('Sorry, but you have to run this script with PHP5... You currently have the version <b>' . phpversion() . '</b>.');
|
||||
}
|
||||
|
||||
if (!function_exists('imagecreate')) {
|
||||
exit('Sorry, make sure you have the GD extension installed before running this script.');
|
||||
}
|
||||
|
||||
include_once('function.php');
|
||||
|
||||
// FileName & Extension
|
||||
$system_temp_array = explode('/', $_SERVER['PHP_SELF']);
|
||||
$filename = $system_temp_array[count($system_temp_array) - 1];
|
||||
$system_temp_array2 = explode('.', $filename);
|
||||
$availableBarcodes = listBarcodes();
|
||||
$barcodeName = findValueFromKey($availableBarcodes, $filename);
|
||||
$code = $system_temp_array2[0];
|
||||
|
||||
// Check if the code is valid
|
||||
if (file_exists('config' . DIRECTORY_SEPARATOR . $code . '.php')) {
|
||||
include_once('config' . DIRECTORY_SEPARATOR . $code . '.php');
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo $barcodeName; ?> - Barcode Bakery</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link type="text/css" rel="stylesheet" href="style.css" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<script src="jquery-1.7.2.min.js"></script>
|
||||
<script src="barcode.js"></script>
|
||||
</head>
|
||||
<body class="<?php echo $code; ?>">
|
||||
|
||||
<?php
|
||||
$default_value = array();
|
||||
$default_value['filetype'] = 'PNG';
|
||||
$default_value['dpi'] = 72;
|
||||
$default_value['scale'] = isset($defaultScale) ? $defaultScale : 1;
|
||||
$default_value['rotation'] = 0;
|
||||
$default_value['font_family'] = 'Arial.ttf';
|
||||
$default_value['font_size'] = 8;
|
||||
$default_value['text'] = '';
|
||||
$default_value['a1'] = '';
|
||||
$default_value['a2'] = '';
|
||||
$default_value['a3'] = '';
|
||||
|
||||
$filetype = isset($_POST['filetype']) ? $_POST['filetype'] : $default_value['filetype'];
|
||||
$dpi = isset($_POST['dpi']) ? $_POST['dpi'] : $default_value['dpi'];
|
||||
$scale = intval(isset($_POST['scale']) ? $_POST['scale'] : $default_value['scale']);
|
||||
$rotation = intval(isset($_POST['rotation']) ? $_POST['rotation'] : $default_value['rotation']);
|
||||
$font_family = isset($_POST['font_family']) ? $_POST['font_family'] : $default_value['font_family'];
|
||||
$font_size = intval(isset($_POST['font_size']) ? $_POST['font_size'] : $default_value['font_size']);
|
||||
$text = isset($_POST['text']) ? $_POST['text'] : $default_value['text'];
|
||||
|
||||
registerImageKey('filetype', $filetype);
|
||||
registerImageKey('dpi', $dpi);
|
||||
registerImageKey('scale', $scale);
|
||||
registerImageKey('rotation', $rotation);
|
||||
registerImageKey('font_family', $font_family);
|
||||
registerImageKey('font_size', $font_size);
|
||||
registerImageKey('text', stripslashes($text));
|
||||
|
||||
// Text in form is different than text sent to the image
|
||||
$text = convertText($text);
|
||||
?>
|
||||
|
||||
<div class="header">
|
||||
<header>
|
||||
<img class="logo" src="logo.png" alt="Barcode Bakery" />
|
||||
<nav>
|
||||
<label for="type">Symbology</label>
|
||||
<?php echo getSelectHtml('type', $filename, $availableBarcodes); ?>
|
||||
<a class="info explanation" href="#"><img src="info.gif" alt="Explanation" /></a>
|
||||
</nav>
|
||||
</header>
|
||||
<?php
|
||||
if (ini_get('mbstring.func_overload') != '0') {
|
||||
echo '<div class="warning">Warning! mbstring.func_overload is not set to 0. The generation of images might not work properly.</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
||||
<h1>Barcode Bakery</h1>
|
||||
<h2><?php echo $barcodeName; ?></h2>
|
||||
<div class="configurations">
|
||||
<section class="configurations">
|
||||
<h3>Configurations</h3>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="col1" />
|
||||
<col class="col2" />
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><label for="filetype">File type</label></td>
|
||||
<td><?php echo getSelectHtml('filetype', $filetype, array('PNG' => 'PNG - Portable Network Graphics', 'JPEG' => 'JPEG - Joint Photographic Experts Group', 'GIF' => 'GIF - Graphics Interchange Format')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="dpi">DPI</label></td>
|
||||
<td><?php echo getInputTextHtml('dpi', $dpi, array('type' => 'number', 'min' => 72, 'max' => 300, 'required' => 'required')); ?> <span id="dpiUnavailable">DPI is available only for PNG and JPEG.</span></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($baseClassFile) && file_exists('include' . DIRECTORY_SEPARATOR . $baseClassFile)) {
|
||||
include_once('include' . DIRECTORY_SEPARATOR . $baseClassFile);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><label for="scale">Scale</label></td>
|
||||
<td><?php echo getInputTextHtml('scale', $scale, array('type' => 'number', 'min' => 1, 'required' => 'required')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="rotation">Rotation</label></td>
|
||||
<td><?php echo getSelectHtml('rotation', $rotation, array(0 => 'No rotation', 90 => '90° clockwise', 180 => '180° clockwise', 270 => '270° clockwise')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="font_family">Font</label></td>
|
||||
<td><?php echo getSelectHtml('font_family', $font_family, listfonts('../font')); ?> <?php echo getInputTextHtml('font_size', $font_size, array('type' => 'number', 'min' => 1, 'max' => 30)); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="text">Data</label></td>
|
||||
<td>
|
||||
<div class="generate" style="float: left"><?php echo getInputTextHtml('text', $text, array('type' => 'text', 'required' => 'required')); ?> <input type="submit" value="Generate" /></div>
|
||||
<div class="possiblechars" style="float: right; position: relative;"><a href="#" class="info characters"><img src="info.gif" alt="Help" /></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
header('Location: BCGcode39.php');
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 222 B |
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,4 @@
|
||||
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
||||
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="stringLine truncated
|
||||
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNoLine truncated
|
||||
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[iLine truncated
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,211 @@
|
||||
body {
|
||||
font-family: Segoe UI, Calibri, Arial, Helvetica;
|
||||
font-size: 12px;
|
||||
color: #111;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
form, .header {
|
||||
display: block;
|
||||
margin: auto;
|
||||
width: 60%;
|
||||
min-width: 600px;
|
||||
max-width: 700px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
input, select {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input[type=text], input[type=number], select {
|
||||
border: 1px solid #ababab;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
select {
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
section {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 14px 0 8px 0;
|
||||
font-weight: normal;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1px solid #c8c8c8;
|
||||
margin: 0 0 14px 0;
|
||||
}
|
||||
|
||||
.logo {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
nav {
|
||||
float: right;
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
nav label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
nav select {
|
||||
margin: 2px 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table td {
|
||||
padding: 3px 25px 1px 4px;
|
||||
vertical-align: top;
|
||||
height: 26px; /* This act as a min-height */
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
table tr.odd {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
table tr.even {
|
||||
}
|
||||
|
||||
table .col1 {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
table .info {
|
||||
position: absolute;
|
||||
dtop: 0;
|
||||
dright: 5px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.info img {
|
||||
border: 0;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.generate {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.possiblechars {
|
||||
float: right;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#dpiUnavailable {
|
||||
display: none;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
div.configurations select {
|
||||
min-width: 70px;
|
||||
}
|
||||
|
||||
div.configurations input[type=number] {
|
||||
width: 70px;
|
||||
}
|
||||
|
||||
/* Moved section by script */
|
||||
#explanation, #dpiExplain, #validCharacters {
|
||||
display: none;
|
||||
max-width: 450px;
|
||||
}
|
||||
|
||||
#explanation ul {
|
||||
list-style: disc;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#specificOptions {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#validCharacters input[type=button] {
|
||||
width: 25px;
|
||||
padding: 1px 6px;
|
||||
}
|
||||
|
||||
.BCGcode128 #validCharacters input[type=button],
|
||||
.BCGcode39extended #validCharacters input[type=button],
|
||||
.BCGcode93 #validCharacters input[type=button],
|
||||
.BCGgs1128 #validCharacters input[type=button],
|
||||
.BCGaztec #validCharacters input[type=button],
|
||||
.BCGdatamatrix #validCharacters input[type=button],
|
||||
.BCGmaxicode #validCharacters input[type=button],
|
||||
.BCGqrcode #validCharacters input[type=button],
|
||||
.BCGpdf417 #validCharacters input[type=button] {
|
||||
width: 39px;
|
||||
}
|
||||
|
||||
.bubble {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bubble.visible {
|
||||
display: block !important;
|
||||
position: absolute;
|
||||
background-color: #f8f8f8;
|
||||
border: 2px solid #ddd;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.gs1128_id {
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gs1128_value {
|
||||
width: 295px;
|
||||
}
|
||||
|
||||
.gs1128_delete img {
|
||||
border: 0;
|
||||
margin-left: 5px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
#identifierContainer {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: #fcf8e3;
|
||||
border: 1px solid #faf2cc;
|
||||
color: #8a6d3b;
|
||||
padding: 8px;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
header('Location: html/index_1D.php');
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
// This autoload is here just in case you didn't run composer install.
|
||||
// Running composer install would be a better way to autoload the classes.
|
||||
|
||||
// We search in the ../../packages/ folder
|
||||
$packageFolder = __DIR__ . '/../../packages';
|
||||
spl_autoload_register(function ($className) use ($packageFolder) {
|
||||
$tryFolders = array();
|
||||
$splits = explode('\\', $className);
|
||||
|
||||
$c = count($splits);
|
||||
if ($c > 0 && $splits[0] === 'BarcodeBakery') {
|
||||
if ($c > 1) {
|
||||
if ($splits[1] === 'Common') {
|
||||
$tryFolders = array('barcode-common', 'gs1ai');
|
||||
} else {
|
||||
// Try all the other folders
|
||||
$tryFolders = array_filter(scandir($packageFolder), function ($f) {
|
||||
if ($f !== '.' && $f !== '..' && $f !== 'barcode-common' && $f !== 'gs1ai') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (count($tryFolders) > 0) {
|
||||
$file = implode('/', array_slice($splits, 2)) . '.php';
|
||||
foreach ($tryFolders as $folder) {
|
||||
$fullpath = $packageFolder . '/' . $folder . '/src/' . $file;
|
||||
|
||||
if (file_exists($fullpath)) {
|
||||
include $fullpath;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user