<?php
/*
Copyright (C) 2001, 2002 Bertand Pallie, Loc Dayot
EPNadmin - Version 0.6 - 05/01/2003
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://epnadmin.pierrefitte93.fr/
*/
require_once("header.inc.php");
require_once("constantes.inc.php"); // dfinition des constantes
if (!defined("FCT_USAGERS"))
return $fctnonactive;
//require_once("fonctions.inc.php"); // concernant des fonctions transversales inclassables
//require_once("mysql.inc.php"); // concernant mysql
//require_once("sessions.inc.php"); // concernant les sessions et initiations
//require_once("usagers.inc.php"); // concernant la gestion des usagers
//require_once("reservations.inc.php"); // concernant les rservations des postes en accs individuel par des usagers
//require_once("tableaux.inc.php"); // Concernant l'affichage transpos d'un tableau
//require_once("siteweb.inc.php"); // concernant les pages perso des usagers et les sites web des structures
//require_once("dateheure.inc.php"); // concernant la manipulation des heures et des dates, formulaire, conversion...
//require_once("structures.inc.php"); // concernant les structures
//require_once("initiations.inc.php"); // concernant les initiations et les thmes
//require_once("parcours.inc.php"); // concernant les parcours des usagers et leur positionnement
if (USAGERS_AUTRES>="w")
{
header ("Content-type: image/png");
$im = @ImageCreate (240, 230)
or die ("Cannot Initialize new GD image stream");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 1, 5, 5, "A Simple Text String", $text_color);
//ImagePng ($im);
ImageDestroy ($im);
if (!isset($output)) $output = "png";
if (!isset($barcode)) $barcode = "0123456789";
if (!isset($type)) $type = "I25";
if (!isset($width)) $width = "460";
if (!isset($height)) $height = "120";
if (!isset($xres)) $xres = "2";
if (!isset($font)) $font = "5";
define (__TRACE_ENABLED__, false);
define (__DEBUG_ENABLED__, false);
require("barcode/barcode.php");
require("barcode/i25object.php");
require("barcode/c39object.php");
require("barcode/c128aobject.php");
require("barcode/c128bobject.php");
require("barcode/c128cobject.php");
if (!isset($style)) $style = BCD_DEFAULT_STYLE;
if (!isset($width)) $width = BCD_DEFAULT_WIDTH;
if (!isset($height)) $height = BCD_DEFAULT_HEIGHT;
if (!isset($xres)) $xres = BCD_DEFAULT_XRES;
if (!isset($font)) $font = BCD_DEFAULT_FONT;
switch ($type)
{
case "I25":
$obj = new I25Object($width, $height, $style, $code);
break;
case "C39":
$obj = new C39Object($width, $height, $style, $code);
break;
case "C128A":
$obj = new C128AObject($width, $height, $style, $code);
break;
case "C128B":
$obj = new C128BObject($width, $height, $style, $code);
break;
case "C128C":
$obj = new C128CObject($width, $height, $style, $code);
break;
default:
echo "Need bar code type ex. C39";
$obj = false;
}
if ($obj) {
$obj->SetFont($font);
$obj->DrawObject($xres);
ImagePNG($obj->mImg);
$obj->DestroyObject();
unset($obj); /* clean */
}
}
//require("footer.inc.php");
?>