<!--<?php
print <<<EOT
-->
<table width='$tablewidth' cellspacing=0 cellpadding=0 align=center>
<tr><td align=left><img src='$imgpath/$stylepath/index/home.gif' align=absbottom> 
<b><a href='$db_bfn'>$db_bbsname </a> -> 
<!--
EOT;
if(!$action){print <<<EOT
-->
<a href="userpay.php">{#toolcenter_pay}</a>
<!--
EOT;
}elseif($action=='change'){print <<<EOT
-->
{#toolcenter_change}
<!--
EOT;
}elseif($action=='list'){print <<<EOT
-->
{#currency_list}
<!--
EOT;
}elseif($action=='virement'){print <<<EOT
-->
{#currency_virement}
<!--
EOT;
}elseif($action=='log'){print <<<EOT
-->
{#toolcenter_log}
<!--
EOT;
}print <<<EOT
-->
</b></td>
<td align=right></td></tr></table>
<br>
<table width='$tablewidth' cellspacing=1 cellpadding=4 align=center $i_table style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word;'>
	<tr align=center>
		<td class='f_one'><a href='profile.php'>{#profile_index}</a></td>
		<td class='f_one'><a href='profile.php?action=modify'>{#profile_edit}</a></td>
		<td class='f_one'><a href="profile.php?action=show&uid=$winddb[uid]">{#profile_view}</a></td>
		<td class='f_one'><a href="profile.php?action=permission">{#profile_right}</a></td>
<!--
EOT;
if($_G['atclog']){print <<<EOT
-->
		<td class='f_one'><a href="profile.php?action=log">{#profile_log}</a></td>
<!--
EOT;
}print <<<EOT
-->
		<td class='f_one'><a href='userpay.php'>{#currencycp}</a></td>
		<td class='f_one'><a href='profile.php?action=favor'>{#profile_favor}</a></td>
	</tr>
</table>
<br>
<table width='$tablewidth' cellspacing=0 cellpadding=3 align=center>
<tr>
<td width='20%' valign="top">
<table width='100%' cellspacing=1 cellpadding=5 align=center $i_table>
<tr><td class="head" align="center" colspan="2"><b>{#currencycp}</b></td></tr>
<tr class="f_one"><td><a href='userpay.php'>{#toolcenter_pay}</a></td></tr>
<tr class="f_one"><td><a href="userpay.php?action=virement">{#currency_virement}</a></td></tr>
<tr class="f_one"><td><a href="userpay.php?action=change">{#toolcenter_change}</a></td></tr>
<tr class="f_one"><td><a href='userpay.php?action=list'>{#currency_list}</a></td></tr>
<tr class="f_one"><td><a href="userpay.php?action=log">{#toolcenter_log}</a></td></tr>
</table>
<br>
<table width='100%' cellspacing=1 cellpadding=3 align=center $i_table>
<tr><td class="head" align="center" colspan="2"><b>{#profile_userinfo}</b></td></tr>
<tr class="f_one"><td>
{#currency} : $userdb[currency]<br>
$db_creditname : $userdb[credit] $db_creditunit<br>
{#read_digest} : $userdb[digests]<br>
{#posts} : $userdb[postnum]<br>
$db_rvrcname : $userrvrc $db_rvrcunit<br>
$db_moneyname : $userdb[money] $db_moneyunit<br>
{#profile_deposit} : $userdb[deposit] $db_moneyunit<br>
{#profile_ddeposit} : $userdb[ddeposit] $db_moneyunit<br>
<!--
EOT;
if($_CREDITDB){
foreach($_CREDITDB as $key => $value){
$usercredit = $creditdb ? $creditdb[$key][1] : 0;
print <<<EOT
-->
$value[0] : $usercredit $value[1]<br>
<!--
EOT;
}}print <<<EOT
-->
</td></tr></table>
</td><td valign="top">

<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="5"><b>{#currencycp}</b></td></tr>
<tr align="center"><td class="cbg" colspan="5">
<a href="userpay.php?action=list">{#all_list}</a> | 
<a href="userpay.php?action=list&state=2">{#success_list}</a> | 
<a href="userpay.php?action=list&state=1">{#fail_list}</a></td></tr>
<tr class="f_one"><td>
{#onlinepayinfo}
<!--
EOT;
if(!$action){print <<<EOT
-->
<br><br>
{#currency_payinfo}
<!--
EOT;
}elseif($action=="list"){print <<<EOT
-->
<br><br>
{#currency_listinfo}
<!--
EOT;
}print <<<EOT
-->
</td></tr>
</table><br>
<!--
EOT;
if(!$action){print <<<EOT
-->
<form method="post" action="userpay.php?" target="_blank">
<input type="hidden" name="action" value="pay">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
	<tr><td class="head" colspan="2"><b>{#userpay_onlinepay}</b></td></tr>
	<tr class="f_one">
		<td width="35%">{#pay_money}</td>
		<td>
			<input type="text" name="number" value="10" size="8">
			<input type="radio" name="method" value="1" checked> {#userpay_paypal}
		</td>
	</tr>
</table>
<br><center><input type="submit" value="{#submit}"></center></form>
</td></tr></table>
<!--
EOT;
}elseif($action == 'change'){
if($currrate1){print <<<EOT
-->
<form action="userpay.php?" method="post">
<input type="hidden" name="action" value="change">
<input type="hidden" name="type" value="currency1">
<input type="hidden" name="step" value="2">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="3"><b>{#userpay_title}</b></td></tr>
<tr><td class="f_one" colspan="3"><b>{#userpay_currency1}</b></td></tr>
<!--
EOT;
if($currrate1[rvrc]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[rvrc]" value="0"> {#currency1_rvrc}</td></tr>
<!--
EOT;
}if($currrate1[money]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[money]" value="0"> {#currency1_money}</td></tr>
<!--
EOT;
}if($currrate1[credit]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[credit]" value="0"> {#currency1_credit}</td></tr>
<!--
EOT;
}foreach($_CREDITDB as $key => $value){
if($currrate1[$key]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[$key]" value="0"> {#currency1_custom}</td></tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
<br><center><input type=submit value='{#submit}'></center></form>
<!--
EOT;
}if($currrate2){print <<<EOT
-->
<br>
<form action="userpay.php?" method="post">
<input type="hidden" name="action" value="change">
<input type="hidden" name="type" value="currency2">
<input type="hidden" name="step" value="2">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="3"><b>{#userpay_title}</b></td></tr>
<tr><td class="f_one" colspan="3"><b>{#userpay_currency2}</b><br><br>{#userpay_currency2_info}</td></tr>
<!--
EOT;
if($currrate2[rvrc]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[rvrc]" value="0"> {#currency2_rvrc}</td></tr>
<!--
EOT;
}if($currrate2[money]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[money]" value="0"> {#currency2_money}</td></tr>
<!--
EOT;
}if($currrate2[credit]){print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[credit]" value="0"> {#currency2_credit}</td></tr>
<!--
EOT;
}foreach($_CREDITDB as $key => $value){
if($currrate2[$key]){
print <<<EOT
-->
<tr class="f_one"><td>{#change}</td>
<td><input type="text" name="changenum[$key]" value="0"> {#currency2_custom}</td></tr>
<!--
EOT;
}}print <<<EOT
-->
</table>
<br><center><input type=submit value='{#submit}'></center></form>
<!--
EOT;
}print <<<EOT
-->
</td></tr></table>
<!--
EOT;
}elseif($action=='list'){print <<<EOT
-->
<table width='$tablewidth' cellspacing=1 cellpadding=4 align=center $i_table>
<tr><td class="head" colspan="5"><b>{#user_list}</b></td></tr>
<tr class="cbg" align="center">
<td>ID</td>
<td>{#list_num}</td>
<td>{#list_money}</td>
<td>{#list_state}</td>
<td>{#list_time}</td>
</tr>
<!--
EOT;
$id=($page-1)*$db_perpage;
foreach($orderdb as $key => $value){
if($value[state]==0){
$state='{#list_1}';
}elseif($value[state]==1){
$state='{#list_2}';
}elseif($value[state]==2){
$state='{#list_3}';
}
$id++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$id</td>
<td>$value[order_no]</td>
<td>$value[number]</td>
<td>$state</td>
<td>$value[date]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
<center>$pages</center>
</td></tr></table>
<!--
EOT;
}elseif($action=='log'){print <<<EOT
-->
<form method=post action="userpay.php?action=log">
<table width="100%" cellspacing=1 cellpadding=5 align=center $i_table>
	<tr><td class="head" colspan="2"><b>{#userpay_search}</b></td></tr>
	<tr>
		<td class="f_one" width="30%">{#keyword}</td>
		<td class="f_one"><input type="text" name="keyword" size="40"></td>
	</tr>
</table>
<br>
<center><input type=submit value='{#submit}'></center>
</form>
<br>
<table width="100%" cellspacing=1 cellpadding=5 align=center $i_table>
<tr><td class="head" colspan="8"><b>{#toolcenter_log}</b></td></tr>
<tr class="cbg" align="center">
<td width="3%">ID</td>
<td width="5%">{#operate}</td>
<td>{#tool_descrip}</td>
<td width="5%">{#tool_price}</td>
<td width="5%">{#tool_nums}</td>
<td>IP</td>
<td>{#time}</td>
</tr>
<!--
EOT;
$id=($page-1)*$db_perpage;
foreach($logdb as $key => $value){
$id++;
print <<<EOT
-->
<tr class="f_one" align="center">
<td>$id</td>
<td>$value[type]</td>
<td align="left">$value[descrip]</td>
<td>$value[money]</td>
<td>$value[nums]</td>
<td>$value[ip]</td>
<td>$value[time]</td>
</tr>
<!--
EOT;
}print <<<EOT
-->
</table>
 &nbsp; &nbsp; $pages
</td></tr></table>
<!--
EOT;
}elseif($action=='virement'){print <<<EOT
-->
<form method="post" action="userpay.php?">
<input type="hidden" name="action" value="virement">
<input type="hidden" name="step" value="2">
<table width='100%' cellspacing=1 cellpadding=4 align=center $i_table>
	<tr><td class="head" colspan="2"><b>{#currency_virement} ({#currency_rate}$cy_virerate%)</b></td></tr>
	<tr class="f_one">
		<td width="20%">{#currency_touser}</td>
		<td><input type="text" name="pwuser" size=20></td>
	</tr>
	<tr class="f_one">
		<td>{#currency_paysum}</td>
		<td><input type="text" name="currency" size=20> {#currency_limit}</td>
	</tr>
	<tr class="f_one">
		<td>{#currency_enterpwd}</td>
		<td><input type="password" name="pwpwd" size=20></td>
	</tr>
</table>
<br><center><input type="submit" value="{#submit}"></center></form>

</td></tr></table>
<!--
EOT;
}?>-->