all this shows is the content in my head.php and foot.php nothing else shows... why?!?!?!
<?php
$pagetitle="Avatar Preferences";
include "../include/head.php";
echo $harsss;
$board=$_GET["board"];
$topic=$_GET["topic"];
$myrow=mysql_fetch_array(mysql_query("SELECT `level` FROM `users` WHERE `username`='$uname' AND `password`='$password'"));
if($myrow["level"]>0)
{
$submit=$_POST["submit"];
if($submit)
{
$imgarray=array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/x-png");
$filetype=$_FILES["userfile"]["type"];
$filename=$_FILES["userfile"]["name"];
$filesize=$_FILES["userfile"]["size"];
if($filesize<=11240)
{
if(in_array($filetype,$imgarray))
{
$myrow=mysql_fetch_array(mysql_query("SELECT `username` FROM `users` WHERE `username`='$username' AND `password`='$password'"));
$newfilename=$myrow["username"];
if(($filetype=="image/pjpeg")||($filetype=="image/jpeg")) $newfilename=$newfilename.".jpg";
elseif($filetype=="image/gif") $newfilename=$newfilename.".gif";
elseif(($filetype=="image/png")&&($filetype=="image/x-png")) $newfilename=$newfilename.".png";
else $newfilename=$newfilename.".jpg";
$newfilename=ereg_replace(" ","_",$newfilename);
$location=pathinfo($_SERVER["SCRIPT_FILENAME"]);
$location=$location["dirname"];
if(move_uploaded_file($_FILES["userfile"]["tmp_name"],$location."/avatars/".$newfilename))
{
mysql_query("UPDATE `users` SET `avatar`='avatars/".$newfilename."' WHERE `username`='$uname' AND `password`='$password'");
echo("\n<div>File <b>".$filename."</b> successfully uploaded. It was renamed to <b>".$newfilename."</b> and placed in the <b>avatars/</b> directory. <a href='user.php'>User Information</a>.</div>");
}
else
{
echo("\n<div>File transfer failed. Contact the administrator. Return to <a href='preficon.php'>Avatar Preferences</a>.</div>");
}
}
else
{
echo("\n<div>Invalid file type. Only JPEG, GIF, and PNG image types are allowed.</div>");
}
}
else
{
$filesizesub=$filesize-10240;
$filesizesub=$filesizesub/1024;
$filesizesub=round($filesizesub,2);
echo("\n<div>This file is too large. Only files of 10 KB or less may be uploaded. Your file was about ".$filesizesub." KB too large. Return to <a href='preficon.php'>Avatar Preferences</a>.</div>");
}
}
else
{
echo("\n<table>");
echo("\n<tr>");
echo("\n<td class='lite' colspan='3'>Return to: <a href='index.php'>Board List</a>");
if($board)
{
echo(" | <a href='gentopic.php?board=".$board."'>Topic List</a>");
if($topic) echo(" | <a href='genmessage.php?board=".$board."&topic=".$topic."'>Message List</a>");
}
echo(" | <a href='user.php");
if($board)
{
echo("?board=".$board);
if($topic) echo("&topic=".$topic);
}
echo("'>User Information</a></td>");
echo("\n</tr>");
$myrow=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `username`='$uname' AND `password`='$password'"));
echo("\n<tr>");
echo("\n<td class='lite' colspan='3'>Avatar Settings for ".$myrow["username"]."</td>");
echo("\n</tr>");
echo("\n<tr>");
echo("\n<td class='dark'>Current Avatar</td>");
echo("\n<td class='dark'>");
if($myrow["avatar"]) echo("<img alt='".$myrow["name"]."'s Avatar' src='".$myrow["regemail"]."' />");
else echo("Avatar Not Set");
echo("</td>");
echo("\n<td rowspan='3' width='50%'>");
echo("\n<b>Explanation</b>");
echo("\n<blockquote>All avatars will be resized to 60 x 60 pixels. The maximum file size for avatars is 10 KB. If your avatar is animated, make sure it's 60 x 60 before uploading, as Internet Explorer messes up animated GIFs when it resizes them. Any offensive avatars are grounds for severe moderation (<a' href='tos.php");
if($board)
{
echo("?board=".$board);
if($topic) echo("&topic=".$topic);
}
echo("'>More Information</a>)</blockquote>");
echo("\n</td>");
echo("\n</tr>");
echo("\n<form action='preficon.php' enctype='multipart/form-data' method='post'>");
echo("\n<tr>");
echo("\n<td>Upload File</td>");
echo("\n<td><input name='userfile' type='file' /></td>");
echo("\n</tr>");
echo("\n<tr>");
echo("\n<td class='dark' colspan='2'><input name='submit' type='submit' value='Update' /></td>");
echo("\n</tr>");
echo("\n</form>");
echo("\n</table>");
}
}
include("../include/foot.php");
?>