<?php 
//if ($_REQUEST['ext']=='jpg' OR $_REQUEST['ext']=='gif' OR $_REQUEST['ext']=='png') {
//	print("<img src='attachments/".$_REQUEST['attachment']."'>") ;
//}else{
	echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=attachments/'.$_REQUEST['attachment'].'">';
	exit;
//}
?> 
