<?php
$size1 = $_POST["size1"];
$text1 = $_POST["text1"];
$left1 = $_POST["left1"];
$wide = $_POST["wide"];
$height = $_POST["height"];
$back = $_POST["back"];
$text1 = $_POST["text1"];
$text2 = $_POST["text2"];
$text3 = $_POST["text3"];
$text4 = $_POST["text4"];
$color1 = $_POST["color1"];
$color2 = $_POST["color2"];
$color3 = $_POST["color3"];
$color4 = $_POST["color4"];
$up1 = $_POST["up1"];
$up2 = $_POST["up2"];
$up3 = $_POST["up3"];
$up4 = $_POST["up4"];
$im = @ImageCreate ( $wide, $height)
or die;
if ($back =="black"){
$black = ImageColorAllocate($im, 0, 0, 0);}
if ($back =="white"){
$white = ImageColorAllocate($im, 255, 255, 255);}
if ($back =="blue"){
$blue = ImageColorAllocate($im, 0, 0, 255);}
if ($back =="red"){
$red = ImageColorAllocate($im, 255, 0, 0);}
if ($back =="green"){
$green = ImageColorAllocate($im, 0, 255, 0);}
if ($back =="yellow"){
$yellow = ImageColorAllocate($im, 255, 255, 0);}
if ($back =="lblue"){
$lblue = ImageColorAllocate($im, 0, 255, 255);}
if ($back =="pink"){
$pink = ImageColorAllocate($im, 255, 0, 255);}
if ($text_color1 =="black"){
$text_color1 = ImageColorAllocate($im, 0, 0, 0);}
if ($text_color1 =="white"){
$text_color1 = ImageColorAllocate($im, 255, 255, 255);}
if ($text_color1 =="blue"){
$text_color1 = ImageColorAllocate($im, 0, 0, 255);}
if ($text_color1 =="red"){
$text_color1 = ImageColorAllocate($im, 255, 0, 0);}
if ($text_color1 =="green"){
$text_color1 = ImageColorAllocate($im, 0, 255, 0);}
if ($text_color1 =="yellow"){
$text_color1 = ImageColorAllocate($im, 255, 255, 0);}
if ($text_color1 =="lblue"){
$text_color1 = ImageColorAllocate($im, 0, 255, 255);}
if ($text_color1 =="pink"){
$text_color1 = ImageColorAllocate($im, 255, 0, 255);}
if ($text_color2 =="black"){
$text_color2 = ImageColorAllocate($im, 0, 0, 0);}
if ($text_color2 =="white"){
$text_color2 = ImageColorAllocate($im, 255, 255, 255);}
if ($text_color2 =="blue"){
$text_color2 = ImageColorAllocate($im, 0, 0, 255);}
if ($text_color2 =="red"){
$text_color2 = ImageColorAllocate($im, 255, 0, 0);}
if ($text_color2 =="green"){
$text_color2 = ImageColorAllocate($im, 0, 255, 0);}
if ($text_color2 =="yellow"){
$text_color2 = ImageColorAllocate($im, 255, 255, 0);}
if ($text_color2 =="lblue"){
$text_color2 = ImageColorAllocate($im, 0, 255, 255);}
if ($text_color2 =="pink"){
$text_color2 = ImageColorAllocate($im, 255, 0, 255);}
if ($text_color3 =="black"){
$text_color3 = ImageColorAllocate($im, 0, 0, 0);}
if ($text_color3 =="white"){
$text_color3 = ImageColorAllocate($im, 255, 255, 255);}
if ($text_color3 =="blue"){
$text_color3 = ImageColorAllocate($im, 0, 0, 255);}
if ($text_color3 =="red"){
$text_color3 = ImageColorAllocate($im, 255, 0, 0);}
if ($text_color3 =="green"){
$text_color3 = ImageColorAllocate($im, 0, 255, 0);}
if ($text_color3 =="yellow"){
$text_color3 = ImageColorAllocate($im, 255, 255, 0);}
if ($text_color3 =="lblue"){
$text_color3 = ImageColorAllocate($im, 0, 255, 255);}
if ($text_color3 =="pink"){
$text_color3 = ImageColorAllocate($im, 255, 0, 255);}
ImageString ($im, $size1, $left1, $up1, "$text1", $text_color1);
ImageString ($im, $size2, $left2, $up2, "$text2", $text_color2);
ImageString ($im, $size3, $left3, $up3, "$text3", $text_color3);
ImageString ($im, $size4, $left4, $up4, "$text4", $text_color4);
header('Content-Type: image/gif');
Imagegif ($im);
?>