📄 memcp_credits.htm
字号:
{template header}
<div class="container">
<div id="foruminfo">
<div id="nav"><a href="$indexname">$bbname</a> »
<!--{if $action == 'credits'}-->
{lang memcp_credits}
<!--{elseif $action == 'creditslog'}-->
{lang memcp_credits_log}
<!--{/if}-->
</div>
</div>
<div class="content">
<div class="mainbox formbox">
<!--{if $action == 'credits'}-->
<h1>{lang memcp_credits}</h1>
<ul class="tabs">
<!--{if $exchangestatus}-->
<li <!--{if $operation == 'exchange'}--> class="current"<!--{/if}-->><a href="memcp.php?action=credits&operation=exchange">{lang memcp_credits_exchange}</a></li>
<!--{/if}-->
<!--{if $transferstatus}-->
<li <!--{if $operation == 'transfer'}--> class="current"<!--{/if}-->><a href="memcp.php?action=credits&operation=transfer">{lang memcp_credits_transfer}</a></li>
<!--{/if}-->
<!--{if $ec_ratio}-->
<li <!--{if $operation == 'addfunds'}--> class="current"<!--{/if}-->><a href="memcp.php?action=credits&operation=addfunds">{lang memcp_credits_addfunds}</a></li>
<!--{/if}-->
</ul>
<!--{elseif $action == 'creditslog'}-->
<h1>{lang memcp_credits_log}</h1>
<ul class="tabs headertabs">
<li <!--{if $operation == 'creditslog'}--> class="current"<!--{/if}-->><a href="memcp.php?action=creditslog&operation=creditslog">{lang memcp_credits_log_transaction}</a></li>
<li <!--{if $operation == 'paymentlog'}--> class="current"<!--{/if}-->><a href="memcp.php?action=creditslog&operation=paymentlog">{lang memcp_credits_log_payment}</a></li>
<li <!--{if $operation == 'incomelog'}--> class="current"<!--{/if}-->><a href="memcp.php?action=creditslog&operation=incomelog">{lang memcp_credits_log_income}</a></li>
<li <!--{if $operation == 'rewardpaylog'}--> class="current"<!--{/if}-->><a href="memcp.php?action=creditslog&operation=rewardpaylog">{lang memcp_reward_log_payment}</a></li>
<li <!--{if $operation == 'rewardincomelog'}--> class="current"<!--{/if}-->><a href="memcp.php?action=creditslog&operation=rewardincomelog">{lang memcp_reward_log_income}</a></li>
</ul>
<!--{/if}-->
<!--{if $operation == 'transfer'}-->
<form id="creditsform" method="post" action="memcp.php?action=credits">
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="operation" value="transfer" />
<table summary="{lang memcp_credits_transfer}" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th><label for="password">{lang password}</label></th>
<td><input type="password" size="15" name="password" id="password" /></td>
</tr>
<tr>
<th><label for="to">{lang to}</label></th>
<td><input type="text" size="15" name="to" id="to" /></td>
</tr>
<tr>
<th><label for="amount">{$extcredits[$creditstrans][title]}</label></th>
<td><input type="text" size="15" id="amount" name="amount" value="0" onkeyup="calcredit()" /> {$extcredits[$creditstrans][unit]}</td>
</tr>
<tr>
<th>{lang memcp_credits_transfer_min_balance}</th>
<td>$transfermincredits {$extcredits[$creditstrans][unit]}</td>
</tr>
<tr>
<th>{lang credits_tax}</span></th>
<td>$taxpercent</td>
</tr>
<tr>
<th>{lang memcp_credits_income}</span></th>
<td><span id="desamount">0</span> $extcredits[$creditstrans][unit]</td>
</tr>
<tr>
<th valign="top"><label for="transfermessage">{lang memcp_credits_transfer_message}</label></th>
<td>
<textarea name="transfermessage" id="transfermessage" rows="6" style="width: 85%;"></textarea>
<div class="tips">{lang memcp_credits_transfer_message_comment}</div>
</td>
</tr>
</tbody>
<tr>
<th> </th><td>{lang memcp_credits_transfer_comment}</td>
</tr>
<tr class="btns">
<th> </th><td><button class="submit" type="submit" name="creditssubmit" id="creditssubmit" value="true" onclick="return confirm('{lang memcp_credits_confirm}');" tabindex="1">{lang submit}</button></td>
</tr>
</table>
</form>
<script type="text/javascript">
function calcredit() {
var amount = parseInt($('amount').value);
$('desamount').innerHTML = !isNaN(amount) ? Math.floor(amount * (1 - $creditstax)) : 0;
}
</script>
<!--{elseif $operation == 'exchange'}-->
<form id="creditsform" method="post" action="memcp.php?action=credits">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="operation" value="exchange">
<script type="text/javascript">
var ratioarray = new Array();
<!--{loop $exchcredits $id $ecredits}-->
ratioarray[$id] = $ecredits[ratio];
<!--{/loop}-->
</script>
<table summary="{lang memcp_credits_exchange}" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th><label for="password">{lang password}</label></th>
<td><input type="password" size="15" name="password" /></td>
</tr>
<tr>
<th><label for="amount">{lang memcp_credits_log_transaction_outgo}</label></th>
<td>
<input type="text" size="15" name="amount" id="amount" value="0" onkeyup="calcredit();" /> <select name="fromcredits" onChange="calcredit();">
<!--{loop $extcredits $id $credit}-->
<!--{if $credit[allowexchangeout] && $credit[ratio]}-->
<option value="$id" unit="$credit[unit]" title="$credit[title]" ratio="$credit[ratio]">$credit[title]</option>
<!--{/if}-->
<!--{/loop}-->
</select>
</td>
</tr>
<tr>
<th><label for="desamount">{lang memcp_credits_log_transaction_income}</label></th>
<td>
<input type="text" size="15" id="desamount" value="0" disabled /> <select name="tocredits" onChange="calcredit();">
<!--{loop $extcredits $id $ecredits}-->
<!--{if $ecredits[allowexchangein] && $ecredits[ratio]}-->
<option value="$id" unit="$ecredits[unit]" title="$ecredits[title]" ratio="$ecredits[ratio]">$ecredits[title]</option>
<!--{/if}-->
<!--{/loop}-->
</select>
</td>
</tr>
<tr>
<th>{lang memcp_credits_exchange_ratio}</th>
<td><span class="bold">1</span><span id="orgcreditunit"></span><span id="orgcredittitle"></span>{lang credit_exchange}<span class="bold" id="descreditamount"></span><span id="descreditunit"></span><span id="descredittitle"></span></td>
</tr>
<tr>
<th>{lang memcp_credits_exchange_min_balance}</th>
<td>$exchangemincredits</td>
</tr>
<tr>
<th>{lang credits_tax}</th>
<td>$taxpercent</td>
</tr>
<tr>
<th> </th><td>{lang memcp_credits_exchange_comment}</td>
</tr>
</tbody>
<tr class="btns">
<th> </th><td><button class="submit" type="submit" name="creditssubmit" id="creditssubmit" value="true" onclick="return confirm('{lang memcp_credits_confirm}');" tabindex="2">{lang submit}</button></td>
</tr>
</table>
</form>
<script type="text/javascript">
function calcredit() {
with($('creditsform')) {
fromcredit = fromcredits[fromcredits.selectedIndex];
tocredit = tocredits[tocredits.selectedIndex];
var ratio = Math.round(((fromcredit.getAttribute('ratio') / tocredit.getAttribute('ratio')) * 100)) / 100;
$('orgcreditunit').innerHTML = fromcredit.getAttribute('unit');
$('orgcredittitle').innerHTML = fromcredit.getAttribute('title');
$('descreditunit').innerHTML = tocredit.getAttribute('unit');
$('descredittitle').innerHTML = tocredit.getAttribute('title');
$('descreditamount').innerHTML = ratio;
$('amount').value = $('amount').value.toInt();
if(fromcredit.getAttribute('title') != tocredit.getAttribute('title') && $('amount').value != 0) {
$('desamount').value = Math.floor(fromcredit.getAttribute('ratio') / tocredit.getAttribute('ratio') * $('amount').value * (1 - $creditstax));
} else {
$('desamount').value = $('amount').value;
}
}
}
String.prototype.toInt = function() {
var s = parseInt(this);
return isNaN(s) ? 0 : s;
}
calcredit();
</script>
<!--{elseif $operation == 'addfunds'}-->
<!--{if $return == 'success'}-->
<div class="notice">积分充值成功。</div>
<!--{elseif $return == 'fail'}-->
<div class="notice">积分充值失败。</div>
<!--{/if}-->
<form id="creditsform" method="post" action="memcp.php?action=credits" target="_blank">
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="operation" value="addfunds" />
<table summary="{lang memcp_credits_addfunds}" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th>{lang memcp_credits_addfunds_rules}</th>
<td>
{lang memcp_credits_addfunds_rules_ratio} = {$extcredits[$creditstrans][title]} <b>$ec_ratio</b> {$extcredits[$creditstrans][unit]}
<!--{if $ec_mincredits}--><br />{lang memcp_credits_addfunds_rules_min} {$extcredits[$creditstrans][title]} <b>$ec_mincredits</b> {$extcredits[$creditstrans][unit]}<!--{/if}-->
<!--{if $ec_maxcredits}--><br />{lang memcp_credits_addfunds_rules_max} {$extcredits[$creditstrans][title]} <b>$ec_maxcredits</b> {$extcredits[$creditstrans][unit]}<!--{/if}-->
<!--{if $ec_maxcreditspermonth}--><br />{lang memcp_credits_addfunds_rules_month} {$extcredits[$creditstrans][title]} <b>$ec_maxcreditspermonth</b> {$extcredits[$creditstrans][unit]}<!--{/if}-->
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -