View file wapirate/wml/logo.php

File size: 3.26Kb
<?php

$text = $_GET["text"];

$font = $_GET["font"];

$s1 = $_GET["s1"];

$s2 = $_GET["s2"];

$x = $_GET["x"];

$y = $_GET["y"];

$angle = $_GET["angle"];

$fsize = $_GET["fsize"];

$fcolor = $_GET["fcolor"];

$bcolor = $_GET["bcolor"];

$hour = $_GET["hour"];



if($bcolor=="black"){

$b1 = "000";

$b2 = "000";

$b3 = "000";

}else if($bcolor=="white"){

$b1 = "255";

$b2 = "255";

$b3 = "255";

}else if($bcolor=="blue"){

$b1 = "000";

$b2 = "000";

$b3 = "255";

}else if($bcolor=="DeepSkyBlue"){

$b1 = "000";

$b2 = "191";

$b3 = "255";

}else if($bcolor=="Turquoise"){

$b1 = "064";

$b2 = "224";

$b3 = "208";

}else if($bcolor=="SpringGreen"){

$b1 = "000";

$b2 = "255";

$b3 = "127";

}else if($bcolor=="LimeGreen"){

$b1 = "050";

$b2 = "205";

$b3 = "050";

}else if($bcolor=="Yellow"){

$b1 = "255";

$b2 = "255";

$b3 = "000";

}else if($bcolor=="SandyBrown"){

$b1 = "244";

$b2 = "164";

$b3 = "096";

}else if($bcolor=="Orange"){

$b1 = "255";

$b2 = "165";

$b3 = "000";

}else if($bcolor=="Red"){

$b1 = "255";

$b2 = "000";

$b3 = "000";

}else if($bcolor=="DeepPink"){

$b1 = "255";

$b2 = "020";

$b3 = "147";

}else if($bcolor=="Violet"){

$b1 = "238";

$b2 = "130";

$b3 = "238";

}else if($bcolor=="Purple"){

$b1 = "160";

$b2 = "032";

$b3 = "240";

}



if($fcolor=="black"){

$c1 = "000";

$c2 = "000";

$c3 = "000";

}else if($fcolor=="white"){

$c1 = "255";

$c2 = "255";

$c3 = "255";

}else if($fcolor=="blue"){

$c1 = "000";

$c2 = "000";

$c3 = "255";

}else if($fcolor=="DeepSkyBlue"){

$c1 = "000";

$c2 = "191";

$c3 = "255";

}else if($fcolor=="Turquoise"){

$c1 = "064";

$c2 = "224";

$c3 = "208";

}else if($fcolor=="SpringGreen"){

$c1 = "000";

$c2 = "255";

$c3 = "127";

}else if($fcolor=="LimeGreen"){

$c1 = "050";

$c2 = "205";

$c3 = "050";

}else if($fcolor=="Yellow"){

$c1 = "255";

$c2 = "255";

$c3 = "000";

}else if($fcolor=="SandyBrown"){

$c1 = "244";

$c2 = "164";

$c3 = "096";

}else if($fcolor=="Orange"){

$c1 = "255";

$c2 = "165";

$c3 = "000";

}else if($fcolor=="Red"){

$c1 = "255";

$c2 = "000";

$c3 = "000";

}else if($fcolor=="DeepPink"){

$c1 = "255";

$c2 = "20";

$c3 = "147";

}else if($fcolor=="Violet"){

$c1 = "238";

$c2 = "130";

$c3 = "238";

}else if($fcolor=="Purple"){

$c1 = "160";

$c2 = "032";

$c3 = "240";

}



if($s1>500)$s1=500;

if($s2>500)$s2=500;

$im = imagecreate ($s1, $s2);

$background_color = ImageColorAllocate ($im, $b1, $b2, $b3);

$color = ImageColorAllocate ($im, $c1, $c2, $c3);



if($hour==""){

if($text=="time"||$text=="Time")$text=date("H:i",time());

}else{

if($text=="time"||$text=="Time")$text=date("H:i",time() + ($hour * 60 * 60));

}





if($text=="date"||$text=="Date")$text=date("D d M y");

$user = $_SERVER['HTTP_USER_AGENT'];

if($text=="useragent"||$text=="Useragent")$text=$user;

//$user = explode ('/', $HTTP_USER_AGENT);

//if($text=="useragent"||$text=="Useragent")$text=$user[0];

ImageTTFText ($im, $fsize, $angle, $x, $y, $color, "fonts/".$font,

              $text);

if($cont==1){

header("Content-Type: image/vnd.nok-oplogo-color");

ImagePNG ($im);

}else{

header("Content-Type: image/PNG");

ImagePNG ($im);

}

ImageDestroy ($im);



?>