通过文字传递创建的图形按钮
通过文字传递创建的图形按钮,通过文字传递创建的图形按钮
<?php Header( "Content-type: image/gif"); // info for the browser
/* PHP3 Button generator, (c) 2000 by IzzySoft (izzysoft@buntspecht.de)
* License: GPL (and it would be nice to drop me a note that you find it
* useful - if you use it. And, of course, I am very interested in
* enhancements you made to the script!
*
* Purpose: generate buttons with text passed by parameter.
*
* possible parameters to the script:
*button- input gif image. Just the part of the filename before the dot.
*The specified image file is expected in the same directory
*as this script resides in.
*font - font to use (1 - 5; 1 is very small, 3 medium, 5 normal size.
*The script will automatically use a smaller font if text is
*too long for selected size.) Default: 5
*text - the text to be put on the button. Will be centered.
*textcolor - color for the letters. Default: white.
*in this example code only blue, white and black are defined;
*but you can add custom colors easily.
*width,heigth - width and heigth of the button. Useful only if target
*button should have different size than source image.
*
* Example for usage:
* <IMG src="http://img.jcwcn.com/attachment/portal"