<?php
/*
 * Erzeugt einen Schriftzug neben dem offiziellen
 * Logo der OvGU in den Fakultaetsfarben
 *
 * Schriftart ist InfoText
 *
 * 3 Zeilen sind moeglich, Eingabe erfolgt ueber das Setup
 * Registerkarte Einrichtung
 *
 * Autor: sroesler@ovgu.de
 */

/*Funktion um Umlaute darzustellen*/
function entenc($text)
{
    $res = '';
    for ($i = 0; $i < strlen($text); $i++)
    {
        $cc = ord($text{$i});
        if ($cc >= 128 || $cc == 38)
            $res .= "&#$cc;";
        else
            $res .= chr($cc);
    }
    return $res;
}

header("Content-type: image/jpeg");
$breite=isset($_GET['b'])?$_GET['b']:450;
$bild=imagecreate ($breite, 80 );
$color=ImageColorAllocate($bild,255,255,255);
$font="./InfoTexMed.ttf";
$font_c = imagecolorallocate ( $bild, 0, 0, 0 );
imageTTFtext($bild,15,0,5,19,$font_c,$font,entenc(utf8_decode($_GET['z1'])));
imageTTFtext($bild,15,0,5,39,$font_c,$font,entenc(utf8_decode($_GET['z2'])));
imageTTFtext($bild,15,0,5,60,$font_c,$font,entenc(utf8_decode($_GET['z3'])));
ImageJpeg($bild,'',100);

?>