Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php	(revision 777)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php	(revision 818)
@@ -1,6 +1,6 @@
-<?php
+﻿<?php
 $base_url = base_url();
 $this->load->view('layout/admin/header', array('base_url' => $base_url));
-$this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class  ));
+$this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class));
 ?>
 <script type="text/javascript">
@@ -26,5 +26,5 @@
             });
             return false;
-        })
+        });
         $('#keyword').keyup(function (event) {
             if (event.keyCode == '13') {
@@ -157,9 +157,9 @@
         <li>
             <i class="icon-home home-icon"></i>
-            <a href="#">Trang chá»§</a>
+            <a href="#">Trang chủ</a>
         </li>
 
         <li>
-            <a href="#">Quáº£n lÃœ tin nháº¯n</a>
+            <a href="#">Quản lý tin nhắn</a>
         </li>
         
@@ -169,5 +169,5 @@
         <form class="form-search">
             <span class="input-icon">
-                <input type="text" autocomplete="off" id="nav-search-input" class="nav-search-input" placeholder="TÃ¬m kiáº¿m ...">
+                <input type="text" autocomplete="off" id="nav-search-input" class="nav-search-input" placeholder="Tìm kiếm ...">
                 <i class="icon-search nav-search-icon"></i>
             </span>
@@ -183,8 +183,8 @@
     <div class="page-header">
         <h1>
-            Tin nháº¯n
+            Tin nhắn
             <small>
                 <i class="icon-double-angle-right"></i>
-                Máº«u tin nháº¯n
+                Mẫu tin nhắn
             </small>
         </h1>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php	(revision 777)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php	(revision 818)
@@ -3,4 +3,7 @@
 		<div style="padding-bottom:4px" class="table-header">
 			Doanh thu
+			<div class="pull-right" style="margin:5px;">
+					<a style="color:#fff" href="<?php echo base_url();?>admin/report/export">Xuất ra Excel</a>
+                </div>
 		</div>
 
@@ -48,6 +51,6 @@
 						<tr role="row">
 							
-							<th class="<?php if ($sorting_field == 'fullname') {echo $sorting_order;} else {echo "";}?>" id="full_name" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Họ tên</th>
-							<th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 283px;" aria-label="Họ tên: activate to sort column ascending">Số điện thoại</th>
+							<th class="<?php if ($sorting_field == 'fullname') {echo $sorting_order;} else {echo "";}?>" id="full_name" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
+							<th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 283px;" aria-label="Họ tên: activate to sort column ascending">Họ tên</th>
 							<th class="<?php if ($sorting_field == 'amount') {echo $sorting_order;} else {echo "sorting";}?>" id="amount" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">Số tiền</th> 
 							<th class="<?php if ($sorting_field == 'paid_type') {echo $sorting_order;} else {echo "sorting";}?>" id="paid_type" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Số điện thoại: activate to sort column ascending">SMS/Card</th> 
@@ -66,7 +69,7 @@
 
 							<td class=" ">
-								<a onclick="getUserHistory(<?php echo $paidlog['us_id']; ?>, 1);" data-toggle="modal"><?php echo $paidlog['username'];?></a>
+								<a onclick="getUserHistory(<?php echo $paidlog['us_id']; ?>, 1);" data-toggle="modal"><?php echo $paidlog['cellphone']?></a>
 							</td>
-							<td class=" "><?php echo $paidlog['cellphone']?></td>
+							<td class=" "><?php echo $paidlog['username'];?></td>
 							
 							<td class="hidden-480 "><?php echo number_format($paidlog['amount'],0);?></td>
@@ -134,4 +137,7 @@
                 <div class="tab-content history-tab-content">
                     <div class="tab-pane in active" id="regis">
+						<div class="col-sm-12">
+							<h5>Tài khoản SBG Online: <b><span class="blue"><span id="topup-money"><?php echo number_format($acc_balanced, 0); ?></span> VNĐ <span></b></h5>
+						</div>
                         <div class="table-responsive">
                             <table id="sample-table-1" class="table table-striped table-bordered table-hover">
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/reportpackage/province.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/reportpackage/province.php	(revision 777)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/reportpackage/province.php	(revision 818)
@@ -55,7 +55,18 @@
                             </tr>
                         </thead>
-
+						<tr>
+								<td colspan=2 align="center" style="font-weight:bold;">Tá»ng</td>
+								<?php $d = 0; ?>
+								<?php foreach ($totalVip as $vipName => $total): ?>	
+									<?php $d++;?>
+									<td style="font-weight:bold;"><?php echo $total; ?></td>
+									<?php if($d<count($totalVip)): ?>
+									<td></td>
+									<?php endif;?>
+								<?php endforeach; ?>
+							</tr>
                         <tbody role="alert" aria-live="polite" aria-relevant="all">
                             <?php
+							$total = array();
                             foreach ($provinces as $province) {
                                 ?>
@@ -75,7 +86,9 @@
                                 </tr>
                             <?php } ?>
+							<?php //var_dump($total);?>
+							
                         </tbody>
                     </table>
-                    <div class="row"><div class="col-sm-6">
+                    <!--<div class="row"><div class="col-sm-6">-->
 
                         </div>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php	(revision 777)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/reportprovince/province.php	(revision 818)
@@ -9,5 +9,6 @@
                 BÃ¡o cÃ¡o doanh thu theo tá»nh / thÃ nh phá»
                 <div class="pull-right" style="margin:5px;">
-                    <a style="color:#fff" href="<?php echo base_url();?>admin/reportprovince/export/<?php echo $month;?>/<?php echo $year;?>">Xuáº¥t ra Excel</a>
+                    <!--<a style="color:#fff" href="<?php echo base_url();?>admin/reportprovince/export/<?php echo $month;?>/<?php echo $year;?>">Xuáº¥t ra Excel</a>-->
+					<a style="color:#fff" href="<?php echo base_url();?>admin/reportprovince/exportProvince/<?php echo $month;?>/<?php echo $year;?>">Xuáº¥t ra Excel</a>
                 </div>
             </div>
@@ -17,6 +18,17 @@
                     <form autocomplete="off" onsubmit="return false;" id="province" >
                         <div class="row">
-                            <div class="col-sm-6">
-                                <div class="" style="display: inline-block"><label>ThÃ¡ng
+                            <div class="col-sm-1">
+                                <div class="" style="display: inline-block"><label><strong>Tá»«: </strong></label></div>
+							</div>
+							<div class="col-sm-6">
+								<div class="" style="display: inline-block"><label>NgÃ y</label>
+
+                                        <select aria-controls="sample-table-2" size="1" name="date" onchange="filter();">                                      
+                                            <?php for ($i=1;$i<=31;$i++) { ?>
+                                            <option value="<?php echo $i;?>" <?php if($date==$i) { ?> selected <?php }?>><?php echo $i;?></option>
+                                            <?php }?>
+                                        </select>
+                                </div>
+								<div class="" style="display: inline-block"><label>ThÃ¡ng</label>
 
                                         <select aria-controls="sample-table-2" size="1" name="month" onchange="filter();">                                      
@@ -34,5 +46,6 @@
                                         </select>
                                 </div>
-                            </div>
+							</div>
+							
 
                             <div class="col-sm-6">
@@ -40,4 +53,36 @@
                             </div>
                         </div>
+						
+						<div class="row">
+							<div class="col-sm-1">
+								<div class="" style="display: inline-block"><label><strong>Äáº¿n: </strong></label></div>
+							</div>
+							<div class="col-sm-6">
+								<div class="" style="display: inline-block"><label>NgÃ y</label>
+
+                                        <select aria-controls="sample-table-2" size="1" name="to_date" onchange="filter();">                                      
+                                            <?php for ($i=1;$i<=31;$i++) { ?>
+                                            <option value="<?php echo $i;?>" <?php if($to_date==$i) { ?> selected <?php }?>><?php echo $i;?></option>
+                                            <?php }?>
+                                        </select>
+                                </div>
+                                <div class="" style="display: inline-block"><label>ThÃ¡ng</label>
+
+                                        <select aria-controls="sample-table-2" size="1" name="to_month" onchange="filter();">                                      
+                                            <?php for ($i=1;$i<=12;$i++) { ?>
+                                            <option value="<?php echo $i;?>" <?php if($to_month==$i) { ?> selected <?php }?>><?php echo $i;?></option>
+                                            <?php }?>
+                                        </select>
+                                </div>
+                                <div class=""  style="display: inline-block"><label>NÄm
+
+                                        <select aria-controls="sample-table-2" size="1" name="to_year" onchange="filter();">                                      
+                                            <?php for ($i=2014;$i<=date("Y");$i++) { ?>
+                                            <option value="<?php echo $i;?>" <?php if($to_year==$i) { ?> selected <?php }?>><?php echo $i;?></option>
+                                            <?php }?>
+                                        </select>
+                                </div>
+                            </div>
+						</div>
                           </form>
                     <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
@@ -58,4 +103,14 @@
 
                         <tbody role="alert" aria-live="polite" aria-relevant="all">
+							<tr>
+								<td colspan=2 align="center" style="font-weight:bold;">Tá»ng</td>
+								<td style="font-weight:bold;"><?php echo $totalTbng; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalTbth; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalTbn; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalDtng; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalDtng; ?></td>
+								<td style="font-weight:bold;"><?php echo $totalDtn; ?></td>
+								
+							</tr>
                             <?php
                             foreach ($provinces as $province) {
@@ -77,4 +132,5 @@
 
                                 </tr>
+								
                             <?php } ?>
                         </tbody>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 777)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 818)
@@ -171,5 +171,5 @@
                                     <td class=" ">
                                         <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a>
-                                                                             <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>-->
+                                                                             <!--<a href="#user-history" data-toggle="modal"><?php echo $user['username']; ?></a>-->
                                     </td>
                                     <td class=" ">
@@ -177,5 +177,5 @@
                                     </td>
                                     <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td>
-									<td class=" "><?php echo $user['created_time']; ?></td>
+									<td class=" "><?php echo date('d/m/Y', strtotime($user['created_time'])); ?></td>
                                     <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date']) > 0 ? date('d/m/Y', strtotime($user['expire_date'])) : ''; ?></td>
                                     <td><?php echo $user['province']; ?></td>
@@ -225,5 +225,5 @@
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
-                <h4 class="modal-title">Lá»ch sá»­</h4>
+                <h4 class="modal-title">ThÃŽng tin ngÆ°á»i dÃ¹ng</h4>
             </div>
             <div class="modal-body">
@@ -242,4 +242,7 @@
                 <div class="tab-content history-tab-content">
                     <div class="tab-pane in active" id="regis">
+						<div class="col-sm-12">
+							<h5>TÃ i khoáº£n SBG Online: <b><span class="blue"><span id="topup-money"><?php echo number_format($acc_balanced, 0); ?></span> VNÄ <span></b></h5>
+						</div>
                         <div class="table-responsive">
                             <table id="sample-table-1" class="table table-striped table-bordered table-hover">
