<?php 

/* 

Template Name: Image Form 

*/ 

?>

<?php get_header(); ?>

<div class="content">
	<?php if (have_posts()) : ?>
   <?php while (have_posts()) : the_post(); ?>
    
   <div class="post" id="post-<?php the_ID(); ?>">
   	<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

	   <div class="entry"><p>

<script type="text/javascript">
function Imageform()
  {
  var text=document.getElementById("text").value;
  var forecolor=document.getElementById("forecolor").value;
  var backcolor=document.getElementById("backcolor").value;
  var mode=document.getElementById("mode").value;
  var width=document.getElementById("width").value;
  var align=document.getElementById("align").value;
  
  document.getElementById("imagetypo").src="http://aslamp.com/ms/image.php/"+text+"."+forecolor+"."+backcolor+"."+mode+"."+width+"."+align+".png";
  document.getElementById("imagecode").value="http://aslamp.com/ms/image.php/"+escape(text+"."+forecolor+"."+backcolor+"."+mode+"."+width+"."+align)+".png";
  }
</script>

Text:<br>
<textarea id="text">blah... test</textarea><br>
Text Color:<br>
<input id="forecolor" value="000000" maxlength="6" type="text"> Must be 6 characters<br>
Background Color:<br>
<input id="backcolor" value="ffffff" maxlength="6" type="text"> Must be 6 characters<br>

Mode:<br>
<select id="mode">
<option value="n">Normal</option>
<option value="b">No Border</option>
<option value="t">Transparent</option>
<option value="p">Just Text</option>
</select><br>
Width:<br>
<input id="width" value="100" maxlength="3" type="text"> Must be 3 characters<br>

Align:<br>
<select id="align">
<option value="c">Left</option>
<option value="c">Center</option>
<option value="r">Right</option>
</select>
<br><br>
<a href="#" onclick="Imageform()">Change Image</a>
<br><br>
<img style="float: none ! important;" id="imagetypo" src="http://aslamp.com/ms/image.php/TEXT.000000.ffffff.n.100.c.png">
<br>

Image Code:<br>
<textarea id="imagecode" width="100%"></textarea>

		</div><!-- end entry -->
	
	</div>
	
  	<?php endwhile; else: ?>

	<?php endif; ?>
	
</div><!-- end content -->

</div><!-- close page -->
<?php get_footer(); ?>