88 lines
3.7 KiB
Smarty
88 lines
3.7 KiB
Smarty
<style>
|
||
.input_red {border:1px #ff0000 solid;color:#ff0000;}
|
||
.button_red {background:#ff0000;}
|
||
.input_green {border:1px #009900 solid;color:#009900;}
|
||
.button_green {background:#009900;}
|
||
</style>
|
||
<div class="xlh-25" onclick="loadnr('main','<!--{$union.UnionID}-->');">
|
||
<div class="xfr"><!--{$users.NickName}-->:<font color=#ff00ff><!--{$users.UnionMemberGold}-->分</font></div>
|
||
< 返回公会 :<!--{$union.UnionName}-->
|
||
</div>
|
||
<div class="xlh-35" style="margin-top:10px;">
|
||
<div class="xfl"><font size="3" color="red">+</font> <input type="number" class="input input_red" maxlength="5" style="width:70px;" id="gold_plus" value="100"></div>
|
||
<div class="xfl" style="margin-left:10px;"><input type="button" class="button button_red" value="增加欢乐分" onclick="goldEdit('plus');"></div>
|
||
<div class="xfl" style="margin-left:30px;"><font size="3" color="green">-</font> <input type="number" class="input input_green" style="width:70px;" maxlength="5" id="gold_reduce" value="100"></div>
|
||
<div class="xfl" style="margin-left:10px;"><input type="button" class="button button_green" value="减少欢乐分" onclick="goldEdit('reduce');"></div>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<div class="xfl hy_nrb">
|
||
<table width="100%">
|
||
<tr class="xlh-30">
|
||
<td align="center" class="xb-ef">操作分</td>
|
||
<td align="center" class="xb-ef">操作后</td>
|
||
<td align="center" class="xb-ef">操作时间</td>
|
||
</tr>
|
||
<!--{section name=loop loop=$gold}-->
|
||
<!--{assign var="i" value=$smarty.section.loop.rownum}-->
|
||
<tr class="xlh-25 <!--{if $i%2==0 }--> xb-ef<!--{/if}-->">
|
||
<td align=right><!--{if $gold[loop].UnionGold>0}--><font color=red><!--{else}--><font color=green><!--{/if}--><!--{$gold[loop].UnionGold}--></font> </td>
|
||
<td align=right><!--{$gold[loop].UnionGoldAfter}--> </td>
|
||
<td align=right><!--{$gold[loop].Time|date_format:"%Y-%m-%d"}--> </td>
|
||
</tr>
|
||
<!--{/section}-->
|
||
</table>
|
||
</div>
|
||
<div class="xfl hy_nrb">
|
||
<table width="100%">
|
||
<tr class="xlh-30">
|
||
<td align="center" colspan=3 class="xb-ef">会员游戏记录</td>
|
||
</tr>
|
||
<!--{section name=loop loop=$consumer}-->
|
||
<!--{assign var="i" value=$smarty.section.loop.rownum}-->
|
||
<tr class="xlh-25 <!--{if $i%2==0 }--> xb-ef<!--{/if}-->">
|
||
<td align=right><!--{if $consumer[loop].Gold>0}--><font color=red><!--{else}--><font color=green><!--{/if}--><!--{$consumer[loop].Gold}--></font> </td>
|
||
<td align=right><!--{$consumer[loop].Time|date_format:"%Y-%m-%d %H:%M:%S"}--> </td>
|
||
</tr>
|
||
<!--{/section}-->
|
||
</table>
|
||
</div>
|
||
<div class="clear"></div>
|
||
<script>
|
||
function goldEdit(id){
|
||
if(id == 'plus'){
|
||
var gold = $("#gold_plus").val();
|
||
var tit = "<!--{$users.NickName}--><br><font color=red>+"+gold+"</font>欢乐分";
|
||
}else{
|
||
var gold = $("#gold_reduce").val();
|
||
if(gold > <!--{$users.UnionMemberGold}-->){
|
||
layer.open({content: "扣除分大于<!--{$users.UnionMemberGold}-->分?",style: 'width:200px;',btn: '我知道了'});
|
||
return '';
|
||
}
|
||
var tit = "<!--{$users.NickName}--><font color=green><br>-"+gold+"</font>欢乐分";
|
||
}
|
||
if(!gold){
|
||
layer.open({content: "请输入分数",style: 'width:200px;',btn: '我知道了'});
|
||
return '';
|
||
}
|
||
var obj = {
|
||
type : id,
|
||
gold : gold,
|
||
idd : '<!--{$union.UnionID}-->',
|
||
sort : '<!--{$users.UserID}-->',
|
||
gameid : gid,
|
||
md5 : md5
|
||
};
|
||
layer.open({content: tit,style: 'width:200px;',btn: ['确定', '取消'],yes: function(index){
|
||
layer.open({type:2,shade:false});
|
||
$.get('/gong/mgold.php', obj, function(data, status) {
|
||
layer.closeAll();
|
||
if(data == 'ok'){
|
||
loadnr('mgold','<!--{$union.UnionID}-->','<!--{$users.UserID}-->');
|
||
}else{
|
||
remind_error(data,'220');
|
||
}
|
||
});
|
||
}});
|
||
}
|
||
layer.closeAll();
|
||
</script> |