{#include file="header.html"#}
<div id="container">

<div class="active-tip">
	<p class="navlink_show"><a href="{#$PB_ENV.PB_URL#}"><span>{#$uimsg.index#}</span></a> &raquo; <a href="member.php"><span>{#$uimsg.mbcp#}</span></a> &raquo; {#$uimsg.member_title#}</p>
</div>

<div class="member">
<!-- 左侧 -->
<div class="member-menu">
	{#foreach from=$menu item=item key=key name=outmenu#}
	<div class="side_list">
	<span><img src="{#$PB_ENV.PB_URL#}templates/{#$PB_ENV.PB_TEMPLATE#}/images/collapse.gif" class="leftmenuicon" alt="Collapse" id="leftmenuitem_icon_{#$smarty.foreach.outmenu.iteration#}" /></span><h2 onclick="show_menu('leftmenuitem_','{#$smarty.foreach.outmenu.iteration#}');">{#$item.mName#}</h2>
	</div>
	<div class="side_list2" id="leftmenuitem_{#$smarty.foreach.outmenu.iteration#}">
	<ul>
	{#foreach from=$item.mItems item=s_item key=s_key#}
	<li><a href="member.php?{#$s_item#}">{#$s_key#}</a></li>
	{#/foreach#}
	</ul>
	</div>
	{#/foreach#}
</div>
<!-- end -->
<!--右侧-->
<div class="member-main">

{#if $type eq "profile"#}
{#if $action eq "basic"#}
<form action="{#$actionurl#}" name="member" id="member" method="post">
    <div class="member-s">
		<div class="member-ss">{#$uimsg.email#}</div>
		<div class="member-sss"><input type="text" id="email" name="email" value="{#$user.email#}" />&nbsp;<input type="checkbox" class="checkbox" name="publicemail" id="publicemail" value="{#$user.publicemail#}" {#$ifpublicemail#} />&nbsp;{#$uimsg.public#}</div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.qq#}</div>
		<div class="member-sss"><input type="text" id="qq" name="qq" value="{#$user.qq#}" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.msn#}</div>
		<div class="member-sss"><input type="text" id="msn" name="msn" value="{#$user.msn#}" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.location#}</div>
		<div class="member-sss"><input type="text" id="location" name="location" value="{#$user.location#}" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.site#}</div>
		<div class="member-sss"><input type="text" id="site" name="site" value="{#$user.site#}" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.gender#}</div>
		<div class="member-sss"><input type="radio" class="checkbox" value="0" name="gender" id="gender_0" {#$gender_0#} />&nbsp;{#$uimsg.male#}&nbsp;<input type="radio" class="checkbox" value="1" name="gender" id="gender_1" {#$gender_1#} />&nbsp;{#$uimsg.female#}&nbsp;<input type="radio" class="checkbox" value="3" name="gender" id="gender_3" {#$gender_3#} />&nbsp;{#$uimsg.secrecy#}</div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.birthday#}</div>
		<div class="member-sss">{#$year_option#}{#$uimsg.year#}&nbsp;{#$month_option#}{#$uimsg.month#}&nbsp;{#$day_option#}{#$uimsg.day#}&nbsp;</div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.signature#}</div>
		<div class="member-sss"><textarea id="signature" name="signature" rows="7" cols="45">{#$user.signature#}</textarea>&nbsp;<input type="checkbox" class="checkbox" name="showsign" id="showsign" value="{#$user.showsign#}" {#$ifshowsign#} />&nbsp;{#$uimsg.public#}</div>
    </div>
    <div class="member-submit"><input class="hidden" name="submitted" type="hidden" value="1"><input type="submit" value="{#$uimsg.submit#}" class="button" name="submit"><input type="reset" value="{#$uimsg.reset#}" class="button" name="reset"></div>
</form>
{#elseif $action eq "pw"#}
<form action="{#$actionurl#}" name="member" id="member" method="post">
	<div class="member-s">
		<div class="member-ss">{#$uimsg.oldpw#}</div>
		<div class="member-sss"><input type="password" id="oldpw" name="oldpw" value="" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.newpw#}</div>
		<div class="member-sss"><input type="password" id="newpw" name="newpw" value="" /></div>
    </div>
    <div class="member-s">
		<div class="member-ss">{#$uimsg.rnewpw#}</div>
		<div class="member-sss"><input type="password" id="rnewpw" name="rnewpw" value="" /></div>
    </div>
    <div class="member-submit"><input class="hidden" name="submitted" type="hidden" value="1"><input type="submit" value="{#$uimsg.submit#}" class="button" name="submit"><input type="reset" value="{#$uimsg.reset#}" class="button" name="reset"></div>
</form>
{#elseif $action eq "avatar"#}
<form action="{#$actionurl#}" method="post" enctype="multipart/form-data">
	<div class="show_avatar">
		<div><span>当前头像</span>&nbsp;<img src="{#$user.avatar#}" class="big_user_avatar" /></div>
		<div class="list_avatar"><span>系统默认头像：您可以选择网站内置的图片作为您的头像。</span>
			<p>{#foreach from=$avatar_list item=item name=avatar#}<img src="{#$PB_ENV.PB_URL#}images/avatars/portrait/{#$item#}" id="avatar_{#$smarty.foreach.avatar.iteration#}" name="{#$item#}" onclick="changeAvatar('{#$smarty.foreach.avatar.iteration#}')" />{#/foreach#}</p>
		</div>
		{#if $allowavatar eq "1"#}
		<div class="input_avatar"><span>链接头像：输入图片在其他站点中的地址，必须以http://开头。</span>
		<p><input type="text" class="forminput" name="linkavatar" value="http://" size="50" /></p>
		{#if $allowuploadavatar eq "1"#}<span>上传头像：从您的电脑上传本地图片。图片尺寸100 * 100效果最佳</span>
		<p><input type="file" class="forminput" name="uploadavatar" size="35" /></p>
		</div>
		{#/if#}
		{#/if#}
		<div class="member-submit">
			<input type="hidden" value="submitted" name="1" /><input type="hidden" value="" name="savatar" id="savatar" /><input type="submit" class="button" value="{#$uimsg.submit#}" /><input type="reset" name="reset" class="button" value="{#$uimsg.cancel#}" />
		</div>
	</div>
	</form>
{#else#}
<!--默认页-->
<table cellpadding="0" cellspacing="0" width="100%" class="table_member">
	<tr>
		<td width="18%" class="center"><img src="{#$customer.avatar#}" alt="{#$customer.username#}" class="middle_user_avatar" /><br /><a href="user.php?uid={#$customer.uid#}">{#$customer.username#}</a></td>
		<td width="46%" valign="middle">{#$uimsg.email#}：{#$customer.email#}<br />
		 {#$uimsg.lastvisit#}：{#$customer.lastvisit#}<br /></td>
		<td width="18%" valign="top">
	{#$uimsg.postnum#}：{#$customer.postnum#}<br />
	{#$uimsg.commentnum#}：{#$customer.commentnum#}<br />
	{#$uimsg.diggnum#}：{#$customer.diggnum#}<br />
	{#$uimsg.burynum#}：{#$customer.burynum#}<br />
		</td>
		<td width="18%"  valign="top">
	{#$siteconfig.pb_customcredit#}：{#$customer.currency#}<br />
	{#$uimsg.uploadnum#}：{#$customer.uploadnum#}<br />
	{#$uimsg.visitcount#}：{#$customer.visitcount#}
		</td>
	</tr>
</table>
{#if $show_notice eq "1"#}
<div class="member_notice">{#$uimsg.member_active#}</div>
{#/if#}
{#/if#}
{#elseif $type eq "msg"#}
	{#if $action eq "receivebox"#}
	<div class="sortTable">{#$msg#}</div>
	<form name="del" action="member.php?type=msg&amp;action=del" method="post">
	<table width="100%" class="msgbox">
		<tr>
			<td height="20px" width="5%">&nbsp;</td><td width="15%" align="center">{#$uimsg.msg_addresser#}</td><td width="*" align="center">{#$uimsg.msg_subject#}</td><td width="10%" align="center">{#$uimsg.msg_status#}</td><td  width="15%" align="center">{#$uimsg.msg_postdate#}</td>
		</tr>
		{#foreach from=$msgifno item=item name=msg key=key#}
		<tr>
			<td align="center"><input type="checkbox" class="checkbox" name="mid[]" size="2" value="{#$item.mid#}"/></td>
			<td align="center"><a href="user.php?uid={#$item.fuid#}" target="_blank">{#$item.fauthor#}</a></td>
			<td><a href="member.php?type=msg&amp;action=read&amp;mid={#$item.mid#}">{#$item.title#}</a></td>
			<td align="center">{#$item.ifread#}</td>
			<td>{#$item.postdate#}</td>
		</tr>
		{#/foreach#}
		<tr>
			<td colspan="5">{#$mult#}</td>
		</tr>
		<tr>
			<td colspan="5"><div class="center"><input type="button" class="button" name="chkall" value="{#$uimsg.choose_all#}" onclick="PBchoseAll(this.form)" /><input class="button" type="submit" value="{#$uimsg.del#}" /></div>
			</td>
		</tr>
	</table>
	</form>
	{#elseif $action eq "sendbox"#}
	<div class="sortTable">{#$msg#}</div>
	<form name="del" action="member.php?type=msg&amp;action=del" method="post">
	<table width="100%" class="msgbox">
		<tr><td height="20px" width="5%">&nbsp;</td><td width="15%" align="center">{#$uimsg.msg_addressee#}</td><td width="*" align="center">{#$uimsg.msg_subject#}</td><td  width="15%" align="center">{#$uimsg.msg_postdate#}</td></tr>
		{#foreach from=$msgifno item=item name=msg key=key#}
		<tr>
			<td align="center"><input type="checkbox" class="checkbox" name="mid[]" size="2" value="{#$item.mid#}"/></td>
			<td align="center"><a href="user.php?uid={#$item.fuid#}" target="_blank">{#$item.tauthor#}</a></td>
			<td><a href="member.php?type=msg&amp;action=read&amp;mid={#$item.mid#}">{#$item.title#}</a></td>
			<td align="center">{#$item.postdate#}</td>
		</tr>
		{#/foreach#}
		<tr>
			<td colspan="4">{#$mult#}</td>
		</tr>
		<tr>
			<td colspan="4"><div class="center"><input type="button" class="button" name="chkall" value="{#$uimsg.choose_all#}" onclick="PBchoseAll(this.form)" /><input class="button" type="submit" value="{#$uimsg.del#}" /></td>
		</tr>
	</table>
	</form>
	{#elseif $action eq "read"#}
	<div class="sortTable">{#$uimsg.msg_subject#}：{#$read_msg.title#}<br />{#$uimsg.msg_postdate#}：{#$read_msg.postdate#}<br />{#$uimsg.msg_from#}：{#$read_msg.username#}&nbsp;<a href="member.php?type=my&amp;action=friend&amp;job=add&amp;uid={#$read_msg.fuid#}">{#$uimsg.addfriend#}</a></div>
	<table width="100%" class="msgbox">
		<tr><td><p>{#$read_msg.content#}</p></td></tr>
	</table>
	<div class="sortTable">[<a href="member.php?type=msg&amp;action=write&amp;mid={#$read_msg.mid#}&amp;tuid={#$read_msg.fuid#}">{#$uimsg.reply#}</a>]&nbsp;[<a href="member.php?type=msg&amp;action=del&amp;mid[]={#$read_msg.mid#}">{#$uimsg.del#}</a>]&nbsp;[<a href="javascript:history.go(-1);">{#$uimsg.back#}</a>]</div>
	{#elseif $action eq "write"#}
	<div class="msgContent">
	<form name="send" action="member.php?type=msg&amp;action=write" method="post">
	<table width="100%" class="msgbox">
		<tr>
			<td>{#$uimsg.msg_addressee#}</td>
			<td><input type="text" name="receiver" class="text-area" size="35" value="{#$write_msg.username#}" /></td>
		</tr>
		 <tr>
			<td>{#$uimsg.title#}</td>
			<td><input name="title" type="text" class="text-area" value="{#$write_msg.title#}" size="35" /></td>
		</tr>
		<tr>
			<td valign="top">{#$uimsg.content#}</td>
			<td><textarea name="content" rows="7" cols="45" />{#$write_msg.content#}</textarea>&nbsp;{#$uimsg.msg_save#}&nbsp;<input class="checkbox" type="checkbox" name="msave" value="1" /></td>
		</tr>
		<tr>
			<td colspan="2"><div class="msg-submit"><input type="hidden" name="submitted" value="1" /><input class="button" type="submit" value="{#$uimsg.sendpm#}" /></div></td>
		</tr>
	</table>
	</form>
	</div>
	{#elseif $action eq "delfull"#}
	<form name="send" action="member.php?type=msg&amp;action=delfull" method="post">
	<table width="100%" class="msgbox">
		<tr>
			<td>{#$uimsg.msg_dropmsg#}</td>
		</tr>
		<tr>
			<td><div class="msg-submit"><input type="hidden" name="submitted" value="1" /><input class="button" type="submit" value="{#$uimsg.empty#}" /></div></td>
		</tr>
	</table>
	</form>
{#/if#}
{#elseif $type eq "my"#}
{#if $action eq "collection"#}
	<div class="sortTable">{#$favorite#}</div>
	<form name="del" action="member.php?type=my&amp;action=collection&amp;job=del" method="post">
	<table width="100%" class="msgbox">
		<tr>
			<td height="20px" width="5%">&nbsp;</td><td align="center">{#$uimsg.title#}</td><td align="center">{#$uimsg.cate#}</td><td align="center">{#$uimsg.author#}</td>
		</tr>
		{#foreach from=$favs item=item name=fav#}
		<tr>
			<td align="center"><input type="checkbox" class="checkbox" name="tids[]" size="2" value="{#$item.tid#}"/></td>
			<td><a href="show.php?tid={#$item.tid#}" target="_blank">{#$item.subject#}</a></td>
			<td align="center"><a href="category.php?cid={#$item.cid#}" target="_blank">{#$item.cate#}</a></td>
			<td align="center"><a href="user.php?uid={#$item.uid#}" target="_blank">{#$item.author#}</a></td>
		</tr>
		{#/foreach#}
		<tr>
			<td colspan="4">{#$mult#}</td>
		</tr>
		<tr>
			<td colspan="4"><div class="center"><input class="button" type="button" name="chkall" value="{#$uimsg.choose_all#}" onclick="PBchoseAll(this.form)" /><input class="button" type="submit" value="{#$uimsg.del#}" /></div></td>
		</tr>
	</table>
	</form>
{#elseif $action eq "friend"#}

{#if $friendconfirm eq "1"#}
<div class="sortTable">{#$uimsg.msg_readyfriend#}</div>
{#foreach from=$unfriends item=item#}
<div class="pack_user"><a href="{#$item.username#}" target="_blank"><img src="{#$item.avatar#}" alt="" /></a>
	<ul>
		<li><a href="user.php?uid={#$item.uid#}" target="_blank">{#$item.username#}</a></li>
		<li><a href="member.php?type=my&amp;action=friend&amp;job=confirm&amp;uid={#$item.uid#}">{#$uimsg.add#}</a> | <a href="member.php?type=my&amp;action=friend&amp;job=deny&amp;uid={#$item.uid#}" onclick="return confirm('{#$uimsg.msg_denyfriend#} {#$item.username#} ?');">{#$uimsg.deny#}</a></li>
	</ul>
</div>
{#/foreach#}
{#/if#}
<div class="clear"></div>
<div class="sortTable">我的好友</div>
{#foreach from=$friends item=item#}
<div class="pack_user"><a href="user.php?uid={#$item.fuid#}" target="_blank"><img src="{#$item.avatar#}" alt="" /></a>
	<ul>
		<li><a href="user.php?uid={#$item.fuid#}" target="_blank">{#$item.username#}</a></li>
		<li class="master_op"><a href="member.php?type=msg&amp;action=write&amp;tuid={#$item.fuid#}">{#$uimsg.contract#}</a> | <a href="member.php?type=my&amp;action=friend&amp;job=del&amp;uid={#$item.fuid#}" onclick="return confirm('{#$uimsg.msg_delfriend#} {#$item.username#} ?');">{#$uimsg.del#}</a></li>
	</ul>
</div>
{#/foreach#}
{#$mult_page#}

{#elseif $action eq "invitecode"#}
<div class="sortTable">邀请码申请</div>
<form name="del" action="member.php?type=my&amp;action=invitecode&amp;job=apply" method="post">
<table width="100%" class="msgbox">
	<tr>
		<td align="center">申请理由</td>
		<td><textarea id="reason" name="reason" rows="7" cols="45"></textarea></td>
	</tr>
	<tr>
		<td align="center">申请数量</td>
		<td><input type="text" name="num" size="5" /></td>
	</tr>
	<tr>
		<td colspan="2"><div class="center"><input class="button" type="submit" value="递交" /></div></td>
	</tr>
</table>
</form>
<div class="sortTable">我的邀请码</div>
<form name="del" action="member.php?type=my&amp;action=invitecode&amp;job=del" method="post">
<table width="100%" class="msgbox">
	<tr>
		<td height="20px" width="5%">&nbsp;</td><td align="center">邀请码</td><td align="center">失效日期</td>
	</tr>
	{#foreach from=$invitecode item=item#}
	<tr>
		<td align="center"><input type="checkbox" class="checkbox" name="id[]" size="2" value="{#$item.id#}"/></td>
		<td align="center">{#$item.invitecode#}</td>
		<td align="center">{#$item.endtime#}</td>
	</tr>
	{#/foreach#}
	<tr>
		<td colspan="3">{#$mult#}</td>
	</tr>
	<tr>
		<td colspan="3"><div class="center"><input class="button" type="button" name="chkall" value="{#$uimsg.choose_all#}" onclick="PBchoseAll(this.form)" /><input class="button" type="submit" value="{#$uimsg.del#}" /></div></td>
	</tr>
</table>
</form>
{#/if#}

{#/if#}

<!--右侧内容-->
</div>
</div>
</div>
{#include file="footer.html"#}

</body>
</html>