<!--<?php print <<<EOT
-->
<style type="text/css">
.face{margin:0;padding:0;background:$bgcolor;}
.face img{border:1px solid $tdcolor;margin:.1em;cursor:pointer}
.s3,a.s3{color:#f06f18;}
</style>
<div class="bdbA">
	<div id="breadcrumbs">
		<a class="crumbs-item gray3" href="$db_bfn" title="$db_bbsname">$db_bbsname</a><a class="crumbs-item gray3" href="u.php"><i> </i>用户中心</a>
<!--
EOT;
if($action=='forumright'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong><a href="thread.php?fid=$fid">$rt[name]</a></strong></span>
<!--
EOT;
}elseif($action=='log'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>帖子操作记录</strong></span>
<!--
EOT;
}elseif($action=='change'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>积分转换</strong></span>
<!--
EOT;
}elseif($action=='buy'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>特殊组购买</strong></span>
<!--
EOT;
}elseif($action=='style'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>自定义风格</strong></span>
<!--
EOT;
}elseif($action=='forumsell'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>版块购买</strong></span>
<!--
EOT;
}elseif($action=='modify'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>编辑资料</strong></span>
<!--
EOT;
}elseif($action=='bbsset'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>论坛设置</strong></span>
<!--
EOT;
}elseif($action=='permission'){print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>用户权限</strong></span>
<!--
EOT;
}else{print <<<EOT
-->
			<span class="crumbs-item current"><i> </i><strong>设置首页</strong></span>
<!--
EOT;
}print <<<EOT
-->
	</div>
</div>
<style>
#set-wrap{width:100%;margin:8px auto 1.5em;line-height:150%;}
#set-side{width:170px;float:left;}
#set-content{margin-left:173px;_margin-left:170px;background:$bgcolor;}
#set-content-wrap{border:1px solid $tdcolor;padding:1em;}
#set-side-wrap {border:4px solid $tdcolor;background:$bgcolor;}
.set-h2{background:url($imgpath/$stylepath/set-h3.gif) repeat-x;height:30px; line-height:30px;border-bottom:$tdcolor solid 1px;margin:0;padding:0 .6em;font-size:12px;display:block}
.color8{color:#D2C100}
#set-menu{font-size:14px;padding:.6em 0 .6em 1em;margin:0;list-style:none}
#set-menu li{margin:0;padding:.3em 0 0 1.5em;background:url($imgpath/$stylepath/u-fav.gif) no-repeat 0 0.5em;}
#set-menu li a{color:#949494}
#set-menu li.current{background:url($imgpath/$stylepath/u-fav-cur.gif) no-repeat 0 0.5em;}
#set-menu li.current a{color:#707070;font-weight:700}
.set-content-left{margin-right:320px;}
.set-content-right{width:300px;float:right}
.set-table1{line-height:200%}
.set-table1 .tdpr2{padding-right:2em}
#set-content-wrap td{vertical-align:top;}
.set-table2 td{padding:.5em 1em;border-bottom:1px dotted $cbgborder;}
.set-table2 td.td1{text-align:right;padding:.5em 1em;}
.set-tab-table{background:$cbgcolor url($imgpath/$stylepath/set-tab-dot.gif) repeat-x left bottom}
.set-tab-table td{border-bottom:0;padding:.2em 2em;border-right:1px solid $bgcolor;border-left:1px solid $tdcolor}
.set-tab-table td.current{border:1px solid $tdcolor;border-bottom:0;background:$bgcolor;}
.set-tab-table td.current a{color:$headfontone;font-weight:700}
.set-tab-box{border:1px solid $tdcolor;border-top:0;padding:.5em 1em}
textarea{font-size:12px;}
</style>
<div id="set-wrap">
	<div id="set-side">
		<div id="set-side-wrap">
			<h2 class="set-h2"><a href="profile.php" class="color8">设置中心</a> </h2>
			<ul id="set-menu">
				<li id="pro_modify">
					<a href="profile.php?action=modify">编辑资料</a>
				</li>
				<li id="pro_bbsset">
					<a href="profile.php?action=bbsset">论坛设置</a>
				</li>
				<li id="pro_permission">
					<a href="profile.php?action=permission">用户权限</a>
				</li>
<!--
EOT;
if($_G['atclog']){print <<<EOT
-->
				<li id="pro_log">
					<a href="profile.php?action=log">帖子操作记录</a>
				</li>
<!--
EOT;
}print <<<EOT
-->
				<li>
					<a href="userpay.php">积分管理</a>
				</li>
				<li id="pro_change">
					<a href="profile.php?action=change">积分转换</a>
				</li>
				<li id="pro_buy">
					<a href="profile.php?action=buy">特殊组购买</a>
				</li>
<!--
EOT;
if($_G['maxcstyles'] && !defined('M_P')){print<<<EOT
-->
				<li id="pro_style">
					<a href="profile.php?action=style">自定义风格</a>
				</li>
<!--
EOT;
}print<<<EOT
-->
			</ul>
		</div>
	</div>
<script language="javascript">
setCurrent('pro_$action','','current');
</script>
	<div id="set-content">
<!--
EOT;
if(!$action){print<<<EOT
-->
		<div id="set-content-wrap" class="cc">
			<div class="set-content-right">
				<div style="padding:0 0 .5em 0">
					<div class="set-tab-table">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr class="tac">
								<td class="current">最新的短消息</td>
								<td><a href="message.php" class="link5">进入收件箱</a></td>
							</tr>
						</table>
					</div>
					<div class="set-tab-box">
						<table width="100%" border="0" cellspacing="0" cellpadding="0" class="set-table1">
							<tr>
								<td class="gray3">标题</td>
								<td width="25%" class="gray3">来自</td>
							</tr>
<!--
EOT;
foreach($msgdb as $key => $value){
$titleadd = $value['ifnew'] ? '未读':'已读';
print <<<EOT
-->
							<tr>
								<td><a href="message.php?action=read&mid=$value[mid]" target="_blank" title="{$value[mdate]} {$titleadd}">$value[title]</a></td>
								<td><a href="u.php?action=show&uid=$value[fromuid]" class="gray3">$value[username]</a></td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
					</div>
				</div>
				<div style="padding:.5em 0">
					<div class="set-tab-table">
						<table border="0" cellspacing="0" cellpadding="0">
							<tr class="tac">
								<td class="current">最近收藏的文章</td>
								<td><a href="u.php?action=favor&uid=$winduid" class="link5">进入收藏夹</a></td>
							</tr>
						</table>
					</div>
				<div class="set-tab-box">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="set-table1">
						<tr>
							<td class="gray3">标题</td>
							<td width="25%" class="gray3">作者</td>
						</tr>
<!--
EOT;
foreach ($favordb as $key => $value) {
print <<<EOT
-->
						<tr>
							<td><a href="read.php?tid=$value[tid]" target="_blank" title="$value[postdate]">$value[subject]</a></td>
							<td><a href="u.php?action=show&uid=$value[authorid]" target="_blank" class="gray3">$value[author]</a></td>
						</tr>
<!--
EOT;
}print <<<EOT
-->
					</table>
				</div>
			</div>
		</div>
		<div class="set-content-left">
			<div style="float:left;width:100%">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td class="tac" width="80" style="vertical-align:top">
							$userface<br />
							<div style="padding:.3em 0"><a href="profile.php?action=modify&info_type=face" class="gray3">修改头像</a></div>
						</td>
						<td style="vertical-align:top; padding-left:1.5em">
							<div style="padding:0 0 1em" class="bdbdash">
								<div>
									<span style="font:bold 16px Verdana">$windid</span> <span class="gray3">(数字ID:$winduid)</span> <a href="profile.php?action=modify" class="link5">编辑资料</a>
								</div>
<!--
EOT;
if($_G[allowhonor]){print <<<EOT
-->
							<div style="padding:.3em 0 1em;">
								<span id="honor">
<!--
EOT;
if($winddb['honor']){print <<<EOT
-->
									{$winddb[honor]}
<!--
EOT;
}else{print <<<EOT
-->
									您还没有设置个性签名
<!--
EOT;
}print <<<EOT
-->
								</span>
								<a id="sethonor" onclick="sendmsg('pw_ajax.php','action=honor',this.id)" class="gray3" style="cursor:pointer"><img src="$imgpath/$stylepath/infobox-edit.gif" />编辑</a>
							</div>
<script language="JavaScript">
function honor() {
	var str = ajax.request.responseText.split("\t");
	if (str[0] == 'success') {
		getObj('honor').innerHTML = '&nbsp;' + (str[1] ? str[1] : '您还没有设置个性签名') + '&nbsp;';
	} else {
		ajax.guide();
	}
}
</script>
<!--
EOT;
}print <<<EOT
-->
								<div>
									<a href="u.php" class="link5">我的首页</a>　<a href="u.php?action=topic" class="link5">我的主题</a>　<a href="u.php?action=post" class="link5">我的回复</a>　<a href="u.php?action=favor" class="link5">我的收藏</a>
								</div>
							</div>
							<div style="padding:1em 0;" class="bdbdash">
								<table border="0" cellspacing="0" cellpadding="0" class="set-table1">
									<tr>
										<td class="tdpr2" width="50%">
											精华: $userdb[digests]<br />
											发帖: $userdb[postnum]<br />
											{$credit->cType[rvrc]}: $userdb[rvrc] {$credit->cUnit[rvrc]}<br />
											{$credit->cType[credit]}: $userdb[credit] {$credit->cUnit[credit]}<br />
											{$credit->cType[money]}: $userdb[money] {$credit->cUnit[money]}<br />
											{$credit->cType[currency]}: $userdb[currency] {$credit->cUnit[currency]}<br />
										</td>
										<td class="gray3">
<!--
EOT;
if($systitle){print <<<EOT
-->
											系统头衔: $systitle $userdb[privilege]<br />
<!--
EOT;
}print <<<EOT
-->
											会员头衔: $memtitle<br />
											在线时间: $userdb[onlinetime] 小时<br />
											注册时间: $userdb[regdate]<br />
											最后登录: $userdb[lastvisit]
										</td>
									</tr>
								</table>
							</div>
							<div style="padding:1em 0;" class="bdbdash">
								<table border="0" cellspacing="0" cellpadding="0" class="set-table1">
									<tr>
										<td>
<!--
EOT;
foreach($_CREDITDB as $key => $value){
$usercredit = $creditdb ? $creditdb[$key] : 0;
print <<<EOT
-->
											$value[0]($value[2]): $usercredit $value[1]<br />
<!--
EOT;
}print <<<EOT
-->
										</td>
									</tr>
								</table>
							</div>
<!--
EOT;
if($_G['ifmemo']){print <<<EOT
-->
							<div style="padding:1em 0 0;">
								<span class="link5">我的便笺</span>
<!--
EOT;
if($userdb[postdate]){print <<<EOT
-->
<span class="gray3">(更新时间:$userdb[postdate])</span>
<!--
EOT;
}print <<<EOT
-->
								<form name="FORM" method="post" action="profile.php?">
									<input type="hidden" name="verify" value="$verifyhash" />
									<input type="hidden" name="action" value="memo" />
									<input type="hidden" name="mm_mid" value="$userdb[mmid]" />
									<div style="padding:.5em 0">
										<textarea style="width:90%; height:5em" onkeydown="quickpost(event)" name="mm_content">$userdb[mcontent]</textarea>
									</div>
									<div>
										<input class="btn" type="submit" name="Submit" value=" 提 交 "> <span class="gray3">或按"Crtl+Enter"保存</span>
									</div>
								</form>
							</div>
<script language="JavaScript">
function quickpost(event){
	if ((event.ctrlKey && event.keyCode == 13) || (event.altKey && event.keyCode == 83)) {
		document.FORM.Submit.click();
	}
}
</script>
<!--
EOT;
}print <<<EOT
-->
						</td>
					</tr>
				</table>
			</div>
			<div class="c"></div>
			<div style="padding:1em 0">
				<table border="0" cellspacing="0" cellpadding="0" class="set-table1">
					<tr>
						<td class="tdpr2 gray3"></td>
					</tr>
				</table>
			</div>
		</div></div></div></div>
<!--
EOT;
}elseif($action=='modify'){print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac" id="infolist">
							<td id="base"><a style="cursor:pointer" onclick="showTabs('infolist','base','td','current')">基本资料</a></td>
							<td id="trade"><a style="cursor:pointer" onclick="showTabs('infolist','trade','td','current')">交易信息</a></td>
							<td id="link"><a style="cursor:pointer" onclick="showTabs('infolist','link','td','current')">联系方式</a></td>
							<td id="face"><a style="cursor:pointer" onclick="showTabs('infolist','face','td','current')">修改头像</a></td>
							<td id="safe"><a style="cursor:pointer" onclick="showTabs('infolist','safe','td','current')">密码安全</a></td>
<!--
EOT;
if($customfield){print <<<EOT
-->
							<td id="other"><a style="cursor:pointer" onclick="showTabs('infolist','other','td','current')">扩展资料</a></td>
<!--
EOT;
}print <<<EOT
-->
						</tr>
					</table>
				</div>
				<form id="creator" name="creator" action="profile.php?action=modify&" method="post" onsubmit="return procheck(this)" enctype="multipart/form-data">
					<input type="hidden" name="verify" value="$verifyhash" />
					<div class="set-tab-box">
						<div style="margin:1em 2em;display:none" id="info_base">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
<!--
EOT;
if($groupselect){print <<<EOT
-->
								<tr>
									<td class="td1" width="25%">头衔选择</td>
									<td><select name="newgroupid" class="input">$groupselect</select> 选择一个用户组头衔作为你在论坛上的头衔</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
								<tr>
									<td class="td1" width="25%"> 性别</td>
									<td><input type="radio" name="progender" value="0" $sexselect[0] /> 保密
										<input type="radio" name="progender" value="1" $sexselect[1] /> 男
										<input type="radio" name="progender" value="2" $sexselect[2] /> 女
									</td>
								</tr>
								<tr>
									<td class="td1"> 生日</td>
									<td>
										<select name="proyear" class="input">
											<option value=""></option>
<!--
EOT;
for($i=$rg_timestart;$i<=$rg_timeend;$i++){print <<<EOT
-->
											<option value="$i" $yearslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
										</select>年
										<select name="promonth" class="input">
											<option value=""></option>
<!--
EOT;
for($i=1;$i<=12;$i++){print <<<EOT
-->
											<option value="$i" $monthslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
	-->
										</select>月
										<select name="proday" class="input">
											<option value=""></option>
<!--
EOT;
for($i=1;$i<=31;$i++){print <<<EOT
-->
											<option value="$i" $dayslect[$i]>$i</option>
<!--
EOT;
}print <<<EOT
-->
										</select>日
									</td>
								</tr>
<!--
EOT;
foreach($custominfo as $key => $value){print <<<EOT
-->
								<tr>
									<td class="td1">$value[0]</td>
									<td><input class="input" type="text" size="20" name="customdata[$key]" value="{$customdata[$key]}" /></td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
								<tr>
									<td class="td1">来自</td>
									<td><input class="input" type="text" size="20" maxlength="14" name="profrom" value="$userdb[location]" /></td>
								</tr>
								<tr>
									<td class="td1"> 个人主页</td>
									<td><input class="input" type="text" size="50" maxlength="75" name="prohomepage" value="$userdb[site]" /></td>
								</tr>
<!--
EOT;
if($_G[allowhonor]){print <<<EOT
-->
								<tr>
									<td class="td1">个性签名</td>
									<td>
										<input class="input" type="text" size="40" name="prohonor" value="$userdb[honor]" />（将在首页和帖子页面用户信息处显示）
									</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
								<tr>
									<td class="td1">自我简介</td>
									<td><textarea class="input" name="prointroduce" rows="4" cols="50">$userdb[introduce]</textarea></td>
								</tr>
								<tr>
									<td class="td1">帖子签名</td>
									<td><textarea class="input" name="prosign" rows="4" cols="50">$userdb[signature] </textarea>（将在每个帖子下方显示，字节限制：少于{$_G[signnum]}字节）</td>
								</tr>
							</table>
						</div>
						<div style="margin:1em 2em;display:none" id="info_trade">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td class="td1" width="25%">支付宝帐号</td>
									<td><input class="input" type="text" size="20" name="alipay" value="$trade[alipay]" /></td>
								</tr>
								<tr>
									<td class="td1">个人商品分类</td>
									<td>
										<table width="240">
											<tr>
												<td width="60%">分类名</td>
												<td><a style="color:blue;cursor:pointer" onclick="addtrade();">[添加]</a></td>
											</tr>
											<tbody id="trade_mode" style="display:none"><tr>
												<td><input class="input" type="text" name="tradetype[]" size="10" /></td>
												<td><a style="color:orange;cursor:pointer" onclick="removetrade(this);">[删除]</a></td>
											</tr></tbody>
											<tbody id="trade_c">
<!--
EOT;
if ($trade['tradetype']) {
foreach ($trade['tradetype'] as $key => $value) {print <<<EOT
-->
											<tr>
												<td><input class="input" type="text" name="tradetype[$key]" value="$value" size="10" /></td>
												<td><a style="color:orange;cursor:pointer" onclick="removetrade(this);">[删除]</a></td>
											</tr>
<!--
EOT;
}}print <<<EOT
-->
											</tbody>
										</table>
									</td>
								</tr>
							</table>
<script language="JavaScript">
function addtrade() {
	var s = getObj('trade_mode').firstChild.cloneNode(true);
	getObj('trade_c').appendChild(s);
}
function removetrade(obj) {
	var o = obj.parentNode.parentNode;
	o.parentNode.removeChild(o);
}
addtrade();
</script>
						</div>
						<div style="margin:1em 2em;display:none" id="info_link">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td class="td1" width="25%">QQ</td>
									<td><input class="input" type="text" size="25" maxlength="14" name="prooicq" value="$userdb[oicq]" /></td>
								</tr>
								<tr>
									<td class="td1" width="25%">阿里旺旺</td>
									<td><input class="input" type="text" size="25" maxlength="30" name="proaliww" value="$userdb[aliww]" /></td>
								</tr>
								<tr>
									<td class="td1">Yahoo</td>
									<td><input class="input" type="text" size="25" name="proyahoo" value="$userdb[yahoo]" /></td>
								</tr>
								<tr>
									<td class="td1">Msn</td>
									<td><input class="input" type="text" size="25" name="promsn" value="$userdb[msn]" /></td>
								</tr>
							</table>
						</div>
						<div style="margin:1em 2em;display:none" id="info_face">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td class="td1" width="25%">
										<img src="$iconurl"$iconsize name="useravatars" />
									</td>
									<td>
										<div id="openchang" style="float:left;width:100%;margin-top:1%;">
											<div style="float:left;margin-right:1%;">
												<input type="radio" name="facetype" value="1" onclick="CkFaceType(this.value)">系统头像
											</div>
<!--
EOT;
if($_G[allowportait]){print <<<EOT
-->
											<div style="float:left;margin-right:1%;">
												<input type="radio" name="facetype" value="2" onclick="CkFaceType(this.value)">头像链接
											</div>
<!--
EOT;
}if($db_ifupload && $_G[upload]){print <<<EOT
-->
											<div style="float:left;">
												<input type="radio" name="facetype" value="3" onclick="CkFaceType(this.value)">头像上传
											</div>
<!--
EOT;
}print <<<EOT
	-->
											<div class="c"></div>
											<div id="face1" style="float:left;width:100%;margin-top:1%;display:none;">
												<a id="profile" style="cursor:pointer" onclick="sendmsg('pw_ajax.php','action=showface',this.id);" title="头像列表"><b>[头像列表]</b></a>
												<input type="hidden" name="proicon" value="$iconfile" />
											</div>
											<div id="face2" style="float:left;width:100%;margin-top:1%;display:none;">
												头像链接 <input name="httpurl[0]" value="$httpurl" class="input" type="text" size="40" /> 必须以 http://开头<br />
												头像宽度 <input name="httpurl[1]" value="$width2" class="input" size="2" maxlength="3" /> 必须是 1 -- $db_imgwidth 之间的一个整数。<br />
												头像高度 <input name="httpurl[2]" value="$height2" class="input" size="2" maxlength="3" /> 必须是 1 -- $db_imgheight 之间的一个整数。<b>头像高度留空，则根据宽度自适应</b>
											</div>
											<div id="face3" style="float:left;width:100%;margin-top:1%;display:none;">
												头像上传 <span id="reupload" style="margin-left:1px"><input class="input file" type="file" id="upload" name="upload" /><a class="abtn" unselectable="on" onclick="UpLoadFace()">上传</a></span><br />
												头像宽度 <input name="uploadurl[1]" value="$width3" class="input" size="2" maxlength="3" /> 必须是 1 -- $db_imgwidth 之间的一个整数。<br />
												头像高度 <input name="uploadurl[2]" value="$height3" class="input" size="2" maxlength="3" /> 必须是 1 -- $db_imgheight 之间的一个整数。<b>头像高度留空，则根据宽度自适应</b>
											</div>
										</div>
									</td>
								</tr>
							</table>
						</div>

						<div style="margin:1em 2em;display:none" id="info_safe">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
<!--
EOT;
if($ifppt){print <<<EOT
-->
								<tr>
									<td class="td1" width="25%">原密码</td>
									<td><input class="input" type="password" size="20" maxlength="75" name="oldpwd" value="" /> 修改密码或邮箱时需要密码验证</td>
								</tr>
								<tr>
									<td class="td1">新密码</td>
									<td><input class="input" type="password" size="20" maxlength="75" name="propwd" value="" /></td>
								</tr>
								<tr>
									<td class="td1">确认密码</td>
									<td><input class="input" type="password" size="20" maxlength="75" name="check_pwd" value="" /></td>
								</tr>
								<tr>
									<td class="td1">E-MAIL</td>
									<td><input class="input" type="text" size="20" maxlength="75" name="proemail" value="$userdb[email]" />
									<input type="checkbox" name="propublicemail" value="1" $ifpublic />公开邮箱</td>
								</tr>
<!--
EOT;
if($db_ifsafecv){print <<<EOT
-->
								<tr>
									<td class="td1">安全问题</td>
									<td>
										<select class="input" name="question" onchange="showcustomquest(this.value)">
											<option value="-2">不修改安全问题和答案</option>
											<option value="0">无安全问题</option>
											<option value="1">我爸爸的出生地</option>
											<option value="2">我妈妈的出生地</option>
											<option value="3">我的小学校名</option>
											<option value="4">我的中学校名</option>
											<option value="5">我最喜欢的运动</option>
											<option value="6">我最喜欢的歌曲</option>
											<option value="7">我最喜欢的电影</option>
											<option value="8">我最喜欢的颜色</option>
											<option value="-1">自定义问题</option>
										</select>
										<input id="customquest" style="display:none" type="text" name="customquest" class="input">
									</td>
								</tr>
								<tr>
									<td class="td1">您的答案</td>
									<td><input type="text" name="answer" class="input"></td>
								</tr>
<!--
EOT;
}}else{print <<<EOT
-->
								<tr><td colspan="2" style="padding:10px 0">论坛开启通行证功能，修改用户密码，请登录 <a href="$db_pptserverurl">$db_pptserverurl</a></td></tr>
<!--
EOT;
}print <<<EOT
-->
							</table>
						</div>
<!--
EOT;
if($customfield){print <<<EOT
-->
						<div style="margin:1em 2em;display:none" id="info_other">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
<!--
EOT;
foreach($customfield as $value){
$value[required] && $value[descrip].='（必填内容）';
$editable=(!$userdb[$value[field]]||$value[editable])?'':'disabled';
if($value[type]=='1'){
$field_type="<input class=\"input\" type=\"text\" size=\"30\" name=\"$value[field]\" value=\"{$userdb[$value[field]]}\" $editable />";
}elseif($value[type]=='2'){
$field_type="<textarea name=\"$value[field]\" rows=\"5\" class=\"input\" cols=\"50\" $editable>{$userdb[$value[field]]}</textarea>";
}elseif($value[type]=='3'){
$field_type='';
foreach($value[options] as $v){
list($k,$v)=explode('=',$v);
$selected=$userdb[$value[field]]==$k?'selected':'';
$field_type.="<option value=\"$k\" $selected>$v</option>";
}$field_type="<select class=\"input\" name=\"$value[field]\" $editable>$field_type</select>";
}print <<<EOT
-->
								<tr>
									<td class="td1" width="25%">$value[title]</td>
									<td>$field_type $value[descrip]</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
							</table>
						</div>
<!--
EOT;
}print <<<EOT
-->
						<div class="tac" style=" padding:1em">
							<input class="btn" value="保存资料" type="submit">
							<input type="hidden" value="2" name="step" />
						</div>
					</div>
				</form>
			</div></div></div></div>
<iframe id="hideframe" name="hideframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
<script language="JavaScript">
var display = '$display';
function CkFaceType(value){
	var facetype = document.getElementsByName('facetype');
	for(i=0;i<facetype.length;i++){
		if(facetype[i].value == value){
			facetype[i].checked = true;
			getObj('face' + value).style.display = '';
		} else {
			getObj('face' + facetype[i].value).style.display = 'none';
		}
	}
}
CkFaceType('$icontype');
function showimage(imgpath,value){
	var path = imgpath + '/face/';
	facepath(path,value,false);
}
function facepath(iconurl,iconfile,showmsg,iconwidth,iconheight){
	if (showmsg) {
		if (showmsg == 'success') {
			ajax.time = setTimeout(function(){
				closep();
				alert('上传成功!');
			},1500);
			getObj('reupload').innerHTML = '<input class="input file" type="file" id="upload" name="upload" /><a class="abtn" unselectable="on" onclick="UpLoadFace()">上传</a>';
		} else if (showmsg == 'undefined_action') {
			ajax.time = setTimeout(function(){
				closep();
				alert('非法操作');
			},1500);
			return false;
		} else {
			ajax.time = setTimeout(function(){
				closep();
				alert(showmsg);
			},1500);
			return false;
		}
	}
	document.images.useravatars.src = iconurl + iconfile + '?' + new Date().getTime();
	if (iconwidth>0) document.images.useravatars.width = iconwidth;
	if (iconheight>0) document.images.useravatars.height = iconheight;
	document.creator.proicon.value = iconfile;
	return false;
}
function procheck(formct){
	if(formct.prointroduce.value.length>500){
		alert('自我介绍太长，请删掉一些，控制在200个字节以内');
		return false;
	}
}
function showcustomquest(qid){
	getObj('customquest').style.display = qid==-1 ? '' : 'none';
}
function UpLoadFace(){
	if (getObj('upload').value != '') {
		var uploadform = getObj('creator');
		var oldaction = uploadform.action;
		var oldonSubmit = uploadform.onSubmit;
		uploadform.action = 'profile.php?action=ajaxface';
		uploadform.onSubmit = '';
		uploadform.target = 'hideframe';
		uploadform.submit();
		uploadform.action = oldaction;
		uploadform.onSubmit = oldonSubmit;
		uploadform.target = '';
		read.obj = getObj('upload');
		read.guide();
		document.onmouseout = '';
	} else {
		alert('请选择要上传附件');
	}
}

function initStyleType(){
	if (display == '1') {
		getObj('tpskin1').style.display = '';
	} else {
		getObj('tpskin2').style.display = '';
	}
}

function ckStyleType(value){
	if (value == 'system') {
		getObj('tpskin1').style.display = '';
		getObj('tpskin2').style.display = 'none';
	} else {
		getObj('tpskin1').style.display = 'none';
		getObj('tpskin2').style.display = '';
	}
}
<!--
EOT;
if($_G['maxcstyles'] && $customstyles){print<<<EOT
-->
initStyleType();
<!--
EOT;
}print<<<EOT
-->
function showTabs(id,select,element,css){
	var o = getObj(id);
	var t = o.getElementsByTagName(element);
	for (var i=0;i<t.length;i++) {
		if (t[i].id) {
			var oo = getObj(t[i].id);
			if (t[i].id == select) {
				getObj(t[i].id).className = css;
				getObj('info_'+t[i].id).style.display = '';
			} else {
				getObj(t[i].id).className = '';
				getObj('info_'+t[i].id).style.display = 'none';
			}
		}
	}
	return false;
}
showTabs('infolist','$info_type','td','current');
</script>
<!--
EOT;
} elseif ($action == 'bbsset') {print <<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac" id="infolist">
							<td id="fancy"><a  style="cursor:pointer" onclick="showTabs('infolist','fancy','td','current')">个人喜好</a></td>
							<td id="friend"><a style="cursor:pointer" onclick="showTabs('infolist','friend','td','current')">好友设置</a></td>
							<td id="msg"><a style="cursor:pointer" onclick="showTabs('infolist','msg','td','current')">短消息设置</a></td>
						</tr>
					</table>
				</div>
				<form action="profile.php?action=bbsset" method="post">
					<input type="hidden" name="verify" value="$verifyhash" />
					<div class="set-tab-box">
						<div style="margin:1em 2em;display:none" id="info_fancy">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td class="td1" width="35%">选择风格</td>
									<td>
										<select name="tpskin">
											<option value="">使用默认</option>
											$choseskin
										</select>
									</td>
								</tr>
<!--
EOT;
if ($ifsign) {print <<<EOT
-->
								<tr>
									<td class="td1">签名展示设置</td>
									<td>
										如果您想在帖子中展示您的个人签名，需要开启此功能<br />签名展示一天需要支付<font color="red">{$credit->cType[$db_signcurtype]}：{$db_signmoney} {$credit->cUnit[$db_signcurtype]}</font>&nbsp;(<a href="profile.php?action=change" target="_blank"><font color="blue">积分转换</font></a>&nbsp;&nbsp;<a href="userpay.php" target="_blank"><font color="blue">{$db_currencyname}充值</font></a>)<br />您的{$credit->cType[$db_signcurtype]}：{$cur} {$credit->cUnit[$db_signcurtype]}，您的签名已经展示 {$haveshow} 天，还可以展示 {$days} 天
<!--
EOT;
if (!$days) {print <<<EOT
-->
										(<font color="red">您的{$credit->cType[$db_signcurtype]}不足，无法展示帖子签名</font>)
<!--
EOT;
}print <<<EOT
-->
									</td>
								</tr>
								<tr>
									<td class="td1">是否开启签名展示功能</td>
									<td>
										<input type="radio" name="showsign" value="1" $showsign_Y />是
										<input type="radio" name="showsign" value="0" $showsign_N />否
									</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
								<tr>
									<td class="td1">选择默认使用的编辑器</td>
									<td>
										<input type="radio" name="editor" value="1" $editor_Y /> 所见即所得
										<input type="radio" name="editor" value="0" $editor_N /> code 模式
									</td>
								</tr>
								<tr>
									<td class="td1">选择您所在的时区<br>将时间显示为您当地时间</td>
									<td>
										<select name="timedf">
											<option value="0">使用默认</option>
<!--
EOT;
include(R_P.'template/admin/timezone.htm');print <<<EOT
-->
										</select>
									</td>
								</tr>
								<tr>
									<td class="td1">时间格式(格式如:yyyy-mm-dd,yy-m-d)<br>yyyy:4位数年份,yy:2位数年份<br>mm:有前导零01-12,m:没前导零1-12<br>dd:有前导零01-31,d:没前导零1-31</td>
									<td>
										<input type="radio" name="d_type" value="0" $d_type_0 />使用默认<br />
										<input type="radio" name="d_type" value="1" $d_type_1 />自定义
										<input class="input" type="text" name="date_f" value="$userdb[datefm]" />
										<input type="radio" name="time_f" value="24" $check_24 />24
										<input type="radio" name="time_f" value="12" $check_12 />12
									</td>
								</tr>
								<tr>
									<td class="td1">主题列表每页个数(设置为0使用默认)</td>
									<td>
										<select name="t_num"><option value="0">0</option>
<!--
EOT;
foreach ($t_num as $value) {
$selected = ${'T_'.$value} ? ${'T_'.$value} : '';
print <<<EOT
-->
											<option value="$value" $selected>$value</option>
<!--
EOT;
}print <<<EOT
-->
										</select>
									</td>
								</tr>
								<tr><td class="td1">文章列表每页个数(设置为0使用默认)</td>
									<td>
										<select name="p_num"><option value="0">0</option>
<!--
EOT;
foreach ($p_num as $value) {
$selected = ${'P_'.$value} ? ${'P_'.$value} : '';
print <<<EOT
-->
											<option value="$value" $selected>$value</option>
<!--
EOT;
}print <<<EOT
-->
										</select>
									</td>
								</tr>
								<tr>
									<td class="td1"> 是否接受邮件</td>
									<td>
										<input type="radio" name="proreceivemail" value="1" $email_Y /> 接收邮件
										<input type="radio" name="proreceivemail" value="0" $email_N /> 不接收邮件
									</td>
								</tr>
							</table>
						</div>
						<div style="margin:1em 2em;display:none" id="info_friend">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
								<tr>
									<td class="td1" width="35%">加我为好友时身份验证</td>
									<td>
										<input type="radio" name="friendcheck" value="0" $friend_0 /> 允许任何人加我为好友<br /><input type="radio" name="friendcheck" value="1" $friend_1 /> 需要身份验证才能加我为好友<br /><input type="radio" name="friendcheck" value="2" $friend_2 /> 不允许任何人加我为好友
									</td>
								</tr>
							</table>
						</div>
						<div style="margin:1em 2em;display:none" id="info_msg">
							<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
<!--
EOT;
if($_G['msggroup']){print <<<EOT
-->
								<tr>
									<td class="td1" width="35%">可设置屏蔽指定用户组的短消息：<br />如选中“{$mylevel}”，则表示不接收来自“{$mylevel}”用户组的短信，全不选择则表示接收来自所有用户组的短信</td>
									<td><div>$usergroup</div></td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
								<tr>
									<td class="td1" width="35%">屏蔽多个用户时用逗号 "," 隔开<br>(如:张三,李四,王五等)。<br><br>当这些被添加的屏蔽用户给您发送短消息时将不予接收。</td>
									<td><textarea name="banidinfo" rows="6" cols="80">$userdb[banpm]</textarea></td>
								</tr>
							</table>
						</div>
						<div class="tac" style=" padding:1em">
							<input class="btn" value="保存设置" type="submit">
							<input type="hidden" value="2" name="step" />
						</div>
					</div>
				</form>
			</div>
		</div></div></div>
<script language="JavaScript">
function showTabs(id,select,element,css){
	var o = getObj(id);
	var t = o.getElementsByTagName(element);
	for (var i=0;i<t.length;i++) {
		if (t[i].id) {
			var oo = getObj(t[i].id);
			if (t[i].id == select) {
				getObj(t[i].id).className = css;
				getObj('info_'+t[i].id).style.display = '';
			} else {
				getObj(t[i].id).className = '';
				getObj('info_'+t[i].id).style.display = 'none';
			}
		}
	}
	return false;
}
showTabs('infolist','$info_type','td','current');
</script>
<!--
EOT;
} elseif ($action == 'change') {print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current link5 b">积分转换</td>
						</tr>
					</table>
				</div>
				<div class="set-tab-box cc">
					<div style="margin:1em;">
						<div style="width:180px; float:right">
							<h5 class="f12 bdbA" style="padding-bottom:.5em">用户积分数</h5>
							<table width="100%" border="0" cellspacing="0" cellpadding="0" class="set-table1 bdbA">
								<tr>
									<td style="height:0px"></td>
									<td width="60%"></td>
								</tr>
								<tr>
									<td class="td1 gray3">$db_rvrcname</td>
									<td>$userrvrc $db_rvrcunit</td>
								</tr>
								<tr>
									<td class="td1 gray3">$db_creditname</td>
									<td>$winddb[credit] $db_creditunit</td>
								</tr>
								<tr>
									<td class="td1 gray3">$db_moneyname</td>
									<td>$winddb[money] $db_moneyunit</td>
								</tr>
								<tr>
									<td class="td1 gray3">$db_currencyname</td>
									<td>$winddb[currency] $db_currencyunit</td>
								</tr>
<!--
EOT;
foreach($_CREDITDB as $key => $value){print <<<EOT
-->
								<tr>
									<td class="td1 gray3">$value[0]</td>
									<td>{$creditdb[$key]} $value[1]</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
							</table>
						</div>
						<div class="" style="padding-right:200px">
							<div style="width:100%;float:left">
								<table width="100%" border="0" cellspacing="0" cellpadding="0" class="set-table2" style="line-height:200%">
<!--
EOT;
foreach($jf as $key=>$value){print <<<EOT
-->
								<form method="post" action="profile.php?action=change&">
								<input type="hidden" name="step" value="3" />
								<input type="hidden" name="type" value="$key" />
								<input type="hidden" name="verify" value="$verifyhash" />
									<tr>
										<td class="b" width="25%">{$value[0]} <span class="gray3">-&gt;</span> {$value[1]}</td>
										<td>输入{$value[0]}数<span class="gray3">(必须为{$value[2]}的整数倍)</span><br />
											<input name="change" type="text" class="input" /> <input type="submit" class="btn" value="兑换成{$value[1]}" /><br />
											<span class="gray3">行情:</span> {$value[2]}{$value[0]}={$value[3]}{$value[1]}
										</td>
									</tr>
								</form>
<!--
EOT;
}print <<<EOT
-->
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div></div></div>
<!--
EOT;
} elseif ($action == 'permission') {
$_P = array('0'=>'<font color="red" size="+">&#215;</font>','1'=>'<font color="green" size="+">&#8730;</font>');
print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current"><a href="profile.php?action=permission">用户权限</a></td>
							<td>现权限为：($gp_grouptitle)</td>
						</tr>
					</table>
				</div>
				<div class="set-tab-box cc">
					<div style="margin:1em;">
						<table style="width:100%;padding-bottom:2em;">
							<tr class="tr32"><td style="line-height:20px;">
								<span class="s3">拥有权限</span>：
<!--
EOT;
foreach ($mygpdb as $key => $value) {print <<<EOT
-->
										&nbsp;&nbsp;<a href="profile.php?action=permission&gid=$key" style="white-space:nowrap;">$value</a>
<!--
EOT;
}print <<<EOT
-->
								</td></tr>
<!--
EOT;
if (!empty($_gmember)) {print <<<EOT
-->
									<tr class="tr32"><td style="line-height:20px;">
									<span  class="s3">我的积分</span>：$totalcredit&nbsp;(&nbsp;
												综合积分&nbsp;=&nbsp;发帖数*$upgradeset[postnum] + 精华*$upgradeset[digests] + {$credit->cType[rvrc]}*$upgradeset[rvrc] + {$credit->cType[money]}*$upgradeset[money] + {$credit->cType[credit]}*$upgradeset[credit] + 在线时间*$upgradeset[onlinetime]
<!--
EOT;
foreach ($_CREDITDB as $key => $value) {print <<<EOT
-->
									+ $value[0]*{$upgradeset[$key]}
<!--
EOT;
}print <<<EOT
-->)
									</td></tr>
									<tr class="tr32"><td class="s8" style="line-height:20px;">会员组权限查看</td></tr>
									<tr class="tr32"><td style="line-height:20px;">
<!--
EOT;
foreach ($_gmember as $key => $value) {print <<<EOT
-->
										<span style="white-space:nowrap;">&nbsp;&nbsp;<a href="profile.php?action=permission&gid=$key">$value[title]</a>：$value[post]</span>
<!--
EOT;
}print <<<EOT
-->
									</td></tr>
<!--
EOT;
}print <<<EOT
-->

									<tr class="tr32"><td class="s8">
<!--
EOT;
if (!empty($_gsystem)) {print <<<EOT
-->
										系统组权限查看
									</td></tr>
									<tr class="tr32"><td style="line-height:20px;">
<!--
EOT;
foreach ($_gsystem as $key => $value) {print <<<EOT
-->
										&nbsp;&nbsp;<a href="profile.php?action=permission&gid=$key" style="white-space:nowrap;">$value[title]</a>
<!--
EOT;
}print <<<EOT
-->
									</td></tr>

<!--
EOT;
}if (!empty($_gspecial)) {print <<<EOT
--><tr class="tr32"><td class="s8">
									特殊组权限查看</td></tr>
									<tr class="tr32"><td style="line-height:20px;">
<!--
EOT;
foreach ($_gspecial as $key => $value) {print <<<EOT
-->
										&nbsp;&nbsp;<a href="profile.php?action=permission&gid=$key" style="white-space:nowrap;">$value[title]</a>
<!--
EOT;
}print <<<EOT
-->
							</td></tr>

<!--
EOT;
}print <<<EOT
-->							</table>
<div class="c"></div>
<style type="text/css">
.tr32{ line-height:120%;}
.tr32 td,.tr32 th{border-bottom:1px dotted $tdcolor;padding:.3em .6em}
.tr32 th{text-align:left;font-weight:normal;}
</style>
						<div class="" >
							<div style="width:100%;float:left;padding-bottom:15px;">
								<table width="100%" cellspacing="0" cellpadding="0" align="center" style="table-layout:fixed">
									<tr class="tr32"><td colspan="10" class="s1">基本权限</td></tr>
									<tr class="tr3 tac f_two">
										<td width="10%">隐身登录</td>
										<td width="10%">浏览帖子</td>
										<td width="10%">搜索权限</td>
										<td width="10%">会员列表</td>
										<td width="10%">会员资料</td>
										<td width="10%">展区功能</td>
										<td width="10%">报告功能</td>
										<td width="10%">头像上传</td>
										<td width="10%">自定义头像</td>
										<td width="10%">荣誉头衔</td>
									</tr>
									<tr class="tr32 tac f_one">
										<td>{$_P[$per[hide]]}</td>
										<td>{$_P[$per[read]]}</td>
										<td>{$_P[$per[search]]}</td>
										<td>{$_P[$per[member]]}</td>
										<td>{$_P[$per[profile]]}</td>
										<td>{$_P[$per[show]]}</td>
										<td>{$_P[$per[report]]}</td>
										<td>{$_P[$per[upload]]}</td>
										<td>{$_P[$per[portait]]}</td>
										<td>{$_P[$per[honor]]}</td>
									</tr>
									<tr class="tr3 tac f_two">
										<td>统计排行</td>
										<td>发短消息</td>
										<td>短消息上限</td>
										<td>收藏夹容量</td>
										<td>草稿箱容量</td>
										<td colspan="2">签名大小上限(字节)</td>
										<td colspan="3"></td>
									</tr>
									<tr class="tr32 tac f_one">
										<td>{$_P[$per[sort]]}</td>
										<td>{$_P[$per[messege]]}</td>
										<td>{$per[maxmsg]}</td>
										<td>{$per[maxfavor]}</td>
										<td>{$per[maxgraft]}</td>
										<td colspan="2">{$per[signnum]}</td>
										<td colspan="3"></td>
									</tr>
									<tr class="tr32"><td colspan="10" class="s1">帖子权限</td></tr>
									<tr class="tr3 tac f_two">
										<td>发表主题</td>
										<td>回复主题</td>
										<td>发起投票</td>
										<td>参与投票</td>
										<td>查看投票</td>
										<td>发html帖</td>
										<td>发隐藏帖</td>
										<td>发出售帖</td>
										<td>评分权限</td>
										<td>发活动帖</td>
									</tr>
									<tr class="tr32 tac f_one">
										<td>{$_P[$per[post]]}</td>
										<td>{$_P[$per[rp]]}</td>
										<td>{$_P[$per[newvote]]}</td>
										<td>{$_P[$per[vote]]}</td>
										<td>{$_P[$per[vwvt]]}</td>
										<td>{$_P[$per[html]]}</td>
										<td>{$_P[$per[hidden]]}</td>
										<td>{$_P[$per[sell]]}</td>
										<td>{$_P[$per[mark]]}</td>
										<td>{$_P[$per[active]]}</td>
									</tr>
									<tr class="tr3 tac f_two">
										<td>发悬赏帖</td>
										<td>发匿名帖</td>
										<td>楼主留言</td>
										<td colspan="7"></td>
									</tr>
									<tr class="tr32 tac f_one">
										<td>{$_P[$per[reward]]}</td>
										<td>{$_P[$per[anonymous]]}</td>
										<td>{$_P[$per[leaveword]]}</td>
										<td colspan="7"></td>
									</tr>
									<tr class="tr32"><td colspan="10" class="s1">附件权限</td></tr>
									<tr class="tr3 tac f_two">
										<td>上传附件</td>
										<td>下载附件</td>
										<td colspan="2">附件个数(1天)</td>
										<td colspan="2">附件大小上限(K)</td>
										<td colspan="4" class="tal">附件允许后缀(K)</td>
									</tr>
									<tr class="tr32 tac f_one">
										<td>{$_P[$per[attach]]}</td>
										<td>{$_P[$per[down]]}</td>
										<td colspan="2">$per[allownum]</td>
										<td colspan="2">$per[uploadmaxsize]</td>
										<td colspan="4" class="tal">$per[uptype]</td>
									</tr>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div></div></div>

<!--
EOT;
} elseif ($action=='log') {print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current"><a href="profile.php?action=log">帖子操作记录</a></td>
						</tr>
					</table>
				</div>

				<div class="set-tab-box cc">
					<div style="margin:1em 1em;">
						<table width="100%" cellspacing="0" cellpadding="0" class="set-table2">
							<tr class="gray3">
								<td width="8%" class="y-style">ID</td>
								<td width="8%" class="y-style">类型</td>
								<td width="12%" class="y-style">管理员</td>
								<td width="18%" class="y-style">论坛</td>
								<td width="15%" class="y-style">操作日期</td>
								<td>
									<span class="fr">
										<select name="type" onchange="window.location=('profile.php?action=log&type='+this.options[this.selectedIndex].value)">
										<option value="all">全 部</option>
										<option value="topped" $type_sel[topped]>{$lang[logtype][topped]}</option>
										<option value="digest" $type_sel[digest]>{$lang[logtype][digest]}</option>
										<option value="highlight" $type_sel[highlight]>{$lang[logtype][highlight]}</option>
										<option value="push" $type_sel[push]>{$lang[logtype][push]}</option>
										<option value="locked" $type_sel[locked]>{$lang[logtype][locked]}</option>
										<option value="delete" $type_sel[delete]>{$lang[logtype][delete]}</option>
										<option value="move" $type_sel[move]>{$lang[logtype][move]}</option>
										<option value="copy" $type_sel[copy]>{$lang[logtype][copy]}</option>
										<option value="edit" $type_sel[edit]>{$lang[logtype][edit]}</option>
										<option value="credit" $type_sel[credit]>{$lang[logtype][credit]}</option>
										<option value="remind" $type_sel[remind]>{$lang[logtype][remind]}</option>
										</select>
									</span>
									描述
								</td>
							</tr>
<!--
EOT;
$style='f_two';
$num=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$num++;
$style=$style=='f_one' ? 'f_two' : 'f_one';
print <<<EOT
	-->
								<tr>
									<td>$num</td>
									<td>{$lang[logtype][$value[type]]}</td>
									<td><a href="profile.php?action=show&username=$value[username2]" target="_blank">$value[username2]</a></td>
									<td><a href="thread.php?fid=$value[field1]" target="_blank">{$forum[$value[field1]][name]}</a></td>
									<td>$value[date]</td>
									<td><div style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word" align="left">$value[descrip]</div></td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
							</table></div>$pages
<script language="JavaScript">
function Bjump(value){
	if(value!= '') {
		window.location=('$basename&action=log&type='+value);
	}
}
</script>


					</div>
				</div>
			</div>
		</div></div>
<!--
EOT;
} elseif ($action=='buy') {
print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current"><a href="profile.php?action=buy">特殊组购买</a></td>
						</tr>
					</table>
				</div>
<!--
EOT;
if(!$job){
print<<<EOT
-->
				<div class="set-tab-box cc">
					<div style="margin:1em 1em;">
						<table cellspacing="0" cellpadding="0" width="100%" class="set-table2">
							<tr class="gray3">
								<td>用户组头衔</td>
								<td>日价格</td>
								<td>最短购买天数</td>
								<td>到期时间</td>
								<td>购买</td>
							</tr>
<!--
EOT;
foreach($specialdb as $key=>$val) {
print <<<EOT
-->
							<tr>
								<td>$val[grouptitle]</td>
								<td>{$val[sellprice]} {$val[selltype]}/天</td>
								<td>{$val[selllimit]}</td>
								<td>$val[enddate]</td>
								<td>
<!--
EOT;
if(!$val['startdate'] || $timestamp > $val['startdate'] + $val['days']*86400){print <<<EOT
-->
									<a href="profile.php?action=buy&job=buy&gid=$val[gid]">购买</a>
<!--
EOT;
}else{print <<<EOT
-->
									-
<!--
EOT;
}print <<<EOT
-->
								</td>
							</tr>
<!--
EOT;
}print <<<EOT
-->
						</table>
					</div>
				</div>
<!--
EOT;
}elseif($job=='buy'){print <<<EOT
-->
				<div class="set-tab-box cc">
					<form method="post" action="profile.php?action=buy&">
						<input type="hidden" name="verify" value="$verifyhash" />
						<input type="hidden" name="job" value="buy" />
						<input type="hidden" name="step" value="2" />
						<input type="hidden" name="gid" value="$gid" />
						<div style="margin:1em 1em;">
							<table cellspacing="0" cellpadding="0" width="100%" class="set-table2">
								<tr>
									<td class="td1">用户组头衔</td>
									<td><b>{$rt[grouptitle]}</b><br /><span class="gray3">{$rt[sright][sellinfo]}</span></td>
								</tr>
								<tr>
									<td class="td1">日价格</td>
									<td>{$rt[sright][sellprice]} {$rt[sright][selltype]}/天</td>
								</tr>
								<tr>
									<td class="td1">购买天数</td>
									<td>
										<input class="input" type="text" name="days" size="20" />
										<span class="gray3">最短购买天数 {$rt[sright][selllimit]} 天</span>
									</td>
								</tr>
								<tr>
									<td class="td1">请输入密码</td>
									<td><input class="input" type="password" name="pwpwd" size="20" /></td>
								</tr>
								<tr>
									<td class="td1">将该用户组头衔作为</td>
									<td>
										<input type="radio" name="options" value="1" checked />论坛显示头衔
										<input type="radio" name="options" value="2" />附加头衔
									</td>
								</tr>
							</table>
						</div>
						<div class="tac" style=" padding:1em"><input class="btn" type="submit" value="提 交" /></div>
					</form>
				</div>
<!--
EOT;
}print<<<EOT
-->
			</div>
		</div></div></div>
<!--
EOT;
}elseif($action=='forumright'){
$_P=array('0'=>'×','1'=>'√');
print <<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current">版块权限</td>
						</tr>
					</table>
				</div>
				<div class="set-tab-box cc">
					<div style="margin:1em 1em;">
					<table cellspacing="0" cellpadding="0" width="100%" class="set-table2" style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word;">
						<tr class="tr32"><td colspan="5"><b>版块基本权限</b></td></tr>
						<tr class="tr2 tac">
							<td>浏览版块</td>
							<td>发表主题</td>
							<td>回复主题</td>
							<td>上传附件</td>
							<td>下载附件</td>
						</tr>
						<tr class="tr32 tac">
							<td>{$_P[$per[visit]]}</td>
							<td>{$_P[$per[post]]}</td>
							<td>{$_P[$per[rp]]}</td>
							<td>{$_P[$per[down]]}</td>
							<td>{$_P[$per[upload]]}</td>
						</tr>
					</table></div></div>
				<div class="set-tab-box cc">
					<div style="margin:1em 1em;">
					<table cellspacing="0" cellpadding="0" width="100%" class="set-table2" style="TABLE-LAYOUT: fixed;WORD-WRAP: break-word;">
					<tr class="tr32"><td colspan="7"><b>版块积分设置</b></td></tr>
					<tr class="tr2 tac">
						<td width="8%">积分名称</td>
						<td width="15%">精华主题</td>
						<td width="15%">取消精华</td>
						<td width="15%">发表主题</td>
						<td width="15%">删除主题</td>
						<td>发表十个回复</td>
						<td>删除十个回复</td>
					</tr>
<!--
EOT;
foreach($forumright as $key=>$val){print <<<EOT
-->
	<tr class="tr32 tac">
		<td>{$credit->cType[$key]}</td>
		<td>+{$val[Digest]}</td>
		<td>-{$val[Undigest]}</td>
		<td>+{$val[Post]}</td>
		<td>-{$val[Delete]}</td>
		<td>+{$val[Reply]}</td>
		<td>-{$val[Deleterp]}</td>
	</tr>
<!--
EOT;
}print <<<EOT
-->
</table></div></div></div></div></div></div>
<!--
EOT;
} elseif ($action=='forumsell') {print<<<EOT
-->
		<div id="set-content-wrap" class="cc" style="padding:.3em">
			<div>
				<div class="set-tab-table">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr class="tac">
							<td class="current">版块购买</td>
						</tr>
					</table>
				</div>
				<div class="set-tab-box cc">
					<div style="margin:1em 1em;">
						<form action="profile.php?action=forumsell" method="post">
							<input type="hidden" name="verify" value="$verifyhash" />
							<input type="hidden" name="fid" value="$fid" />
							<input type="hidden" name="step" value="2" />
							<div class="t">
								<table width="100%" cellspacing="0" cellpadding="0">
									<tr><td class="h" colspan="4">版块购买价格</td></tr>
									<tr class="tr2">
										<td class="y-style" width="20%">版块名称</td>
										<td class="y-style">购买期限(单位：天)</td>
										<td class="y-style">价格({$credit->cType[$forumset[forumsell]]})</td>
										<td class="y-style">购买</td>
									</tr>
<!--
EOT;
foreach($forumset['sellprice'] as $key=>$value){print <<<EOT
-->
									<tr class="tr3 f_one">
										<td class="y-style">{$forum[$fid][name]}</td>
										<td class="y-style">$key</td>
										<td class="y-style">$value</td>
										<td class="y-style"><input type="radio" name="date" value="$key" /></td>
									</tr>
<!--
EOT;
}print <<<EOT
-->
								</table>
							</div>
							<div style="margin-bottom:25px;text-align:center"><input class="btn" type="submit" value="提 交" /></div>
						</form>
						<div class="t">
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr><td class="h" colspan="5">我的购买记录</td></tr>
								<tr class="tr2">
									<td class="y-style"></td>
									<td class="y-style">版块名称</td>
									<td class="y-style">购买日期</td>
									<td class="y-style">到期日期</td>
									<td class="y-style">花费</td>
								</tr>
<!--
EOT;
$i=($page-1)*10;
foreach($buydb as $key=>$value){
$i++;
print <<<EOT
-->
								<tr class="tr3 f_one">
									<td class="y-style">$i</td>
									<td class="y-style"><a href="thread.php?fid=$value[fid]">{$forum[$value[fid]][name]}</a></td>
									<td class="y-style">$value[buydate]</td>
									<td class="y-style">$value[overdate]</td>
									<td class="y-style">$value[cost] {$credit->cType[$value[credit]]}</td>
								</tr>
<!--
EOT;
}print <<<EOT
-->
							</table>
						</div>
						$pages
					</div>
				</div>
			</div>
		</div></div></div>
<!--
EOT;
}elseif($action == 'style'){
${'current_'.$job} = 'current';
print<<<EOT
-->
<div id="set-content-wrap" class="cc" style="padding:.3em">
	<div>
		<div class="set-tab-table">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr class="tac" id="infolist">
					<td id="list" class="$current_"><a href="profile.php?action=style" style="cursor:pointer" >风格列表</a></td>
					<td id="add" class="$current_add"><a href="profile.php?action=style&job=add" style="cursor:pointer">添加自定义风格</a></td>
<!--
EOT;
if ($job == 'modify') {print<<<EOT
-->
					<td id="modify" class="$current_modify">修改自定义风格</td>
<!--
EOT;
}print<<<EOT
-->
				</tr>
			</table>
		</div>
		<div class="set-tab-box">
<!--
EOT;
if(empty($job)){print<<<EOT
-->
			<div style="margin:1em 2em;" id="info_fancy">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
				<tbody>
					<tr class="gray3">
	  					<td>风格ID</td><td>自定义名称</td><td>所属原始风格</td><td>创建时间</td><td>最后修改时间</td><td>状态</td><td>操作</td>
					</tr>
<!--
EOT;
$id = 0;
foreach($stylelistdb as $key => $value){
$id++;
print<<<EOT
-->
					<tr>
						<td>$id</td>
						<td>$value[customname]</td>
						<td>$value[name]</td>
						<td>$value[createtime]</td>
						<td>$value[lastmodify]</td>
<!--
EOT;
if ($value[useing] == 1) {print<<<EOT
-->
						<td><span style="color:red;">使用中</span>&nbsp;[<a href="profile.php?action=style&skinco=$value[name]">还原</a>]</td>
<!--
EOT;
} else {print<<<EOT
-->
						<td>未使用</td>
<!--
EOT;
}print<<<EOT
-->
						<td><a href="profile.php?action=style&job=use&sid=$value[sid]">使用</a>|<a href="profile.php?action=style&job=modify&sid=$value[sid]">修改</a>|<a href="profile.php?action=style&job=del&sid=$value[sid]" onclick="return confirmdel();">删除</a></td>
<!--
EOT;
}print<<<EOT
-->
					</tr>
	  			</tbody>
	  	</table>$pages</div>
<!--
EOT;
}elseif($job == 'modify' || $job == 'add'){print<<<EOT
-->
<style>
.color_input{float:left;border:1px solid #fff;height:19px;width:105px;}
.color_image{float:left;padding-right:1px;padding-top:1px}
</style>
<script type="text/javascript" language="JavaScript">
function pickReback(obj,color){
	if (typeof obj == 'string') {
		obj = getObj(obj);
	}
	obj.style.color = color;
}
</script>
<script type="text/javascript" language="JavaScript" src="js/color_picker.js"></script>
<form name="FORM" method="post" action="profile.php?">
<input type="hidden" name="verify" value="$verifyhash" />
<input type="hidden" name="action" value="style" />
<input type="hidden" name="job" value="save" />
<input type="hidden" name="do" value="$job" />
<input type="hidden" name="sid" value="$customdb[sid]">
	<div style="margin:1em 2em;" id="info_fancy">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
			<tbody>
<!--
EOT;
if($job == 'add'){print<<<EOT
-->
				<tr>
					<td colspan="2">原始风格选择:&nbsp;<select name="systemname" onchange="return Addjump(this.value);">$opsystemstyle</select></td>
				</tr>
<!--
EOT;
}print<<<EOT
-->
				<tr>
					<td colspan="2"><b>整体风格设置</b></td></tr>
				<tr>
				<tr>
					<td width="60%">自定义风格名称</td>
					<td><input type="text" class="input" name="customname" value="$customdb[customname]"></td>
				</tr>
				<tr>
					<td width="60%">表格内部样式:</td>
					<td><input type="radio" value="1" name="css[yeyestyle]" $yes_Y /> 竖线风格 <input type="radio" value="0" name="css[yeyestyle]" $yes_N /> 横线风格</td>
				</tr>
				<tr>
					<td>表格宽度：(例: 98% 或 920px)</td>
					<td><input class="input" value="$customdb[tablewidth]" name="css[tablewidth]" /></td>
				</tr>
				<tr>
					<td>头部和尾部表格宽度：(例: 98% 或 920px)</td>
					<td><input class="input" value="$customdb[mtablewidth]" name="css[mtablewidth]" /></td>
				</tr>
				<tr>
					<td>全局背景颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="bgcolor" class="color_input" value="$bgcolor" name="css[bgcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'bgcolor',function(){pickReback('bgcolor_s',color_picker)})"></div> <span id="bgcolor_s" style="color:$bgcolor">■■■■</span></td>
				</tr>
				<tr>
					<td>全局背景图片：</td>
					<td><input class="input" value="$bgimg" name="css[bgimg]" />&nbsp;<select name="css[imgtype]"><option value="no-repeat" $imgtype_1>单图</option><option value="repeat" $imgtype_2>重复</option></td>
				</tr>
				<tr>
					<td>全局链接颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="linkcolor" class="color_input" value="$customdb[linkcolor]" name="css[linkcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'linkcolor',function(){pickReback('linkcolor_s',color_picker)})"></div> <span id="linkcolor_s" style="color:$customdb[linkcolor]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格外边框颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="tablecolor" class="color_input" value="$customdb[tablecolor]" name="css[tablecolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'tablecolor',function(){pickReback('tablecolor_s',color_picker)})"></div> <span id="tablecolor_s" style="color:$customdb[tablecolor]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格内边框颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="tdcolor" class="color_input" value="$customdb[tdcolor]" name="css[tdcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'tdcolor',function(){pickReback('tdcolor_s',color_picker)})"></div> <span id="tdcolor_s" style="color:$customdb[tdcolor]">■■■■</span></td>
				</tr>
			</tbody>
		</table>
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="set-table2">
			<tbody>
			  	<tr><td colspan="2"><b>表格样式颜色设置</b></td></tr>
				<tr>
					<td width="60%">表格标题栏颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="headcolor" class="color_input" value="$customdb[headcolor]" name="css[headcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headcolor',function(){pickReback('headcolor_s',color_picker)})"></div> <span id="headcolor_s" style="color:$customdb[headcolor]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格标题栏下边框颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="headborder" class="color_input" value="$customdb[headborder]" name="css[headborder]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headborder',function(){pickReback('headborder_s',color_picker)})"></div> <span id="headborder_s" style="color:$customdb[headborder]">■■■■</span></td>
				</tr>
				<tr>
					<td>标题栏主要字体链接颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="headfontone" class="color_input" value="$customdb[headfontone]" name="css[headfontone]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headfontone',function(){pickReback('headfontone_s',color_picker)})"></div> <span id="headfontone_s" style="color:$customdb[headfontone]">■■■■</span></td>
				</tr>
				<tr>
					<td>标题栏次要字体链接颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="headfonttwo" class="color_input" value="$customdb[headfonttwo]" name="css[headfonttwo]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'headfonttwo',function(){pickReback('headfonttwo_s',color_picker)})"></div> <span id="headfonttwo_s" style="color:$customdb[headfonttwo]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格副标题栏颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="cbgcolor" class="color_input" value="$customdb[cbgcolor]" name="css[cbgcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgcolor',function(){pickReback('cbgcolor_s',color_picker)})"></div> <span id="cbgcolor_s" style="color:$customdb[cbgcolor]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格副标题栏下边框颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="cbgborder" class="color_input" value="$customdb[cbgborder]" name="css[cbgcolor]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgborder',function(){pickReback('cbgborder_s',color_picker)})"></div> <span id="cbgborder_s" style="color:$customdb[cbgborder]">■■■■</span></td>
				</tr>
				<tr>
					<td>表格副标题栏字体颜色：</td>
					<td><div class="input fl" style="padding:0px;"><input id="cbgfont" class="color_input" value="$customdb[cbgfont]" name="css[cbgfont]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'cbgfont',function(){pickReback('cbgfont_s',color_picker)})"></div> <span id="cbgfont_s" style="color:$customdb[cbgfont]">■■■■</span></td>
				</tr>
				<tr>
					<td>论坛列表颜色一：</td>
					<td><div class="input fl" style="padding:0px;"><input id="forumcolorone" class="color_input" value="$customdb[forumcolorone]" name="css[forumcolorone]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'forumcolorone',function(){pickReback('forumcolorone_s',color_picker)})"></div> <span id="forumcolorone_s" style="color:$customdb[forumcolorone]">■■■■</span></td>
				</tr>
				<tr>
					<td>论坛列表颜色二：</td>
					<td><div class="input fl" style="padding:0px;"><input id="forumcolortwo" class="color_input" value="$customdb[forumcolortwo]" name="css[forumcolortwo]" /><img  class="color_image" src="$imgpath/select_arrow.gif" onmouseover="this.src=imgpath+'/select_arrow_over.gif'" onmouseout="this.src=imgpath+'/select_arrow.gif'" onclick="showColorPicker(this,'forumcolortwo',function(){pickReback('forumcolortwo_s',color_picker)})"></div> <span id="forumcolortwo_s" style="color:$customdb[forumcolortwo]">■■■■</span></td>
				</tr>
			</tbody>
		</table>
	  	<div class="tac" style="padding: 1em;">
			<input class="btn" type="submit" name="prosubmit" value="修改此风格" >
		</div>
</div></div></form>
<!--
EOT;
}print<<<EOT
-->
</div></div></div>
<script language="JavaScript">

function checkset(chars){
	if (!confirm("还原该风格，该风格设置的内容将不能还原，确定要还原吗？")) {
		return false;
	}
	location.href = chars;
}

function Addjump(value){
	if (!confirm("如果已修改此风格，请确认已保存，否则跳转至其他风格后对此风格的设置将失效！")){
		return false;
	}
	if(value!= ''){
		window.location=('profile.php?action=style&job=add&selstyle='+value);
	}
}

function confirmdel(chars){
	if (!confirm("确定要删除此风格吗？")){
		return false;
	}
}
</script>
<!--
EOT;
}?>-->