Changeset 608


Ignore:
Timestamp:
Nov 21, 2014 3:57:53 PM (10 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php

    r591 r608  
    195195                                        <h4 class="header blue bolder smaller">ThÃŽng tin tài khoản</h4>
    196196                                                                                <div class="col-sm-6">
    197                                                                                         <h4>Số tiền trong tài khoản SBG Online: <b><span class="blue"><?php echo number_format(@$acc_balanced, 0); ?> VNĐ <span></b></h4>
     197                                                                                        <h4>Số tiền trong tài khoản SBG Online: <b><span class="blue" id="topup-money"><?php echo number_format(@$acc_balanced, 0); ?> VNĐ <span></b></h4>
    198198
    199199                                        </div>
     
    252252                                        </div>
    253253                                                                                <div class="col-sm-6">
    254                                             <h4>Số tiền trong tài khoản SBG Online</h4><h3> <?php echo number_format(@$acc_balanced, 0); ?> VNĐ <span id="add_money" style="cursor:pointer" class="badge" >Nạp thêm tiền</span></h3>
     254                                            <h4>Số tiền trong tài khoản SBG Online</h4><h3> <span id="vip-regis-money"> <?php echo number_format(@$acc_balanced, 0); ?></span> VNĐ <span id="add_money" style="cursor:pointer" class="badge" >Nạp thêm tiền</span></h3>
    255255                                        </div>
    256256
     
    487487        var url="<?php echo base_url();?>";
    488488        var current_tab="<?php echo $current_tab;?>";
    489 
     489        //var current_balanced = <?php echo $acc_balanced; ?>;
    490490</script>
    491491<?php
  • pro-violet-viettel/sourcecode/assets/js/frontend/user.js

    r593 r608  
    152152                                $("#success_charge").find('#success_charge_info').text("Quí vị đã nạp thành cÃŽng " + result.amount + " VNĐ vào tài khoản " + result.username + ", tài khoản ảo cá»§a quí vị là " + result.acc_balanced + " VNĐ!");
    153153                                $("#success_charge").modal('show');
     154                                $("#vip-regis-money").text(addCommas(result.acc_balanced));
     155                                $("#topup-money").text(addCommas(result.acc_balanced) + ' VNĐ');
     156                               
    154157                        }else
    155158                        {
     
    205208        });
    206209}
     210
     211function addCommas(nStr)
     212{
     213        nStr += '';
     214        x = nStr.split('.');
     215        x1 = x[0];
     216        x2 = x.length > 1 ? '.' + x[1] : '';
     217        var rgx = /(\d+)(\d{3})/;
     218        while (rgx.test(x1)) {
     219                x1 = x1.replace(rgx, '$1' + ',' + '$2');
     220        }
     221        return x1 + x2;
     222}
Note: See TracChangeset for help on using the changeset viewer.