In actuality this is the uploaded-files.php. What's being displayed is the html mark up and not the php.
<h2 align=center>Uploaded Files</h2>
<?php
//This is for displaying uploaded templates
include_once ($_SERVER['DOCUMENT_ROOT']."/includes/db_connect.php");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM images WHERE UserName='$Username'");
//WILL NOTE
while($row = mysqli_fetch_array($result)){
?>
<a href="<?php echo $row['ImageLink']?>" onclick="NewWindow(this.href,'mywin','500','500','no','center');return false" onfocus="this.blur()">
<?php
$address = $row['ImageLink'];
$last3chars = substr($address, -3);
if(($row['ImageLink']!="")&&($last3chars!="pdf")){
echo "<img src=$row[ImageLink] width=80> </a> <a href=zip.php?Option1=$row[ImageLink]>[Use This Template]</a> ";
}else{
//the path to the PDF file
$strPDF = $row['ImageLink'];
$imagelinkname =(rand(10000000,999999999));
exec("convert \"{$strPDF}[0]\" -colorspace RGB -geometry 200 \"_optionfiles/step1/$imagelinkname.gif\"");
echo "<img src='_optionfiles/step1/$imagelinkname.gif' width='80'> </a> <a href=zip.php?Option1=$row[ImageLink]>[Use This Template]</a> ";
}
?>
<?php
}
?>