<?php
include_once("inc/config.php");
include_once("inc/ftbbsdbclass.php");
include_once("inc/publicfun.php");
include_once("conn.php");
include_once("ftbbs_nav.php");
include_once("checkuser.php");
include_once("bbsuser.php");

$query = "SELECT * FROM {$tablepre}ftbbsmb";
$ftbbsmb=makecache('ftbbsmb.html',$query,$expire);
$defaulthome=$ftbbsmb[31];

include_once("homeurl.php");
$username=get_cookie('username');
$sql="select * from {$tablepre}clubuser where clubuser_name='".$username."'";
$rs=mysql_query($sql);
$myrow = mysql_fetch_array($rs);
$userimg = $myrow["userimg"];
?>
<script language=javascript src="inc/cookies.js"></script>
<script>
var stylecook = getCookie("STYLESHOW");
var style;
var strstyle;
if(stylecook=="")
{
 stylecook=1;
}
else
{
 stylecook++;
}
style="main0"+stylecook+".css";
strstyle="<link href=\"css/"+style+"\"  rel=\"stylesheet\" type=\"text/css\"> ";
document.write(strstyle);
</script>
<body topmargin="2">
<?
if (get_cookie('ftbbstype')==1){
include_once("pbhead.php");
}
?> 
  <table width="99%" border="0" align="center" class="maintbbg" cellspacing="1" cellpadding="2">
  <form name="form1" method="post" action="userimgact.php" ENCTYPE="multipart/form-data">
    <tr> 
       <td height="25" colspan="2" class="f12bg">&nbsp;<?=$userinfo?></td>
    </tr>
	<tr class="maintbtr3"> 
      <td height="25" colspan="2"> <div align="left">&nbsp;<a href="<?=$homepage?>">论坛首页</a> 
          >>自定义头像:</div></td>
    </tr>
    <tr> 
      <td width="23%" height="11" class="maintbtr3"><div align="right">当前头像：</div></td>
      <td width="77%" height="200" class="maintbtr3"><div align="center">
	  <? if ($userimg!=""){?>
	  <img src="userheadimg/<?=$userimg?>" width="84">
	  <? }else{?>
	  你目前用的不是自定义头像
	  <? }?>
	  </div></td>
    </tr>
    <tr> 
      <td width="23%" height="11" class="maintbtr3" valign="middle"> 
        <div align="right">上传头像：</div></td>
      <td width="77%" height="50" class="maintbtr3"><input NAME="userfile" TYPE="file" id="userfile"></td>
    </tr>
    <tr> 
      <td height="50" colspan="2" class="maintbtr3"> 
        <div align="center"> 
          <input type="submit" name="Submit" value="上传头像">
        </div></td>
    </tr>
    <tr> 
      <td width="23%" height="11" class="maintbtr3"><div align="right">当前头像：</div></td>
      <td width="77%" height="70" class="maintbtr3"> 
        <div align="left">1、头像尺寸为84X84<br>
          <br>
          2、头像大小不超过50K</div></td>
    </tr>
	</form>
  </table>
<?
$db->close(); 
include_once("inc/bbstail.php");
?>