| <?php |
| /* |
| * text2image.php created on 26/01/2006 |
| * |
| * @author Eduardo A. Romero Gomez |
| */ |
| |
| include_once($_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/text2image.class.php"); |
| |
| ## Initialize |
| $image = new text2image(); |
| |
| $string = " "; |
| if(isset($_REQUEST['string'])) |
| $string = " ". $_REQUEST['string']; |
| $image->Message($string); |
| |
| $image->FontSize("13"); |
| if(isset($_REQUEST['offset'])) |
| $image->shadowoffset($_REQUEST['offset']); |
| |
| $type = "completed"; |
| if(isset($_REQUEST['type']) && $_REQUEST['type'] != "") |
| $type = $_REQUEST['type']; |
| |
| |
| $image->Colors("0 0 0"); |
| $image->Shadow("249 175 175"); |
| $font = $_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/GenAR102.TTF"; |
| $resize = false; |
| if($type == "completed") |
| { |
| $image->Colors("54 187 104"); |
| $image->Shadow("115 244 163"); |
| $font = $_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/GenR102.TTF"; |
| $image->setXY(0,7); |
| $resize = true; |
| } elseif($type == "scheduled") { |
| $image->Colors("0 0 0"); |
| $image->Shadow("182 249 175"); |
| $font = $_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/GenR102.TTF"; |
| $image->setXY(0,7); |
| $resize = true; |
| } elseif($type == "tentative") { |
| $image->Colors("128 128 128"); |
| $font = $_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/GenAI102.TTF"; |
| $image->setXY(0,7); |
| $resize = true; |
| } elseif($type = "link") { |
| $image->Colors("102 51 102"); |
| $image->fontsize("14"); |
| $image->setXY(0,5); |
| $font = $_SERVER['DOCUMENT_ROOT'] ."/projects/timeline/text2image/GenR102.TTF"; |
| $resize = false; |
| } |
| |
| if(isset($_REQUEST['size']) && $_REQUEST['size']>0) |
| { |
| $image->fontsize($_REQUEST['size']); |
| $image->setXY(0,0); |
| $resize = false; |
| } |
| $image->Font($font); |
| |
| $image->render($resize); |
| ?> |