📄 user_transaction.dwt
字号:
</tr>
<tr>
<th align="right"><label for="desamount">{$lang.exchange_desamount}:</label></th>
<td><input type="text" name="desamount" id="desamount" disabled="disabled" value="0" size="15" />
<select name="tocredits" id="tocredits" onchange="calcredit();">
{html_options options=$to_credits_options selected=$selected_dst}
</select>
</td>
</tr>
<tr>
<th align="right">{$lang.exchange_ratio}:</th>
<td>1 <span id="orgcreditunit">{$orgcreditunit}</span> <span id="orgcredittitle">{$orgcredittitle}</span> {$lang.exchange_action} <span id="descreditamount">{$descreditamount}</span> <span id="descreditunit">{$descreditunit}</span> <span id="descredittitle">{$descredittitle}</span></td>
</tr>
<tr><td> </td>
<td><input type="hidden" name="act" value="act_transform_ucenter_points" /><input type="submit" name="transfrom" value="{$lang.transform}" /></td></tr>
</table>
</form>
</div>
<script type="text/javascript">
{foreach from=$lang.exchange_js item=lang_js key=key}
var {$key} = '{$lang_js}';
{/foreach}
var out_exchange_allow = new Array();
{foreach from=$out_exchange_allow item=ratio key=key}
out_exchange_allow['{$key}'] = '{$ratio}';
{/foreach}
function calcredit()
{
var frm = document.forms['transForm'];
var src_credit = frm.fromcredits.value;
var dest_credit = frm.tocredits.value;
var in_credit = frm.amount.value;
var org_title = frm.fromcredits[frm.fromcredits.selectedIndex].innerHTML;
var dst_title = frm.tocredits[frm.tocredits.selectedIndex].innerHTML;
var radio = 0;
var shop_points = ['rank_points', 'pay_points'];
if (parseFloat(in_credit) > parseFloat(document.getElementById(shop_points[src_credit]).value))
{
alert(balance.replace('{%s}', org_title));
frm.amount.value = frm.desamount.value = 0;
return false;
}
if (typeof(out_exchange_allow[dest_credit+'|'+src_credit]) == 'string')
{
radio = (1 / parseFloat(out_exchange_allow[dest_credit+'|'+src_credit])).toFixed(2);
}
document.getElementById('orgcredittitle').innerHTML = org_title;
document.getElementById('descreditamount').innerHTML = radio;
document.getElementById('descredittitle').innerHTML = dst_title;
if (in_credit > 0)
{
if (typeof(out_exchange_allow[dest_credit+'|'+src_credit]) == 'string')
{
frm.desamount.value = Math.floor(parseFloat(in_credit) / parseFloat(out_exchange_allow[dest_credit+'|'+src_credit]));
frm.transfrom.disabled = false;
return true;
}
else
{
frm.desamount.value = deny;
frm.transfrom.disabled = true;
return false;
}
}
else
{
return false;
}
}
</script>
<!--{else}-->
<div class="content-div">
<h3>{$lang.cur_points}:</h3>
<table width="100%">
<tr>
<td width="30%" valign="top"><table border="0">
<!--{foreach from=$bbs_points item=points}-->
<tr>
<th>{$points.title}:</th>
<td width="120" style="border-bottom:1px solid #DADADA;">{$points.value}</td>
</tr>
<!--{/foreach} -->
</table></td>
<td width="50%" valign="top"><table>
<tr>
<th>{$lang.pay_points}:</th>
<td width="120" style="border-bottom:1px solid #DADADA;">{$shop_points.pay_points}</td>
</tr>
<tr>
<th>{$lang.rank_points}:</th>
<td width="120" style="border-bottom:1px solid #DADADA;">{$shop_points.rank_points}</td>
</tr>
</table></td>
</tr>
</table>
<br />
<h3>{$lang.rule_list}:</h3>
<ul>
<!-- {foreach from=$rule_list item=rule} -->
<li>"{$rule.from}" {$lang.transform} "{$rule.to}" {$lang.rate_is} {$rule.rate}
<!-- {/foreach} -->
</ul>
<form action="user.php" method="post" name="theForm">
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" style="border-collapse:collapse;border:1px solid #DADADA;">
<tr style="background:#F1F1F1;">
<th>{$lang.rule}</th>
<th>{$lang.transform_num}</th>
<th>{$lang.transform_result}</th>
</tr>
<tr>
<td>
<select name="rule_index" onchange="changeRule()">
<!--{foreach from=$rule_list item=rule key=key}-->
<option value="{$key}">{$rule.from}->{$rule.to}</option>
<!--{/foreach}-->
</select>
</td>
<td>
<input type="text" name="num" value="0" onkeyup="calPoints()"/>
</td>
<td><span id="ECS_RESULT">0</span></td>
</tr>
<tr>
<td colspan="3" align="center"><input type="hidden" name="act" value="act_transform_points" /><input type="submit" value="兑换" /></td>
</tr>
</table></form>
</div>
<script type="text/javascript">
//<![CDATA[
var rule_list = new Object();
var invalid_input = '{$lang.invalid_input}';
{foreach from=$rule_list item=rule key=key}
rule_list['{$key}'] = '{$rule.rate}';
{/foreach}
function calPoints()
{
var frm = document.forms['theForm'];
var rule_index = frm.elements['rule_index'].value;
var num = parseInt(frm.elements['num'].value);
var rate = rule_list[rule_index];
if (isNaN(num) || num < 0 || num != frm.elements['num'].value)
{
document.getElementById('ECS_RESULT').innerHTML = invalid_input;
rerutn;
}
var arr = rate.split(':');
var from = parseInt(arr[0]);
var to = parseInt(arr[1]);
if (from <=0 || to <=0)
{
from = 1;
to = 0;
}
document.getElementById('ECS_RESULT').innerHTML = parseInt(num * to / from);
}
function changeRule()
{
document.forms['theForm'].elements['num'].value = 0;
document.getElementById('ECS_RESULT').innerHTML = 0;
}
//]]>
</script>
<!--{/if}-->
<br /><br />
<!--{/if} -->
<!--#积分兑换 -->
</div>
<!-- End #page-right -->
<div class="clear"></div>
</div>
<!-- #BeginLibraryItem "/library/help.lbi" -->
<!--{if $helps}-->
<table width="801" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA" class="clear" style="margin:10px auto 5px auto;">
<tr>
<!-- {foreach from=$helps item=help_cat} -->
<td class="help-cat"><img src="images/grey_arrow.gif" alt="" width="37" height="37" />{$help_cat.cat_name}</td>
<!-- {/foreach} -->
</tr>
<tr>
<!-- {foreach from=$helps item=help_cat} -->
<td bgcolor="#FFFFFF" valign="top"><ul>
<!-- {foreach from=$help_cat.article item=item} -->
<li><a href="{$item.url}" title="{$item.title|escape:html}">{$item.short_title}</a></li>
<!-- {/foreach} -->
</ul></td>
<!-- {/foreach} -->
</tr>
</table>
<!--{/if}-->
<!-- #EndLibraryItem --><!-- #BeginLibraryItem "/library/page_footer.lbi" -->
<table width="801" border="0" align="center" cellpadding="5" cellspacing="0" style="margin:10px 0 20px 0;" id="footer-table">
<tr>
<td><img src="images/ecshop.gif" alt="ECSHOP" width="133" height="46" hspace="10" /></td>
<td width="6" id="foot-logo"><img src="images/footer_bg.gif" width="6" height="80" alt="" /></td>
<td> {$copyright}<br />
{$shop_address} {$shop_postcode} <br />
<!-- 客服电话{if $service_phone} -->
Tel: {$service_phone}
<!-- 结束客服电话{/if} -->
<!-- QQ 号码 {foreach from=$qq item=im} -->
<!-- {if $im} -->
<a href="http://wpa.qq.com/msgrd?V=1&Uin={$im}&Site={$shop_name}&Menu=yes" target="_blank"><img src="http://wpa.qq.com/pa?p=1:{$im}:4" height="16" border="0" alt="QQ" /> {$im}</a>
<!-- {/if} -->
<!-- {/foreach} 结束QQ号码 -->
<!-- 淘宝旺旺 {foreach from=$ww item=im} -->
<!-- {if $im} -->
<a href="http://amos1.taobao.com/msg.ww?v=2&uid={$im|escape:url}&s=2" target="_blank"><img src="http://amos1.taobao.com/online.ww?v=2&uid={$im|escape:url}&s=2" width="16" height="16" border="0" alt="淘宝旺旺" /> {$im}</a>
<!-- {/if} -->
<!--{/foreach} 结束淘宝旺旺 -->
<!-- Yahoo Messenger {foreach from=$ym item=im} -->
<!-- {if $im} -->
<a href="http://edit.yahoo.com/config/send_webmesg?.target={$im}n&.src=pg" target="_blank"><img src="images/yahoo.gif" width="18" height="17" border="0" alt="Yahoo Messenger" /> {$im}</a>
<!-- {/if} -->
<!-- {/foreach} 结束Yahoo Messenger -->
<!-- MSN Messenger {foreach from=$msn item=im} -->
<!-- {if $im} -->
<img src="images/msn.gif" width="18" height="17" border="0" alt="MSN" /> {$im}
<!-- {/if} -->
<!-- {/foreach} 结束MSN Messenger -->
<!-- Skype {foreach from=$skype item=im} -->
<!-- {if $im} -->
<img src="http://mystatus.skype.com/smallclassic/{$im|escape:url}" alt="Skype" /><a href="skype:{$im|escape:url}?call">{$im}</a>
<!-- {/if} -->
<!-- {/foreach} -->
<div>
<!-- 开始相关声明{foreach from=$declaration item=article} -->
<a href="{$article.url}" target="_blank">{$article.title}</a>
<!-- 相关声明{/foreach}-->
</div>
<!-- ICP 证书{if $icp_number} -->
<div> {$lang.icp_number}:<a href="http://www.miibeian.gov.cn/" target="_blank">{$icp_number}</a> </div>
<!-- 结束ICP 证书{/if} -->
{insert name='query_info'}<br />
<a href="http://www.ecshop.com" target="_blank" style="font-size:10px">Powered by <strong><span style="color: #3366FF">ECSHOP</span> <span style="color: #FF9966">{$ecs_version}</span></strong></a><br />
</td>
</tr>
</table>
{if $stats_code}
<div align="center">{$stats_code}</div>
{/if}
<script type="text/javascript">
var process_request = "{$lang.process_request}";
</script>
<!-- #EndLibraryItem --></div>
<!-- End #Wrapper -->
<div style="float:left;"><img src="images/page_right.gif" alt="" /></div>
</div>
<!-- End #globalWrapper -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -