Permalink
Browse files

added EAN-8 example, fixed barcodes in examples.

  • Loading branch information...
1 parent 081e081 commit 8936d646fa8c81a4a924e05de384b1f7a6f37bdf @Gemorroj Gemorroj committed Mar 4, 2012
Showing with 22 additions and 24 deletions.
  1. +0 −2 docs/examples/barcode_img.php
  2. +22 −22 docs/examples/test-image-barcode.php
@@ -7,5 +7,3 @@
$imgtype = isset($_REQUEST['imgtype']) ? $_REQUEST['imgtype'] : 'png';
Image_Barcode2::draw($num, $type, $imgtype);
-
-
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html>
<html>
<head>
<title>Image_Barcode Class Test</title>
@@ -33,58 +33,58 @@
}
</style>
</head>
-<body style="background-image: url(#FFFFFF);">
-<?php
+<body style="background-color: #FFFFFF;">
-$num = "019671015005";
-
-$num = isset($_REQUEST) && is_array($_REQUEST) && isset($_REQUEST['num']) ? $_REQUEST['num'] : $num;
-
-?>
<div class="box">
-<h1>Image_Barcode Class test</h1>
-Test number: <b><?php echo($num) ?></b>
+<h1>Image_Barcode2 Class test</h1>
</div>
<div class="test">
<h2>Interleave 2 of 5 (png):</h2>
-<img src="barcode_img.php?num=<?php echo($num) ?>&type=int25&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+<img src="barcode_img.php?num=1234567895&type=int25&imgtype=png"
+ alt="PNG: 1234567895" title="PNG: 1234567895"/>
</div>
<div class="test">
<h2>Ean13 (png):</h2>
<img
- src="barcode_img.php?num=<?php echo($num) ?>&type=ean13&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+ src="barcode_img.php?num=1234567891231&type=ean13&imgtype=png"
+ alt="PNG: 1234567891231" title="PNG: 1234567891231"/>
+</div>
+
+<div class="test">
+<h2>Ean8 (png):</h2>
+<img
+ src="barcode_img.php?num=12345670&type=ean8&imgtype=png"
+ alt="PNG: 12345670" title="PNG: 12345670"/>
</div>
<div class="test">
<h2>Code39 (png):</h2>
<img
- src="barcode_img.php?num=<?php echo($num) ?>&type=Code39&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+ src="barcode_img.php?num=BARCODE&type=Code39&imgtype=png"
+ alt="PNG: BARCODE" title="PNG: BARCODE"/>
</div>
<div class="test">
<h2>UPC-A (png):</h2>
<img
- src="barcode_img.php?num=<?php echo($num) ?>&type=upca&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+ src="barcode_img.php?num=12345678912&type=upca&imgtype=png"
+ alt="PNG: 12345678912" title="PNG: 12345678912"/>
</div>
<div class="test">
<h2>Code128 (png):</h2>
<img
- src="barcode_img.php?num=<?php echo($num) ?>&type=code128&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+ src="barcode_img.php?num=barcode&type=code128&imgtype=png"
+ alt="PNG: barcode" title="PNG: barcode"/>
</div>
<div class="test">
<h2>PostNet (png):</h2>
<img
- src="barcode_img.php?num=<?php echo($num) ?>&type=postnet&imgtype=png"
- alt="PNG: <?php echo($num) ?>" title="PNG: <?php echo($num) ?>">
+ src="barcode_img.php?num=202609900&type=postnet&imgtype=png"
+ alt="PNG: 202609900" title="PNG: 202609900"/>
</div>
</body>

0 comments on commit 8936d64

Please sign in to comment.