<!--<?php
include_once PrintEot('profile_header');
print <<<EOT
-->
<div id="user-main">
	<div class="u-m-bg"></div>
	<div class="u-m-bg-c cc">
		<div class="p10">
			<div class="u-nav-2 cc">
				<ul>
					<li><a style="cursor:pointer" href="profile.php?action=permission" hidefocus="true">权限查看</a></li>
					<li class="current"><a style="cursor:pointer" hidefocus="true">特殊组购买</a></li>
				</ul>
			</div>
			<div class="u-cont-bg-c">
			<table width="100%" height="450">
				<tr><td class="vt">
					<div class="p15">
<!--
EOT;
if (!$job) {print<<<EOT
-->
						<table width="100%" class="mt10 bor-t-c">
							<tr class="user-tr">
								<td>用户组头衔</td>
								<td>日价格(积分)</td>
								<td>日价格(RMB)</td>
								<td>最短购买天数</td>
								<td>到期时间</td>
								<td>购买</td>
							</tr>
<!--
EOT;
foreach ($specialdb as $key => $val) {print <<<EOT
-->
							<tr class="user-tr">
								<td>$val[grouptitle]</td>
								<td>{$val[sellprice]} {$val[selltype]}/天</td>
								<td>{$val[rmbprice]} /天</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>
<!--
EOT;
} elseif ($job == 'buy') {print <<<EOT
-->
						<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" />
						<table width="100%" class="mt10 bor-t-c">
							<tr class="user-tr">
								<td>用户组头衔</td>
								<td><b>{$rt[grouptitle]}</b><br /><span class="gray">{$rt[sright][sellinfo]}</span></td>
							</tr>
							<tr class="user-tr">
								<td>购买方式</td>
								<td id="checkradio">
<!--
EOT;
if ($rt['sright']['sellprice'] > 0) {print <<<EOT
-->
									<div><input type="radio" name="buymethod" value="0" onclick="showpwd(this.value)" />积分购买 ({$rt[sright][sellprice]} {$rt[sright][selltype]}/天)</div>
<!--
EOT;
}if ($rt['sright']['rmbprice'] > 0) {print <<<EOT
-->
									<div><input type="radio" name="buymethod" value="1" onclick="showpwd(this.value)" />现金购买 ({$rt[sright][rmbprice]} RMB/天)</div>
<!--
EOT;
}print <<<EOT
-->
								</td>
							</tr>
							<tr class="user-tr">
								<td>购买天数</td>
								<td>
									<input class="input" type="text" name="days" size="20" />
									<span class="gray"> {$rt[sright][selllimit]} 天</span>
								</td>
							</tr>
							<tr class="user-tr" id="showpwd" style="display:none">
								<td>请输入密码</td>
								<td><input class="input" type="password" name="pwpwd" size="20" /></td>
							</tr>
							<tr class="user-tr">
								<td>将该用户组头衔作为</td>
								<td>
									<input type="radio" name="options" value="1" checked />站点显示头衔
									<input type="radio" name="options" value="2" />附加头衔
								</td>
							</tr>
						</table>
						<div class="tac" style=" padding:1em">
							<span class="button"><span><button type="submit">提 交</button></span></span>
						</div>
						</form>
<script>
function checkradio() {
	var radio = getObj('checkradio').getElementsByTagName('input');
	if (radio.length > 0) {
		radio[0].checked = true;
		showpwd(radio[0].value);
	}
}
function showpwd(v) {
	getObj('showpwd').style.display = v == 1 ? 'none' : '';
}
checkradio();
</script>
<!--
EOT;
}print<<<EOT
-->
					</div>
				</td></tr>
			</table>
			</div>
			</form>
		</div>
	</div>
	<div class="u-m-bg"></div>
</div>
<!--
EOT;
?>-->