<?php
		include("header.tpl.php"); 
		include("bodytop.tpl.php"); 
		?>
		
	<div id="panel_menu">
		<div class="rs_u">&nbsp;</div>
		<div class="content">
			<h2>信息设置</h2>
		 <div class="div_p font_14">
			<ul class="panel_menu_ul">
				<li><a href="panel.php?action=panel&ipart=msglist">我的短消息</a></li>
				<li><a href="panel.php?action=panel&ipart=memberinfo">我的信息设置</a></li>
				<li><a href="panel.php?action=panel&ipart=memberpwd">我的密码设置</a></li>
				<li><a href="index.php">返回网站主页</a></li>
				<li><a href="forums.php">返回论坛主页</a></li>
				<li><a href="verify.php?action=loginout">安全退出登录</a></li>
			</ul>
			</div>
		</div>
		<div class="rs_d">&nbsp;</div>
	</div>

	<?php if($ipart=='msglist'){?>
	<form id="form_msglist" method="post">
	<div id="panel_body">
	    <div class="rm_u">&nbsp;</div>
		<div class="content">
			<h2>站内短消息<input type="hidden" name="check_uid" value="<?php echo $uid?>" >(<?php echo $totalrecord?> / 20)</h2>
			<div class="div_p">
			<ul class="panel_body_ul">
				<li class="msg"> <input type="checkbox" id="msg_check_all" onclick="checkall_onclick('msg')" > <B>消息标题</B></li>
				<li class="date"> <B>日期</B></li>
				<?php foreach($membermsgs as $key => $val){?>
				<li class="msg"> <input type="checkbox" id="msg_check_<?php echo $val['checkid']?>" name="msg_check[]" value="<?php echo $key?>"> <a href="panel.php?ipart=msgcontent&msgid=<?php echo $key?>"><?php echo $val['title']?></a></li>
				<li class="date"> <?php echo gmdate('Y-m-j H:i',$val['sendtime']+3600*8)?></li>
				<?php }?>
				<li class="clear">&nbsp;</li>
				<li class="clear">&nbsp;</li>
				<li><input type="button" value="删 除" onclick="delmembermsg()"><?php echo $multipage?></li>
			</ul>
			<div class="clear"></div>
			</div>
		</div>
		<div class="rm_d">&nbsp;</div>
	</div>
	</form>
	<div class="clear"></div>	
	<?php }?>
<!-- 这部分是信息内容部分 -->
<?php if($ipart=='msgcontent'){?>
<div id="panel_body">
	    <div class="rm_u">&nbsp;</div>
		<div class="content">
			<h2>站内短消息</h2>
			<div class="div_p">
			<ul class="panel_body_ul">
				<li><b>发信人</b>: &nbsp;<?php echo $membermsgbody['sender']?> ( <?php echo $groupnames[$membermsgbody['sendergid']][0]?> )</li>
				<li><b>发送时间</b>: &nbsp;<?php echo gmdate("Y-n-j h:i",$membermsgbody['sendtime']+8*3600)?></li>
				<li><b>消息标题</b>: &nbsp;<?php echo $membermsgbody['title']?></li>
				<li class="clear"></li>
				<li><b>消息内容</b>:</li>
				<li class="clear"></li>
				<li><span class="indent noline"><?php echo  $message?></span></li>
			</ul>
			<div class="clear"></div>
			</div>
		</div>
		<div class="rm_d">&nbsp;</div>
	</div>
<div class="clear"></div>	
<?php }?>
<!-- 这部分是个人信息部分 -->
<?php if($ipart=='memberinfo'){?>
<form method="post" action="panel.php?action=update">
<div id="panel_body">
	    <div class="rm_u">&nbsp;</div>
		<div class="content">
			<h2>设置个人信息</h2>
			<div class="div_p">
			<ul class="panel_body_ul"><input type="hidden" name="modify_uid" value="<?php echo $memberinfo['uid']?>">
				<li class="label">用户账号</li>
				<li class="text"> <input type="text" name="modify_userid" class="textform" value="<?php echo $memberinfo['userid']?>" readonly > </li>
				<li class="label">用户姓名</li>
				<li class="text"> <input type="text" name="modify_username" class="textform" value="<?php echo $memberinfo['username']?>" maxlength="20"></li>
				<li class="label">email</li>
				<li class="text"> <input type="text" name="modify_email" class="textform" value="<?php echo $memberinfo['email']?>" ></li>
				<li class="label">用户组</li>
				<li class="text"> <input type="text" name="modify_gid" class="textform" value="<?php echo $groupnames[$memberinfo['gid']][0]?>" readonly></li>
				<li class="label">性别</li>
				<li class="text"> 
				<input type="radio" name="modify_sex" value="0" <?php echo $sexcheck[0]?> >男 &nbsp;
				<input type="radio" name="modify_sex" value="1" <?php echo $sexcheck[1]?> >女 &nbsp; 
				<input type="radio" name="modify_sex" value="2" <?php echo $sexcheck[2]?> > 保密</li>
				<li class="label">电话</li>
				<li class="text"> 
				<input type="text" name="modify_phone" class="textform" value="<?php echo $memberinfo['phone']?>" maxlength="20">
				</li>

				<li class="label">手机</li>
				<li class="text">
				<input type="text" name="modify_mobile" class="textform" value="<?php echo $memberinfo['mobile']?>" maxlength="20">
				</li>
				<li class="label">QQ</li>
				<li class="text"> 
				<input type="text" name="modify_qq" class="textform" value="<?php echo $memberinfo['qq']?>" maxlength="20">
				</li>
				<li class="label">地址</li>
				<li class="text">
				<input type="text" name="modify_address" class="textform" value="<?php echo $memberinfo['address']?>" maxlength="200">
				</li>
				<li class="clear">&nbsp;</li>
				<li class="label">头像
				<input type="hidden" name="modify_userface" id="newface" value="<?php echo $memberinfo['userface']?>" >
				</li>
				<li>
				<div id="faceview">
				<img src="images/userface/<?php echo $memberinfo['userface']?>">
				</div>
				<div id="imgface">
				<img src="images/userface/01c.png" onclick="changeface(0)">
				<img src="images/userface/02c.png" onclick="changeface(1)">
				<img src="images/userface/03c.png" onclick="changeface(2)">
				<img src="images/userface/04c.png" onclick="changeface(3)">
				<img src="images/userface/05c.png" onclick="changeface(4)">
				<img src="images/userface/06c.png" onclick="changeface(5)">
				<img src="images/userface/07c.png" onclick="changeface(6)">
				<img src="images/userface/08c.png" onclick="changeface(7)">
				<img src="images/userface/09c.png" onclick="changeface(8)">
				<img src="images/userface/10c.png" onclick="changeface(9)">
				<img src="images/userface/11c.png" onclick="changeface(10)">
				<img src="images/userface/12c.png" onclick="changeface(11)">
				<img src="images/userface/13c.png" onclick="changeface(12)">
				<img src="images/userface/14c.png" onclick="changeface(13)">
				<img src="images/userface/15c.png" onclick="changeface(14)">
				<img src="images/userface/16c.png" onclick="changeface(15)">
				<img src="images/userface/17c.png" onclick="changeface(16)">
				<img src="images/userface/18c.png" onclick="changeface(17)">
				<img src="images/userface/19c.png" onclick="changeface(18)">
				<img src="images/userface/20c.png" onclick="changeface(19)">
				<img src="images/userface/21c.png" onclick="changeface(20)">
				<img src="images/userface/22c.png" onclick="changeface(21)">
				<img src="images/userface/23c.png" onclick="changeface(22)">
				<img src="images/userface/24c.png" onclick="changeface(23)">
				<img src="images/userface/25c.png" onclick="changeface(24)">
				</div>
				</li>
				<li class="clear"></li>
				<li><center><input type="submit" value="修改信息"></center></li>
			</ul>
			<div class="clear"></div>
			</div>
		</div>
		<div class="rm_d">&nbsp;</div>
	</div>

<div class="clear"></div>	
</form>
<?php }?>
<!-- 这部分是个人信息部分 -->
<?php if($ipart=='memberpwd'){?>
<form method="post" action="panel.php?action=changepwd">
<div id="panel_body">
	    <div class="rm_u">&nbsp;</div>
		<div class="content">
			<h2>设置个人密码</h2>
			<div class="div_p">
			<ul class="panel_body_ul">
				<li class="label">输入新密码<input type="hidden" name="change_uid" value="<?php echo $uid?>"></li>
				<li class="text"> <input type="password" name="new_userpwd" class="textform" maxlength="20"> </li>
				<li class="label">确认新密码</li>
				<li class="text"> <input type="password" name="confirm_userpwd" class="textform" maxlength="20"></li>
				<li class="clear"></li>
				<li><center><input type="submit" value="修改密码"></center></li>
			</ul>
			<div class="clear"></div>
			</div>
		</div>
		<div class="rm_d">&nbsp;</div>
	</div>
</form>
<div class="clear"></div>	
<?php }?>
<?php
include("tail.tpl.php"); 
?>
