458 lines
21 KiB
PHP
458 lines
21 KiB
PHP
<?php echo 'Discuz!应用中心开发者-简约设计';exit;?>
|
|
|
|
<!--{template common/header}-->
|
|
|
|
<!-- header start -->
|
|
<header class="header_xin">
|
|
<div class="hdc_xin cl" id="byg_header">
|
|
<div class="header_z cl">
|
|
<a href="javascript:;" class="shouye">
|
|
<img src="<!--{avatar($_G['uid'], 'middle', true)}-->" alt="头像"/>
|
|
<!--{if $_G[member][newpm] || $post_notice_new}-->
|
|
<img src="{$_G['style']['styleimgdir']}/new_pm.png" alt="提醒" class="new_pm"/>
|
|
<!--{/if}-->
|
|
</a>
|
|
<em>›</em>
|
|
<a href="home.php?mod=space&uid=$_G[uid]&do=profile&mycenter=1" title="个人中心">个人中心</a>
|
|
<em>›</em>
|
|
<!--{if $_GET['op'] == 'base'}-->
|
|
<span class="header_font">我的积分</span>
|
|
<!--{elseif $_GET['op'] == 'buy'}-->
|
|
<span class="header_font">充值</span>
|
|
<!--{elseif $_GET['op'] == 'transfer'}-->
|
|
<span class="header_font">转账</span>
|
|
<!--{elseif $_GET['op'] == 'exchange'}-->
|
|
<span class="header_font">兑换</span>
|
|
<!--{elseif $_GET['op'] == 'rule'}-->
|
|
<span class="header_font">积分规则</span>
|
|
<!--{/if}-->
|
|
</div>
|
|
<a href="javascript:history.back();" title="返回上一页" class="header_y">
|
|
<img src="{$_G['style']['styleimgdir']}/houtui.png" alt="返回"/></a>
|
|
</div>
|
|
</header>
|
|
<!--{hook/global_header_mobile}-->
|
|
<!-- header end -->
|
|
|
|
<style>
|
|
table{ width: 100%;}
|
|
.creditl{ margin-bottom: .1rem; padding: .1rem; background: #fff; font-size: .16rem;}
|
|
.creditl li{ margin: .06rem 0;}
|
|
.creditl em{ font-weight: 700;}
|
|
.creditl .xi2{ color: #06f;}
|
|
.creditl .xg1{ vertical-align: top;}
|
|
.creditl u{ text-decoration: none;}
|
|
.byg_base_b{ background: #fff;}
|
|
.byg_base_b caption{ padding: .08rem .1rem; border-bottom: 1px solid #eee;}
|
|
.byg_base_b caption h2{ font-weight: 700;}
|
|
.byg_base_b td, .byg_base_b th{ padding: .06rem .1rem; border-bottom: 1px solid #eee; border-right: 1px solid #eee; font-size: .14rem;}
|
|
.byg_base_b th{ background: #fafafa; font-size: .15rem;}
|
|
.byg_buy{ padding: 0 .1rem; background: #fff; font-size: .16rem;}
|
|
.byg_buy tr{ line-height: .46rem; border-bottom: 1px dashed #eaeaea;}
|
|
.byg_buy th{ width: 25%;}
|
|
.byg_buy .px{ padding: .02rem .04rem; line-height: .18rem; border: 1px solid #eee; font-size: .14rem;}
|
|
.byg_buy .sec_code{ padding: .1rem 0; border-bottom: 1px dashed #eaeaea;}
|
|
.byg_buy .sec_code .px{ vertical-align: top;}
|
|
.byg_buy .sec_code img{ float: left; margin-right: .1rem; height: .23rem; vertical-align: top;}
|
|
.byg_buy button{ margin: .12rem 0; width: 100%; height: .36rem; line-height: .36rem; font-size: .15rem;}
|
|
.byg_buy a{ display: block; margin-bottom: .12rem; line-height: .34rem; border: 1px solid #eaeaea; background: #fafafa; font-size: .15rem; color: #06f; text-align: center; border-radius: .02rem;}
|
|
.byg_buy .post_box{ padding-top: .1rem;}
|
|
.byg_buy .text-muted{ margin-top: .12rem; padding: .1rem; border: 1px dashed #eee; font-size: .14rem; color: #999; background: #ffe; border-radius: .02rem;}
|
|
|
|
.byg_box_x35{ padding: 0 .1rem; background: #fff;}
|
|
.byg_box_x35 .post_box li.mli{ height: .3rem; line-height: .3rem; padding: .1rem 0; font-size: .16rem; border-bottom: 1px solid #eee; position: relative;}
|
|
.byg_box_x35 .flex-2{ -webkit-box-flex: 2; -webkit-flex: 2; -ms-flex: 2; flex: 2;}
|
|
.byg_box_x35 .flex-3{ -webkit-box-flex: 3; -webkit-flex: 3; -ms-flex: 3; flex: 3;}
|
|
.byg_box_x35 .px{ width: 94%; border: 0; line-height: 28px; padding: 0 3%; font-size: .15rem; border-radius: .05rem; box-shadow: 0 0 0 1px #f5f5f5;}
|
|
.byg_box_x35 .post_box li.mli .input-append{ position: absolute; right: .06rem; font-size: .15rem;}
|
|
.byg_box_x35 select{ margin-left: .1rem; height: .3rem; line-height: .3rem; border-color: #eee; border-radius: .05rem; background: #f9f9f9; color: #666;}
|
|
.byg_box_x35 .text-muted{ margin-top: .1rem; padding: .05rem .1rem; color: #999; font-size: .14rem; background: #ffe; border-radius: .05rem; border: 1px dashed #eee;}
|
|
.byg_box_x35 .post_btn button{ margin: .12rem 0; width: 100%; height: .36rem; line-height: .36rem; font-size: .15rem;}
|
|
.byg_box_x35 table{ margin-top: .1rem; border-top: 1px solid #eee; border-left: 1px solid #eee;}
|
|
.byg_box_x35 td, .byg_box_x35 th{ padding: .08rem .05rem; border-bottom: 1px solid #eee; border-right: 1px solid #eee; font-size: .14rem;}
|
|
.byg_box_x35 th{ background: #f9f9f9; font-size: .15rem; font-weight: 700;}
|
|
.byg_box_x35 .alt td{ background-color: #f9f9f9;}
|
|
</style>
|
|
|
|
<!--{template home/spacecp_credit_header}-->
|
|
<!--{hook/spacecp_credit_top}-->
|
|
|
|
<!--{if in_array($_GET['op'], array('base', 'buy', 'transfer', 'exchange'))}-->
|
|
<ul class="creditl cl">
|
|
<!--{eval $creditid=0;}-->
|
|
<!--{if $_GET['op'] == 'base' && $_G['setting']['creditstrans']}-->
|
|
<!--{eval $creditid=$_G['setting']['creditstrans'];}-->
|
|
<!--{if $_G['setting']['extcredits'][$creditid]}-->
|
|
<!--{eval $credit=$_G['setting']['extcredits'][$creditid]; }-->
|
|
<li class="xi1 cl"><em>{$credit[title]} : </em><!--{echo getuserprofile('extcredits'.$creditid);}-->{$credit[unit]}</li>
|
|
<!--{/if}-->
|
|
<!--{/if}-->
|
|
<!--{loop $_G['setting']['extcredits'] $id $credit}-->
|
|
<!--{if $id!=$creditid}-->
|
|
<li><em>{$credit[title]} : </em><!--{echo getuserprofile('extcredits'.$id);}--> {$credit[unit]}</li>
|
|
<!--{/if}-->
|
|
<!--{/loop}-->
|
|
<!--{if $_GET['op'] == 'base'}-->
|
|
<li class="cl"><em>{lang credits} : </em>$_G['member']['credits'] <span class="xg1">( $creditsformulaexp )</span></li>
|
|
<!--{/if}-->
|
|
</ul>
|
|
<!--{/if}-->
|
|
|
|
<!--{if $_GET['op'] == 'base'}-->
|
|
<div class="byg_base_b">
|
|
<table summary="{lang memcp_credits_log_transaction}" cellspacing="0" cellpadding="0" class="">
|
|
<caption>
|
|
<h2 class="xs2">
|
|
近期记录
|
|
</h2>
|
|
</caption>
|
|
<tr>
|
|
<th width="70">{lang operation}</th>
|
|
<th width="70">{lang logs_credit}</th>
|
|
<th>{lang detail}</th>
|
|
<th width="70">{lang changedateline}</th>
|
|
</tr>
|
|
<!--{if $loglist}-->
|
|
<!--{loop $loglist $value}-->
|
|
<!--{eval $value = makecreditlog($value, $otherinfo);}-->
|
|
<tr>
|
|
<td><!--{if $value['operation']}--><a href="home.php?mod=spacecp&ac=credit&op=log&optype=$value['operation']">$value['optype']</a><!--{else}-->$value['title']<!--{/if}--></td>
|
|
<td>$value['credit']</td>
|
|
<td><!--{if $value['operation']}-->$value['opinfo']<!--{else}-->$value['text']<!--{/if}--></td>
|
|
<td>$value['dateline']</td>
|
|
</tr>
|
|
<!--{/loop}-->
|
|
<!--{else}-->
|
|
<tr><td colspan="4"><p class="emp">{lang memcp_credits_log_none}</p></td></tr>
|
|
<!--{/if}-->
|
|
</table>
|
|
</div>
|
|
|
|
<!--{elseif $_GET['op'] == 'buy'}-->
|
|
<!--{if (isset($_G['setting']['mobile']['forum']) && $_G['setting']['ec_ratio'] && $is_enable_pay) && $_G['setting']['card']['open']}-->
|
|
<div id="buy_tabs" class="dhnv flex-box mb10 cl">
|
|
<a href="javascript:void(0)" class="flex mon" data-id="#byg_buy_rmb">{lang home_credit_buy_rmb}</a>
|
|
<a href="javascript:void(0)" class="flex" data-id="#byg_buy_card">{lang home_credit_buy_card}</a>
|
|
</div>
|
|
<!--{/if}-->
|
|
|
|
<!--{if isset($_G['setting']['mobile']['forum']) && $_G['setting']['ec_ratio'] && $is_enable_pay}-->
|
|
<div class="byg_buy cl" id="byg_buy_rmb" <!--{if !$active['rmb']}-->style="display:none"<!--{/if}-->>
|
|
<form id="addfundsbuyform" name="addfundsbuyform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=buy">
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
|
<input type="hidden" name="addfundsbuyform" value="true" />
|
|
<input type="hidden" name="handlekey" value="buycredit" />
|
|
<div class="post_box">
|
|
<ul>
|
|
<li class="mli">
|
|
<span> 充值的{$_G[setting][extcredits][$_G[setting][creditstrans]][title]}数量 : </span>
|
|
<input type="number" value="" tabindex="1" class="px" autocomplete="off" id="addfundamount" name="addfundamount">
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="text-muted">
|
|
{lang memcp_credits_addfunds_rules_ratio} = <strong>$_G[setting][ec_ratio]</strong> {$_G[setting][extcredits][$_G[setting][creditstrans]][unit]}{$_G[setting][extcredits][$_G[setting][creditstrans]][title]}
|
|
<!--{if $_G[setting][ec_mincredits]}--><br />{lang memcp_credits_addfunds_rules_min} <strong>$_G[setting][ec_mincredits]</strong> {$_G[setting][extcredits][$_G[setting][creditstrans]][unit]}{$_G[setting][extcredits][$_G[setting][creditstrans]][title]}<!--{/if}-->
|
|
<!--{if $_G[setting][ec_maxcredits]}--><br />{lang memcp_credits_addfunds_rules_max} <strong>$_G[setting][ec_maxcredits]</strong> {$_G[setting][extcredits][$_G[setting][creditstrans]][unit]}{$_G[setting][extcredits][$_G[setting][creditstrans]][title]}<!--{/if}-->
|
|
<!--{if $_G[setting][ec_maxcreditspermonth]}--><br />{lang memcp_credits_addfunds_rules_month} <strong>$_G[setting][ec_maxcreditspermonth]</strong> {$_G[setting][extcredits][$_G[setting][creditstrans]][unit]}{$_G[setting][extcredits][$_G[setting][creditstrans]][title]}<!--{/if}-->
|
|
</div>
|
|
<div class="post_btn">
|
|
<button id="pmsubmit_btn" class="pn btn_pn mgrey" disable="true">
|
|
{lang home_credit_buy}
|
|
{lang memcp_credits_addfunds_caculate_radio}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<!--{/if}-->
|
|
|
|
<!--{if $_G['setting']['card']['open']}-->
|
|
<div class="byg_buy cl" id="byg_buy_card" {if !$active['card'] && isset($_G['setting']['mobile']['forum'])}style="display:none"{/if}>
|
|
<!--{if isset($_G['setting']['mobile']['forum'])}-->
|
|
<form id="addfundscardform" name="addfundscardform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=buy">
|
|
<input type="hidden" name="addfundscardsubmit" value="true" />
|
|
<!--{else}-->
|
|
<form id="addfundsform" name="addfundsform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=buy">
|
|
<input type="hidden" name="addfundssubmit" value="true" />
|
|
<!--{/if}-->
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
|
<input type="hidden" name="handlekey" value="buycredit" />
|
|
<table cellspacing="0" cellpadding="0" class="tfm">
|
|
<tr>
|
|
<th>{lang mode_of_payment} :</th>
|
|
<td colspan="2">
|
|
<div class="long-logo">
|
|
<ul>
|
|
<!--{if $_G[setting][card][open]}-->
|
|
<li>
|
|
<input name="bank_type" type="radio" value="card" checked="checked" id="apitype_card" class="vm" $ecchecked /><label><span class="xs2">{lang card_credit}</span></label>
|
|
</li>
|
|
<!--{/if}-->
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<!--{if $_G[setting][card][open]}-->
|
|
<tr id="cardbox">
|
|
<th>{lang card} :</th>
|
|
<td colspan="2">
|
|
<input type="text" class="px" id="cardid" name="cardid" />
|
|
</td>
|
|
</tr>
|
|
<!--{if $seccodecheck}-->
|
|
</table>
|
|
<!--{block sectpl}--><table id="card_box_sec" cellspacing="0" cellpadding="0" class="tfm mtn"><tr><th><sec></th><td colspan="2"><span id="sec<hash>" onclick="showMenu({'ctrlid':this.id,'win':'{$_GET[handlekey]}'})"><sec></span><div id="sec<hash>_menu" class="p_pop p_opt" style="display:none"><sec></div></td></tr></table><!--{/block}-->
|
|
<!--{subtemplate common/seccheck}-->
|
|
<table cellspacing="0" cellpadding="0" class="tfm">
|
|
<!--{/if}-->
|
|
<!--{/if}-->
|
|
<tr style="border: 0;">
|
|
<td colspan="3">
|
|
<!--{if isset($_G['setting']['mobile']['forum'])}-->
|
|
<button id="addfundscardsubmit_btn" name="addfundscardsubmit_btn" class="pn" disable="true"><em>{lang memcp_credits_addfunds}</em></button>
|
|
<!--{else}-->
|
|
<button type="submit" name="addfundssubmit_btn" class="pn" id="addfundssubmit_btn" value="true"><em>{lang memcp_credits_addfunds}</em></button>
|
|
<!--{/if}-->
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<!--{eval $buy_card = byg_block_fetch_value($bygsjw_blocks,'简约通用手机版购买充值卡密','param');}-->
|
|
<!--{if $buy_card}-->
|
|
<a href="{$buy_card['url']}" target="{$buy_card['atarget']}">{$buy_card['text']}</a>
|
|
<!--{/if}-->
|
|
</div>
|
|
<!--{/if}-->
|
|
|
|
<script type="text/javascript">
|
|
(function() {
|
|
$('#addfundamount').on('input',function() {
|
|
var addfundamount = parseInt($(this).val().replace(/^0/,''));
|
|
$('#desamount').html(!isNaN(addfundamount) ? Math.ceil(((addfundamount / $_G['setting']['ec_ratio']) * 100)) / 100 : 0);
|
|
});
|
|
$('#buy_tabs a').click(function() {
|
|
if($(this).hasClass('mon')) return;
|
|
var current = $(this).siblings('.mon');
|
|
current.removeClass('mon')
|
|
$(current.data('id')).hide();
|
|
$(this).addClass('mon');
|
|
$($(this).data('id')).show();
|
|
});
|
|
})();
|
|
</script>
|
|
|
|
<!--{elseif $_GET['op'] == 'transfer'}-->
|
|
<!--{if $_G[setting][transferstatus] && $_G['group']['allowtransfer']}-->
|
|
<form id="transferform" name="transferform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=transfer" class="byg_box_x35">
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
|
<input type="hidden" name="transfersubmit" value="true" />
|
|
<input type="hidden" name="handlekey" value="transfercredit" />
|
|
<div class="post_box">
|
|
<ul class="cl">
|
|
<li class="flex-box mli">
|
|
<div class="tit flex">{lang memcp_credits_transfer} </div>
|
|
<div class="flex-3"><input type="text" name="transferamount" id="transferamount" class="px" size="5" value="0" /></div>
|
|
<span class="input-append">{$_G[setting][extcredits][$_G[setting][creditstransextra][9]][title]}</span>
|
|
</li>
|
|
<li class="flex-box mli">
|
|
<div class="tit flex">{lang credits_give} </div>
|
|
<div class="flex-3"><input type="text" name="to" id="to" class="px" size="15" /></div>
|
|
</li>
|
|
<li class="mli">
|
|
<input type="password" name="password" class="px" value="" placeholder="{lang transfer_login_password}" />
|
|
</li>
|
|
<li class="mli">
|
|
<input type="text" name="transfermessage" class="px" size="40" placeholder="{lang credits_transfer_message}" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="text-muted">
|
|
{lang memcp_credits_transfer_min_balance} $_G[setting][transfermincredits] {$_G[setting][extcredits][$_G[setting][creditstransextra][9]][unit]}<br />
|
|
<!--{if intval($taxpercent) > 0}-->{lang credits_tax} $taxpercent<!--{/if}-->
|
|
</div>
|
|
<div class="post_btn">
|
|
<button type="submit" name="transfersubmit_btn" id="transfersubmit_btn" class="pn btn_pn" value="true"><em>{lang memcp_credits_transfer}</em></button>
|
|
<span style="display: none" id="return_transfercredit"></span>
|
|
</div>
|
|
</form>
|
|
<!--{/if}-->
|
|
|
|
<!--{elseif $_GET['op'] == 'exchange'}-->
|
|
<!--{if $_G[setting][exchangestatus] && ($_G[setting][extcredits] || $_CACHE['creditsettings'])}-->
|
|
<form id="exchangeform" name="exchangeform" method="post" autocomplete="off" action="home.php?mod=spacecp&ac=credit&op=exchange&handlekey=credit" onsubmit="showWindow('credit', 'exchangeform', 'post');" class="byg_box_x35">
|
|
<input type="hidden" name="formhash" value="{FORMHASH}" />
|
|
<input type="hidden" name="operation" value="exchange" />
|
|
<input type="hidden" name="exchangesubmit" value="true" />
|
|
<input type="hidden" name="outi" value="" />
|
|
<div class="post_box">
|
|
<ul class="cl">
|
|
<li class="flex-box mli">
|
|
<div class="tit flex">{lang memcp_credits_exchange} </div>
|
|
<div class="flex-2"><input type="text" id="exchangeamount" name="exchangeamount" class="px" size="5" value="0" onkeyup="exchangecalcredit()" /></div>
|
|
<div class="flex input">
|
|
<select name="tocredits" id="tocredits" class="sort_sel" onChange="exchangecalcredit()">
|
|
<!--{loop $_G[setting][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}-->
|
|
<!--{eval $i=0;}-->
|
|
|
|
<!--{loop $_CACHE['creditsettings'] $id $data}--><!--{eval $i++;}-->
|
|
<!--{if $data['title']}-->
|
|
<option value="$id" outi="$i">{$data['title']}</option>
|
|
<!--{/if}-->
|
|
<!--{/loop}-->
|
|
</select>
|
|
</div>
|
|
</li>
|
|
<li class="flex-box mli">
|
|
<div class="tit flex">{lang credits_need} </div>
|
|
<div class="flex-2"><input type="text" id="exchangedesamount" class="px" size="5" value="0" disabled="disabled" /></div>
|
|
<div class="flex input">
|
|
<select name="fromcredits" id="fromcredits_0" class="sort_sel" style="display: none" onChange="exchangecalcredit();">
|
|
<!--{loop $_G[setting][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>
|
|
<!--{eval $i=0;}-->
|
|
<!--{loop $_CACHE['creditsettings'] $id $data}--><!--{eval $i++;}-->
|
|
<select name="fromcredits_$i" id="fromcredits_$i" class="sort_sel" style="display: none" onChange="exchangecalcredit()">
|
|
<!--{loop $data['creditsrc'] $id $ratio}-->
|
|
<option value="$id" unit="$_G['setting']['extcredits'][$id]['unit']" title="$_G['setting']['extcredits'][$id]['title']" ratiosrc="$data['ratiosrc'][$id]" ratiodesc="$data['ratiodesc'][$id]">$_G['setting']['extcredits'][$id]['title']</option>
|
|
<!--{/loop}-->
|
|
</select>
|
|
<!--{/loop}-->
|
|
<script type="text/javascript">
|
|
function getID(id) {
|
|
return !id ? null : document.getElementById(id);
|
|
}
|
|
var tocredits = getID('tocredits');
|
|
var fromcredits = getID('fromcredits_0');
|
|
if(fromcredits.length > 1 && tocredits.value == fromcredits.value) {
|
|
fromcredits.selectedIndex = tocredits.selectedIndex + 1;
|
|
}
|
|
</script>
|
|
</div>
|
|
</li>
|
|
<li class="mli">
|
|
<input type="password" name="password" class="px" value="" placeholder="{lang transfer_login_password}" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="text-muted">
|
|
<!--{if $_G[setting][exchangemincredits]}-->
|
|
{lang memcp_credits_exchange_min_balance} $_G[setting][exchangemincredits]<br />
|
|
<!--{/if}-->
|
|
<span id="taxpercent">
|
|
<!--{if intval($taxpercent) > 0}-->
|
|
{lang credits_tax} $taxpercent
|
|
<!--{/if}-->
|
|
</span>
|
|
</div>
|
|
<div class="post_btn">
|
|
<button type="submit" name="exchangesubmit_btn" id="exchangesubmit_btn" class="pn" value="true"><em>{lang memcp_credits_exchange}</em></button>
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
function exchangecalcredit() {
|
|
with(getID('exchangeform')) {
|
|
tocredit = tocredits[tocredits.selectedIndex];
|
|
if(!tocredit) {
|
|
return;
|
|
}
|
|
|
|
<!--{eval $i=0;}-->
|
|
<!--{loop $_CACHE['creditsettings'] $id $data}--><!--{eval $i++;}-->
|
|
getID('fromcredits_$i').style.display = 'none';
|
|
<!--{/loop}-->
|
|
if(tocredit.getAttribute('outi')) {
|
|
outi.value = tocredit.getAttribute('outi');
|
|
fromcredit = getID('fromcredits_' + tocredit.getAttribute('outi'));
|
|
getID('taxpercent').style.display = getID('fromcredits_0').style.display = 'none';
|
|
fromcredit.style.display = '';
|
|
fromcredit = fromcredit[fromcredit.selectedIndex];
|
|
getID('exchangeamount').value = getID('exchangeamount').value.toInt();
|
|
if(getID('exchangeamount').value != 0) {
|
|
getID('exchangedesamount').value = Math.floor( fromcredit.getAttribute('ratiosrc') / fromcredit.getAttribute('ratiodesc') * $('exchangeamount').value);
|
|
} else {
|
|
getID('exchangedesamount').value = '';
|
|
}
|
|
} else {
|
|
outi.value = 0;
|
|
getID('taxpercent').style.display = getID('fromcredits_0').style.display = '';
|
|
fromcredit = fromcredits[fromcredits.selectedIndex];
|
|
getID('exchangeamount').value = getID('exchangeamount').value.toInt();
|
|
if(fromcredit.getAttribute('title') != tocredit.getAttribute('title') && getID('exchangeamount').value != 0) {
|
|
if(tocredit.getAttribute('ratio') < fromcredit.getAttribute('ratio')) {
|
|
getID('exchangedesamount').value = Math.ceil( tocredit.getAttribute('ratio') / fromcredit.getAttribute('ratio') * getID('exchangeamount').value * (1 + $_G[setting][creditstax]));
|
|
} else {
|
|
getID('exchangedesamount').value = Math.floor( tocredit.getAttribute('ratio') / fromcredit.getAttribute('ratio') * getID('exchangeamount').value * (1 + $_G[setting][creditstax]));
|
|
}
|
|
} else {
|
|
getID('exchangedesamount').value = '';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
String.prototype.toInt = function() {
|
|
var s = parseInt(this);
|
|
return isNaN(s) ? 0 : s;
|
|
}
|
|
exchangecalcredit();
|
|
</script>
|
|
<!--{/if}-->
|
|
|
|
<!--{elseif $_GET['op'] == 'rule'}-->
|
|
{eval
|
|
$_TPL['cycletype'] = array(
|
|
'0' => '{lang one_time}',
|
|
'1' => '{lang everyday}',
|
|
'2' => '{lang the_time}',
|
|
'3' => '{lang interval_minutes}',
|
|
'4' => '{lang open_cycle}'
|
|
);
|
|
}
|
|
<div class="byg_box_x35" style="padding-bottom:.1rem;">
|
|
<div class="post_box setbox">
|
|
<ul class="c">
|
|
<li class="mli">
|
|
<select onchange="location.href='home.php?mod=spacecp&ac=credit&op=rule&fid='+this.value" class="sort_sel" style="margin:0;"><option value="">{lang credit_rule_global}</option>$select</select>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="text-muted">
|
|
<p>{lang activity_award_message}</p>
|
|
</div>
|
|
<table cellspacing="0" cellpadding="0" class="dt valt">
|
|
<tr>
|
|
<th class="xw1">{lang action_name}</th>
|
|
<th class="xw1">{lang cycle_range}</th>
|
|
<th class="xw1">{lang max_award_per_week}</th>
|
|
<!--{loop $_G['setting']['extcredits'] $key $value}-->
|
|
<th class="xw1">$value[title]</th>
|
|
<!--{/loop}-->
|
|
</tr>
|
|
<!--{eval $i = 0;}-->
|
|
<!--{loop $list $key $value}-->
|
|
<!--{eval $i++;}-->
|
|
<tr{if $i % 2 == 0} class="alt"{/if}>
|
|
<td>$value[rulename]</td>
|
|
<td>$_TPL[cycletype][$value[cycletype]]</td>
|
|
<td><!--{if $value[rewardnum]}-->$value[rewardnum]<!--{else}-->{lang unlimited_time}<!--{/if}--></td>
|
|
<!--{loop $_G['setting']['extcredits'] $key $credit}-->
|
|
<!--{eval $creditkey = 'extcredits'.$key;}-->
|
|
<td><!--{if $value[$creditkey] > 0}-->+$value[$creditkey]<!--{elseif $value[$creditkey] < 0}-->$value[$creditkey]<!--{else}-->0<!--{/if}--></td>
|
|
<!--{/loop}-->
|
|
</tr>
|
|
<!--{/loop}-->
|
|
</table>
|
|
</div>
|
|
|
|
<!--{/if}-->
|
|
|
|
<!--{hook/spacecp_credit_bottom}-->
|
|
<!--{template common/footer}-->
|