<?php
include_once("inc/config.php");
include_once("inc/publicfun.php");
include_once("inc/ftbbsdbclass.php");
include_once("conn.php");
$ftbbs_name=get_cookie('username');
header("content-type:text/html; charset=utf-8");
if ($ftbbs_name==""){
?>
<div id="MemberLogin" class="MemberLogin">
					<form method="post" action="userlogin.php?flag=Y" target="_top" style="display: inline;">
						<div style="height: 22px;"></div>
						<div class="MemberName">
							<span>用户名</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="bbsuser" type="text" size="8" style="width:90px" />
						</div>
						<div class="MemberPassword">
							<span>密　码</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="password" type="password" size="8" style="width:90px" />
						</div>
						<? if ($getcodeoff==1 && $_SESSION["errorlogin"]>=3){?>
						<div class="ValidateCode">
							<span>验证码</span>&nbsp;&nbsp;&nbsp;&nbsp;<input name="codestr" type="text" size="3" />&nbsp;
							<img src="getyzm.php" alt="看不清楚请点击刷新验证码" class="simg" style="cursor : pointer;" onClick="this.src='getyzm.php';" align="absmiddle">
						</div>
						<? }?>
						<div class="MemberOptions">
							<span>保　存</span>&nbsp;&nbsp;&nbsp;<span class="outbdr2"><span>
          <select name="ckies" id="ckies" style="width:91px">
            <option value="0" selected="selected">不保存</option>
            <option value="86400">保存一天</option>
            <option value="2592000">保存一月</option>
            <option value="31536000">保存一年</option>
          </select>
		  <input type="hidden" name="act" value="y">
		  <input type="hidden" name="reurl" value="default.php">
		  </span></span>
						</div>
						<div style="height: 6px;"></div>
						<div class="LoginButton">
							<button class="LoginButton" name="loginsubmit" type="submit" value="true" style="width: 60px;">登录</button>&nbsp;&nbsp;
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='default.php?n=regist'" style="width: 60px;">注册</button>
						</div>
					</form>
</div>
<?
}else{
  $sql="SELECT clubuser_id,clubuser_name,jingyuan,postnum,clubuser_reg_date,clubuser_enter_count,bokeer FROM {$tablepre}clubuser where clubuser_name='".$ftbbs_name."' limit 0,1";
  $rs=mysql_query($sql);
  $myrow = mysql_fetch_array($rs);
  $userid=$myrow["clubuser_id"];
?>
<div id="MemberLogin" class="MemberLogin">
					<div style="height: 22px;"></div>
					<div style=" margin:0px; padding:0px 0px 0px 15px; line-height:18px; height:98px;">
						欢迎<?=$ftbbs_name?>的到来 <br /> 
						用户积分：<?=$myrow["jingyuan"]?> <br />
						发贴数量：<?=$myrow["postnum"]?> <br />
						登录次数：<?=$myrow["clubuser_enter_count"]?> <br />
						注册时间：<?=dateFormat($myrow["clubuser_reg_date"],'y-m-d H:i:s')?> 
					</div>
						<div style="height: 1px;"></div>
						<div class="LoginButton">
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='default.php?n=userinfo'" style="width: 40px;">修改</button>&nbsp;&nbsp;
							<button class="LoginButton" name="loginsubmit" type="button" value="true" onClick="javascript:window.location.href='main.php?exit=yes'" style="width: 40px;">退出</button>
						</div>
</div>
<?
}
?>