/[cvs]/nfo/php/libs/de.ashberg.www/barcode/barcode.php
ViewVC logotype

Contents of /nfo/php/libs/de.ashberg.www/barcode/barcode.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Thu Aug 11 19:19:57 2005 UTC (18 years, 10 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
+ initial commit

1 <?
2 /*
3
4 * Image-Creator / Sample
5 * Part of PHP-Barcode 0.3pl1
6
7 * (C) 2001,2002,2003,2004 by Folke Ashberg <folke@ashberg.de>
8
9 * The newest version can be found at http://www.ashberg.de/bar
10
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
25 */
26
27 require("php-barcode.php");
28
29 function getvar($name){
30 global $_GET, $_POST;
31 if (isset($_GET[$name])) return $_GET[$name];
32 else if (isset($_POST[$name])) return $_POST[$name];
33 else return false;
34 }
35
36 if (get_magic_quotes_gpc()){
37 $code=stripslashes(getvar('code'));
38 } else {
39 $code=getvar('code');
40 }
41 if (!$code) $code='123456789012';
42
43 barcode_print($code,getvar('encoding'),getvar('scale'),getvar('mode'));
44
45 /*
46 * call
47 * http://........./barcode.php?code=012345678901
48 * or
49 * http://........./barcode.php?code=012345678901&encoding=EAN&scale=4&mode=png
50 *
51 */
52
53 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed