Andrick Borderguard & Ketchup Co.
code.junkie: generic php picture viewer
 [ The Generic PHP Picture Viewer ]

Simple and stupid, but you wouldn't believe how many times I've been asked for something like this. So here you have it -- the generic PHP picture viewer at the most base.

the code:
Create a page called 'picture_view.php', painted the way you like, with this embedded in the middle of it.
<div align="center" style="padding-top:10px;">

<?

$lead = "img/";
echo "<img src='$lead$source' alt='' border='0'>";

?>

</div>
<div align="center" style="padding-top:10px;">
<a href="JavaScript:window.close();" target="content">close</a>
And, if you have a thumbanil named 'pic_small.gif' and an image named 'pic_big.jpg' in the 'img' directory, your href on the referring page looks like this:
<a href="picture_view.php?source=pic_big.jpg" target="_blank">
<img src="img/pic_small.gif" border="0" width="xx" height="xx" alt="">
</a>
considerations:
  • Go crazy with it. You can send sizes, alt tags, rip the directory out and put it as part of the call, whatever.
  • I said it was simple and stupid, right?
Home About: T.E.D. Andrick About: Our Philosphy About: The Name Portfolio: Web Design Portfolio: Template Design Portfolio: Identity Design Portfolio: Print Design Clients/Projects: Client List Clients/Projects: Projects List Clients/Projects: Special Projects More: Filter.Junkie Thin Chrome Gold Text Infamous MacOS 'Gel' Buttons More: Code.Junkie YoungPup's dropdown menus The IE6 PNG display hack A really simple JavaScript image button rollover A not-simple CSS image button rollover Sliding DIVs Fading DIVs The IE/ActiveX Control hack Flash and JavaScript variables Flash & XML text marquee The gerenic emailer The beauty of the dynamic header & footer The generic picture viewer More: Links Contact: Employment Contact: Analog Space