{template header}
<div class="subtitle" align="center">{lang user}</div>
<center>
	<table style="text-align: center">
	<tr>
		<td>{template user_profile_basicdata}</td>
		<td><pre>&#9;</pre></td>
		<td>
			<table>
			<tr><td>
				<div id="userIconImg" class="iconImg" >
					<img src="img/<!--{if $gender != 'f'}-->m<!--{else}-->f<!--{/if}-->_{$select_icon}.gif" alt="$select_icon">
				</div>	
			</td></tr>
			<tr><td>
				<!--{if ($curuser) }--><button type="button" onclick="window.location.href='user.php'">编辑我的账户资料</button><!--{/if}-->
			</td></tr>
			<tr><td>
				<input type="hidden" id="achmode" name="achmode" value="ach">
				<button type="button" onclick="
					if($('achmode').value=='ach'){
						$('achmode').value='diary';
						$('normal_ach').style.display='none';
						$('diary_ach').style.display='';
						$('achtitle').innerHTML='查看成就完成情况';
					}else{
						$('achmode').value='ach';
						$('normal_ach').style.display='';
						$('diary_ach').style.display='none';
						$('achtitle').innerHTML='查看累计游戏记录';
					}
					return false;">
				<span id="achtitle">查看累计游戏记录</span>
				</button>
			</td></tr>
			</table>
		</td>
	</tr>
	</table>
	<!-- 成就显示界面（新） -->
	<div id="normal_ach">
	<table>
		<!--{loop $atype $tid $tarr}-->
		<tr>
			<td>
				<div class="subtitle" align="left">
					{$tarr['name']}
				</div>
				<div style="margin-left: 6px;" align="left">
					<!--{if ($tid == 'daily' && $curuser) }-->
						<!--{if !empty($reset_daily_flag)}-->
							{$reset_daily_flag}
						<!--{elseif !isset($_REQUEST["action"])}-->
							<button type="button" onclick="window.location.href='user_profile.php?action=refdaily';this.disabled=true">点击获得新的每日挑战</button>
						<!--{/if}-->
						<br>
					<!--{/if}-->
					{$tarr['desc']}
				</div>
			</td>
		</tr>
		<tr>
			<td>
			<table>
				<!--{loop $tarr['ach'] $key $aid}-->
					<!--{if !$key%3}--><tr><!--{/if}-->
					<!--{eval $adata = init_achtabledata($aid);}-->
					     <!--{if is_array($adata)}-->
							<td>
								<div class="ach_box" align="left" valign="top">
								<!--{eval include template($adata[0]);}-->
								</div>
							</td>
						<!--{else}-->
							<td width="300" align="left" valign="top">
								<div class="ach_box" align="left" valign="top">
								<!--{eval include template('achievement_temp');}-->
								</div>
							</td>
						<!--{/if}-->
					<!--{if ($key == count($tarr['ach'])-1 || (!(($key+1)%3) && $key!=0))}--></tr><!--{/if}-->
				<!--{/loop}-->
			</table>
			</td>
		</tr>
		<!--{/loop}-->
	</table>
	</div>
	<div id="diary_ach" style="display: none;">
		<table>
		<!--{loop $dtype $tid $tarr}-->
		<tr>
			<td>
				<div class="subtitle" align="left">
					{$tarr['name']}
				</div>
				<div style="margin-left: 6px;" align="left">
					{$tarr['desc']}
				</div>
			</td>
		</tr>
		<tr>
			<td>
			<table>
				<!--{loop $tarr['ach'] $key $aid}-->
					<!--{if !$key%3}--><tr><!--{/if}-->
					<!--{eval $adata = init_achtabledata($aid);}-->
					     <!--{if is_array($adata)}-->
							<td>
								<div class="ach_box" align="left" valign="top">
								<!--{eval include template($adata[0]);}-->
								</div>
							</td>
						<!--{else}-->
							<td width="300" align="left" valign="top">
								<div class="ach_box" align="left" valign="top">
								<!--{eval include template('achievement_temp');}-->
								</div>
							</td>
						<!--{/if}-->
					<!--{if ($key == count($tarr['ach'])-1 || (!(($key+1)%3) && $key!=0))}--></tr><!--{/if}-->
				<!--{/loop}-->
			</table>
			</td>
		</tr>
		<!--{/loop}-->
		</table>
	</div>
</center>
{template footer}

