Index: pro-violet-viettel/sourcecode/application/config/routes.php
===================================================================
--- pro-violet-viettel/sourcecode/application/config/routes.php	(revision 420)
+++ pro-violet-viettel/sourcecode/application/config/routes.php	(revision 422)
@@ -67,4 +67,15 @@
 $route['admin/mau_tin_nhan/cap_nhat'] = 'admin/smstemplate/updateSms';
 
+$route['admin/doanh_thu_tong_hop'] = 'admin/report';
+$route['admin/doanh_thu_tong_hop/trang'] = 'admin/report/getSmstemplates/1';
+$route['admin/doanh_thu_tong_hop/them'] = 'admin/report/addSmstemplate';
+$route['admin/doanh_thu_tong_hop/trang/:any'] = 'admin/report/getSmstemplates/$1';
+$route['admin/doanh_thu_tong_hop/test'] = 'admin/report/test';
+$route['admin/doanh_thu_tong_hop/xem/:any'] = 'admin/report/viewSms';
+$route['admin/doanh_thu_tong_hop/sua/:any'] = 'admin/report/editSms';
+$route['admin/doanh_thu_tong_hop/xoa/:any'] = 'admin/report/deleteSms';
+$route['admin/doanh_thu_tong_hop/xoa_tin_nhan'] = 'admin/report/dodeleteSms';
+$route['admin/doanh_thu_tong_hop/cap_nhat'] = 'admin/report/updateSms';
+
 
 $route['admin/quan_tri_vien'] = 'admin/admin_acc';
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 420)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php	(revision 422)
@@ -216,4 +216,6 @@
             $this->collabolator_model->insert($input);
         }
+        
+        
     }
 
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/report.php	(revision 422)
@@ -0,0 +1,225 @@
+<?php
+
+if (!defined('BASEPATH'))
+    exit('No direct script access allowed');
+
+class Report extends MX_Controller {
+
+    public function __construct() {
+        parent::__construct();
+        $this->load->helper('cookie');
+    }
+
+    public function index() {
+        $data = array();
+        $admin_info = $this->session->userdata('adminInfo');
+        if ($admin_info) {
+            $data['statistics'] = $this->getStatistics();
+            $data['content'] = $this->getSmstemplates();
+            $this->load->view('report/index', $data);
+        } else {
+            $this->load->view('login');
+        }
+    }
+    public function getStatistics()
+    {
+        $data=array();
+        return $this->load->view('report/statistics', $data, true);
+    }
+    public function getSmstemplates($filters = array()) {
+        $this->load->helper('pagging');
+        $this->load->model('paidlog_model');
+        $data['current_page'] = $this->uri->segment(4, 1);
+        $data['itemsoptions'] = array(10, 25, 50, 100);
+        $data['perpage'] = 10;
+        $data['keyword'] = "";
+        $data['sorting_order']="sorting_desc";
+        $data['sorting_field']="paid_id";
+        
+        if ($this->input->post('sorting_order')) {
+            if ($this->input->post('sorting_order') != "sorting")
+            {
+               $data['sorting_order']=$this->input->post('sorting_order');
+               $data['sorting_field']=$this->input->post('sorting_field'); 
+            }
+        }
+        if ($this->input->post('items')) {
+            $data['perpage'] = $this->input->post('items');
+        }
+        if ($this->input->post('keyword')) {
+            $data['search_field']="";
+            $data['keyword'] = $this->input->post('keyword');
+            
+            if (preg_match("/[0-9]/", $data['keyword']))
+            {
+               $data['search_field']="cellphone"; 
+            }
+            
+        }
+        
+        $data['start'] = ($data['current_page'] - 1) * $data['perpage'];
+        $data['total'] = $this->paidlog_model->countSmstemplate($data);  
+       
+        $data['paidlogs'] = $this->paidlog_model->getSmstemplates($data);
+
+        $data['paging_url'] = base_url() . "/admin/mau_tin_nhan/trang/";
+        $data['num_links'] = 2;
+        $data['paging'] = pagging($data);
+
+        if ($this->input->is_ajax_request()) {
+            return $this->load->view('report/listview', $data);
+        }
+        return $this->load->view('report/listview', $data, true);
+    }
+
+    public function addSmstemplate() {
+        $result['success'] = 0;
+        $result = array();
+        $input = $this->input->post();
+        $this->load->model('paidlog_model');
+        if (strlen($input['sms_content'])==0)
+        {
+            $result['errors'][]="Ná»i dung tin nháº¯n khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        if (strlen($input['sms_reply'])==0)
+        {
+            $result['errors'][]="Tin nháº¯n tráº£ vá» khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
+            if ($this->paidlog_model->isExist(array('field'=>'login_name','value'=>$input['login_name'],'id'=>$input['id'])))
+            {
+                $result['errors'][]="TÃªn ÄÄng nháº­p ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+            }
+             * 
+             */
+        }
+        if (strlen($input['service_id'])==0)
+        {
+            $result['errors'][]="MÃ£ dá»ch vá»¥ khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
+            if ($this->paidlog_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone'],'id'=>$input['id'])))
+            {
+                $result['errors'][]="Sá» Äiá»n thoáº¡i ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+            }
+             * 
+             */
+        }
+        if (!isset($result['errors']))
+        {
+            $this->load->model('paidlog_model');
+            $this->paidlog_model->insert($input);
+            $result['success'] = 1;
+        }
+
+        
+        echo json_encode($result);
+    }
+    public function viewSms()
+    {
+        $id=$this->uri->segment(4);
+        $this->load->model('paidlog_model');
+        $data=$this->paidlog_model->getSmstemplate($id);
+        $this->load->view('report/viewSms',$data);
+    }
+    public function editSms()
+    {
+        $id=$this->uri->segment(4);
+        $this->load->model('paidlog_model');
+        $data=$this->paidlog_model->getSmstemplate($id);
+        $this->load->view('report/editSms',$data);
+    }
+    public function dodeleteSms()
+    {
+        $input=$this->input->post();
+        $id=$input['sms_id'];
+        $this->load->model('paidlog_model');
+        $data=$this->paidlog_model->delete($id);
+        $result['success']=1;
+        echo json_encode($result);
+    }
+    public function deleteSms()
+    {
+        $id=$this->uri->segment(4);
+        $this->load->model('paidlog_model');
+        $data=$this->paidlog_model->getSmstemplate($id);
+        $this->load->view('report/deleteSms',$data);
+    }
+    public function updateSms()
+    {
+       
+        $input=  $this->input->post();
+        $this->load->model('paidlog_model');
+        if (strlen($input['sms_content'])==0)
+        {
+            $result['errors'][]="Ná»i dung tin nháº¯n khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        if (strlen($input['sms_reply'])==0)
+        {
+            $result['errors'][]="Tin nháº¯n tráº£ vá» khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
+            if ($this->paidlog_model->isExist(array('field'=>'login_name','value'=>$input['login_name'],'id'=>$input['id'])))
+            {
+                $result['errors'][]="TÃªn ÄÄng nháº­p ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+            }
+             * 
+             */
+        }
+        if (strlen($input['service_id'])==0)
+        {
+            $result['errors'][]="MÃ£ dá»ch vá»¥ khÃŽng ÄÆ°á»£c Äá» trá»ng";
+        }
+        else
+        {
+            /*
+            if ($this->paidlog_model->isExist(array('field'=>'cellphone','value'=>$input['cellphone'],'id'=>$input['id'])))
+            {
+                $result['errors'][]="Sá» Äiá»n thoáº¡i ÄÃ£ ÄÆ°á»£c sá»­ dá»¥ng";
+            }
+             * 
+             */
+        }
+        
+        if (!isset($result['errors']))
+        { 
+            $this->load->model('paidlog_model');
+            $this->paidlog_model->update($input['sms_id'],$input);
+            $result['success'] = 1;
+        }
+        echo json_encode($result);
+    }
+    public function test() {
+        
+      /*
+        for ($i = 1; $i <= 1500; $i++) {
+            $input['us_id']=rand(1,100);
+            $input['paid_type']=rand(1,2);
+            $input['amount']=rand(3,10)*1000;
+            $time=(rand((time()-(5*30*24*60*60)),time()));
+            $input['paid_time']= date("Y-m-d H:i:s",$time);
+            $this->load->model('paidlog_model');
+            $this->paidlog_model->insert($input);
+        }
+       * 
+       */
+        for ($i = 1; $i <= 100; $i++) {
+            $input['us_id']=$i;
+            $input['cellphone']="01234567".(100+$i);
+            $input['collaborator']=rand(1,100);
+            $input['acc_balanced']=rand(100000,1000000);
+            $input['expire_date']=date("Y-m-d H:i:s",time());
+            $input['created_time']=date("Y-m-d H:i:s",time());
+            $input['updated_time']=date("Y-m-d H:i:s",time());
+            $this->load->model('user_model');
+            $this->user_model->insert($input);
+        }
+    }
+
+}
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/paidlog_model.php	(revision 422)
@@ -0,0 +1,70 @@
+﻿<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class Paidlog_model extends MY_Model
+{
+	
+	protected $table_name = 'tblpaidlog';
+	protected $id_name = 'paid_id';
+
+	function __construct()
+	{
+		parent::__construct();
+	}
+	function getSmstemplates($data) {
+        $sql = "SELECT * FROM " . $this->table_name. " INNER JOIN tbluser ON tbluser.us_id = tblpaidlog.us_id ";
+        if ($data['keyword']) {
+            if ($data['search_field'] == "cellphone") {
+                $sql.=" WHERE (service_id LIKE '%" . $data['keyword'] . "%')";
+            } else {
+                $sql.=" WHERE (sms_content LIKE '%" . $data['keyword'] . "%' OR sms_reply LIKE '%" . $data['keyword'] . "%') ";
+            }
+        }
+
+        $order = "";
+        if ($data['sorting_order'] != "sorting") {
+            if ($data['sorting_field'] != "money") {
+                $sort = "DESC";
+                if ($data['sorting_order'] == "sorting_asc")
+                    $sort = "ASC";
+                $order = "ORDER BY " . $data['sorting_field'] . " " . $sort;
+            }
+        }
+        $sql=$sql . " " . $order . " LIMIT " . $data['start'] . ", " . $data['perpage'] . " ";
+      // echo $sql;
+        return $this->db->query($sql)->result_array();
+    }
+
+    function isExist($data) {
+        $sql = "SELECT COUNT(id) as total FROM " . $this->table_name . " WHERE " . $data['field'] . " = '" . $data['value'] . "'";
+        if (isset($data['id']))
+        {
+            $id=$data['id'];
+            $sql.=" AND id <> ".$id." LIMIT 1";
+        }
+        $result = $this->db->query($sql)->row_array();
+        if ($result['total'] == 1) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function countSmstemplate($data) {
+        $sql = "SELECT COUNT(".$this->id_name.") as total FROM " . $this->table_name;
+        if ($data['keyword']) {
+            if ($data['search_field'] == "cellphone") {
+                $sql.=" WHERE (service_id LIKE '%" . $data['keyword'] . "%')";
+            } else {
+                $sql.=" WHERE (sms_content LIKE '%" . $data['keyword'] . "%' OR sms_reply LIKE '%" . $data['keyword'] . "%') ";
+            }
+        }
+        $result = $this->db->query($sql)->row_array();
+        return $result['total']; 
+    }
+    function getSmstemplate($id)
+    {
+        $sql="SELECT * FROM ".$this->table_name." WHERE ".$this->id_name."=".$id." LIMIT 1";
+        $result = $this->db->query($sql)->row_array();
+        return $result;
+    }
+}
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/deleteSms.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/deleteSms.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/deleteSms.php	(revision 422)
@@ -0,0 +1,81 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="delete_sms_<?php echo $sms_id;?>" onsubmit="return false;" class="form-horizontal" role="form">
+                    <input type="hidden" value="<?php echo $sms_id?>" name="sms_id" />
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+<div class="form-group errors" id="add_sms_<?php echo $sms_id;?>"></div>
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="error_delete_sms_<?php echo $sms_id;?>"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" onclick="return deletesms('<?php echo $sms_id;?>')">XÃ³a cá»ng tÃ¡c viÃªn nÃ y</a>
+                            <a href="#" id="close_delete_sms_<?php echo $sms_id;?>" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/editSms.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/editSms.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/editSms.php	(revision 422)
@@ -0,0 +1,81 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="editSms_<?php echo $sms_id;?>" onsubmit="return false;" class="form-horizontal" role="form">
+                    <input type="hidden" name="sms_id" value="<?php echo $sms_id;?>">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input   name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input   name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" onclick="return updatesms('<?php echo $sms_id;?>')">Cáº­p nháº­t</a>
+                            <a href="#" class="btn btn-primary" id="close_edit_sms_<?php echo $sms_id;?>" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/index.php	(revision 422)
@@ -0,0 +1,271 @@
+<?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  ));
+?>
+<script type="text/javascript">
+    function init_page()
+    {
+
+        $(".ajax_paging").click(function () {
+            $.ajax({
+                url: $(this).attr("href"),
+                type: "POST",
+                data: $("#collaborator").serialize(),
+                success: function (data, textStatus, jqXHR)
+                {
+                    // $result = jQuery.parseJSON(data);
+                    $("#content").html(data);
+                    init_page();
+
+                },
+                error: function (jqXHR, textStatus, errorThrown)
+                {
+                    $(".ajaxloading").hide();
+                }
+            });
+            return false;
+        })
+        $('#keyword').keyup(function (event) {
+            if (event.keyCode == '13') {
+                filter();
+            }
+            return false;
+        });
+        
+        
+        $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
+            var current_class=$( this ).attr('class');
+            $(".sorting_desc").attr("class","sorting");
+            $(".sorting_asc").attr("class","sorting");
+     
+            if(current_class=='sorting')
+            {
+                $(this).attr("class","sorting_desc");
+            }
+            else
+            {
+                if(current_class=='sorting_desc')
+                {
+                    $(this).attr("class","sorting_asc");
+                }
+                else
+                    {
+                    if(current_class=='sorting_asc')
+                    {
+                        $(this).attr("class","sorting");
+                    }
+                }
+            }
+            $("#sorting_field").val($(this).attr("id"));
+            $("#sorting_order").val($(this).attr("class"));
+            filter();
+        });
+        $('[data-toggle="ajaxModal"]').on('click',
+              function(e) {
+                $('#ajaxModal').remove();
+                e.preventDefault();
+                var $this = $(this)
+                  , $remote = $this.data('remote') || $this.attr('href')
+                  , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>');
+                $('body').append($modal);
+                $modal.modal({backdrop: 'static', keyboard: false});
+                $modal.load($remote);
+              }
+            );
+
+
+    }
+
+
+    function filter()
+    {
+        $.ajax({
+            url: 'http://viettel.violet.vn/admin/mau_tin_nhan/trang/1',
+            type: "POST",
+            data: $("#collaborator").serialize(),
+            success: function (data, textStatus, jqXHR)
+            {
+                // $result = jQuery.parseJSON(data);
+                $("#content").html(data);
+                init_page();
+                $("#keyword").focus();
+                $("#keyword").setCursorToTextEnd();
+
+            },
+            error: function (jqXHR, textStatus, errorThrown)
+            {
+                $(".ajaxloading").hide();
+            }
+        });
+    }
+
+
+</script>
+<style type="text/css" media="screen">
+			.widget-header-flat {
+				background: #307ecc;
+				color: #fff
+			}
+			.widget-toolbar>[data-action="collapse"], .header-color-dark>.widget-toolbar>[data-action="collapse"] {
+				color: #fff
+			}
+			.widget-header, .widget-content {
+				width: auto
+			}
+			.widget-body .table thead:first-child tr {
+				background: #EDECEC;
+			    color: #707070;
+			    font-weight: normal;
+			}
+		</style>
+<div class="main-content" id="content">
+    <div id="breadcrumbs" class="breadcrumbs">
+
+    <ul class="breadcrumb">
+        <li>
+            <i class="icon-home home-icon"></i>
+            <a href="#">Trang chá»§</a>
+        </li>
+
+        <li>
+            <a href="#">Quáº£n lÃœ tin nháº¯n</a>
+        </li>
+        
+    </ul><!-- .breadcrumb -->
+
+    <div id="nav-search" class="nav-search">
+        <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 ...">
+                <i class="icon-search nav-search-icon"></i>
+            </span>
+        </form>
+    </div><!-- #nav-search -->
+</div>
+    
+    
+    
+    
+<div class="page-content">
+    
+    <div class="page-header">
+        <h1>
+            Tin nháº¯n
+            <small>
+                <i class="icon-double-angle-right"></i>
+                Máº«u tin nháº¯n
+            </small>
+        </h1>
+    </div><!-- /.page-header -->
+    
+     <div class="row">
+         
+         
+    <?php echo $statistics; ?>     
+    <?php //echo $content; ?>
+     </div>
+    </div>
+</div><!-- /.main-content -->
+</div><!-- /.main-container-inner -->
+
+<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
+    <i class="icon-double-angle-up icon-only bigger-110"></i>
+</a>
+</div><!-- /.main-container -->
+
+
+<div id="addSms" class="modal fade in" tabindex="-1">
+     
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_sms" onsubmit="return false;" class="form-horizontal" role="form">
+                    
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input   name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input   name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_sms"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <button class="btn btn-info" id="add_sms" type="button">
+                                <i class="icon-ok bigger-110"></i>
+                                HoÃ n táº¥t
+                            </button>
+
+                            &nbsp; &nbsp; &nbsp;
+                            <button class="btn" type="reset">
+                                <i class="icon-undo bigger-110"></i>
+                                XÃ³a háº¿t
+                            </button>
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
+
+    </div><!-- /.modal-content -->
+</div><!-- /.modal-dialog -->
+<?php
+$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/smstemplate.js')));
+?>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/listview.php	(revision 422)
@@ -0,0 +1,119 @@
+
+
+   
+        <div class="col-xs-12">
+            <!-- PAGE CONTENT BEGINS -->
+            <div style="padding-bottom:4px" class="table-header">
+                Tin nháº¯n
+
+                <button href="#addSms" data-toggle="modal" class="btn btn-success pull-right">
+                    <i class="icon-plus"></i>
+                    ThÃªm tin nháº¯n
+                </button>
+
+            </div>
+
+            <div class="table-responsive">
+                <div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper">
+                    <form autocomplete="off" onsubmit="return false;" id="collaborator" >
+                        <div class="row">
+                            <div class="col-sm-6">
+                                <div id="sample-table-2_length" class="dataTables_length"><label>Hiá»n thá» 
+                                        <select onchange="filter();" name="items" size="1" aria-controls="sample-table-2">                                      
+                                            <?php foreach ($itemsoptions as $option) { ?>
+                                            <option <?php if($option == $perpage) echo "selected"; ?> value="<?=$option?>"><?=$option?></option>
+                                            <?php } ?>
+                                        </select> báº£n ghi</label>
+
+                                </div>
+                            </div>
+
+                            <div class="col-sm-6">
+                                <div class="dataTables_filter" id="sample-table-2_filter">
+                                    <label>TÃ¬m kiáº¿m: 
+                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>
+                                </div>
+                            </div>
+                        </div>
+                        <input type="hidden" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" />
+                        <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
+                    </form>
+                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
+                        <thead>
+                            <tr role="row">
+                                <th class="center sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 44px;" aria-label="">
+                                    <label>
+                                        <input type="checkbox" class="ace">
+                                        <span class="lbl"></span>
+                                    </label>
+                                </th>
+                             
+                                <th class="<?php if ($sorting_field == 'sms_content') {echo $sorting_order;} else {echo "sorting";}?>" id="sms_content" 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 == 'sms_reply') {echo $sorting_order;} else {echo "sorting";}?>" id="sms_reply" 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 == 'service_id') {echo $sorting_order;} else {echo "sorting";}?>" id="service_id" 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 == 'commandcode') {echo $sorting_order;} else {echo "sorting";}?>" id="commandcode" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="NgÃ y ÄÄng kÃœ: activate to sort column ascending">NgÃ y</th>
+                                  
+                        </thead>
+
+
+                        <tbody role="alert" aria-live="polite" aria-relevant="all">
+                            
+                            <?php
+                            foreach ($paidlogs as $paidlog) {
+                                ?>
+                            <tr class="odd">
+                                <td class="center  sorting_1">
+                                    <label>
+                                        <input type="checkbox" class="ace">
+                                        <span class="lbl"></span>
+                                    </label>
+                                </td>
+
+                                
+                                <td class=" "><?php echo $paidlog['cellphone']?></td>
+                                <td class=" ">
+                                    <a href="#">Ho va ten</a>
+                                </td>
+                                <td class="hidden-480 "><?php echo $paidlog['amount']?></td>
+                                <td class=" "><?php echo $paidlog['paid_time']?></td>
+
+                               
+
+                                
+                            </tr>
+                            <?php } ?>
+
+
+
+
+
+
+
+                        </tbody></table><div class="row"><div class="col-sm-6">
+                                <div class="dataTables_info" id="sample-table-2_info">Hiá»n thá» <?php echo ($start+1)?> Äáº¿n <?php echo ($start+$perpage)?> cá»§a <?php echo $total?> báº£n ghi</div>
+                                    
+                            </div>
+                        <div class="col-sm-6">
+                            <div class="dataTables_paginate paging_bootstrap">
+                                <ul class="pagination">
+                                    <?php echo $paging; ?>
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+
+            
+        </div>
+
+
+<script type="text/javascript">
+    window.onload = function ()
+    {
+        init_page();
+    }
+
+
+</script>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/statistics.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/statistics.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/statistics.php	(revision 422)
@@ -0,0 +1,113 @@
+<div class="col-xs-12">
+								<!-- PAGE CONTENT BEGINS -->
+								<div class="col-xs-6 no-padding">
+									<div class="widget-box no-border">
+										<div class="widget-header widget-header-flat">
+											<h4 class="lighter">
+												<i class="icon-signal"></i>
+												Doanh thu
+											</h4>
+
+											<div class="widget-toolbar">
+												<a data-action="collapse" href="#">
+													<i class="icon-chevron-up"></i>
+												</a>
+											</div>
+										</div>
+										<div class="widget-body">
+												<div class="table-responsive">
+													<table class="table table-striped table-bordered table-hover" id="sample-table-1">
+														<thead style="background-color: blue">
+															<tr>
+																<th>Thá»i gian</th>
+																<th>Doanh thu</th>
+															</tr>
+														</thead>
+
+														<tbody>
+															<tr>
+																<td>Tuáº§n trÆ°á»c</td>
+																<td>
+																	$1
+																</td>
+															</tr>
+															<tr>
+																<td>ThÃ¡ng trÆ°á»c</td>
+																<td>
+																	$1111111111
+																</td>
+															</tr>
+															<tr>
+																<td>QuÃœ trÆ°á»c</td>
+																<td>
+																	$1111111111
+																</td>
+															</tr>
+															<tr>
+																<td>NÄm trÆ°á»c</td>
+																<td>
+																	$1111111111
+																</td>
+															</tr>
+														</tbody>
+													</table>
+												</div><!-- /.table-responsive -->
+										</div>
+									</div>
+								</div>
+								
+								<div class="col-xs-6">
+									<div class="widget-box no-border">
+										<div class="widget-header widget-header-flat">
+											<h4 class="lighter">
+												<i class="icon-signal"></i>
+												Biá»u Äá» doanh thu
+											</h4>
+
+											<div class="widget-toolbar">
+												<a data-action="collapse" href="#">
+													<i class="icon-chevron-up"></i>
+												</a>
+											</div>
+										</div>
+
+										<div class="widget-body">
+											<div class="widget-main padding-4">
+												<div id="sales-charts" style="width: 100%; height: 200px; padding: 0px; position: relative;"><canvas class="flot-base" style="direction: ltr; position: absolute; left: 0px; top: 0px; width: 534px; height: 200px;" width="534" height="200"></canvas><div class="flot-text" style="position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; font-size: smaller; color: rgb(84, 84, 84);"><div class="flot-x-axis flot-x1-axis xAxis x1Axis" style="position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; display: block;"><div style="position: absolute; max-width: 76px; top: 184px; left: 29px; text-align: center;" class="flot-tick-label tickLabel">0.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 110px; text-align: center;" class="flot-tick-label tickLabel">1.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 192px; text-align: center;" class="flot-tick-label tickLabel">2.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 274px; text-align: center;" class="flot-tick-label tickLabel">3.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 355px; text-align: center;" class="flot-tick-label tickLabel">4.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 437px; text-align: center;" class="flot-tick-label tickLabel">5.0</div><div style="position: absolute; max-width: 76px; top: 184px; left: 519px; text-align: center;" class="flot-tick-label tickLabel">6.0</div></div><div class="flot-y-axis flot-y1-axis yAxis y1Axis" style="position: absolute; top: 0px; left: 0px; bottom: 0px; right: 0px; display: block;"><div style="position: absolute; top: 172px; left: 1px; text-align: right;" class="flot-tick-label tickLabel">-2.000</div><div style="position: absolute; top: 150px; left: 1px; text-align: right;" class="flot-tick-label tickLabel">-1.500</div><div style="position: absolute; top: 129px; left: 1px; text-align: right;" class="flot-tick-label tickLabel">-1.000</div><div style="position: absolute; top: 107px; left: 1px; text-align: right;" class="flot-tick-label tickLabel">-0.500</div><div style="position: absolute; top: 86px; left: 4px; text-align: right;" class="flot-tick-label tickLabel">0.000</div><div style="position: absolute; top: 65px; left: 4px; text-align: right;" class="flot-tick-label tickLabel">0.500</div><div style="position: absolute; top: 43px; left: 4px; text-align: right;" class="flot-tick-label tickLabel">1.000</div><div style="position: absolute; top: 22px; left: 4px; text-align: right;" class="flot-tick-label tickLabel">1.500</div><div style="position: absolute; top: 1px; left: 4px; text-align: right;" class="flot-tick-label tickLabel">2.000</div></div></div><canvas class="flot-overlay" style="direction: ltr; position: absolute; left: 0px; top: 0px; width: 534px; height: 200px;" width="534" height="200"></canvas><div class="legend"><div style="position: absolute; width: 86px; height: 66px; top: 13px; right: 13px; background-color: rgb(255, 255, 255); opacity: 0.85;"> </div><table style="position:absolute;top:13px;right:13px;;font-size:smaller;color:#545454"><tbody><tr><td class="legendColorBox"><div style="border:1px solid #ccc;padding:1px"><div style="width:4px;height:0;border:5px solid #1abc9c;overflow:hidden"></div></div></td><td class="legendLabel">SMS</td></tr><tr><td class="legendColorBox"><div style="border:1px solid #ccc;padding:1px"><div style="width:4px;height:0;border:5px solid #e67e22;overflow:hidden"></div></div></td><td class="legendLabel">Tháº» cÃ o</td></tr><tr><td class="legendColorBox"><div style="border:1px solid #ccc;padding:1px"><div style="width:4px;height:0;border:5px solid #3498db;overflow:hidden"></div></div></td><td class="legendLabel">Cá»ng tÃ¡c viÃªn</td></tr></tbody></table></div></div>
+											</div><!-- /widget-main -->
+										</div><!-- /widget-body -->
+									</div><!-- /widget-box -->
+								</div>
+
+								<div class="clearfix"></div>
+
+								<div style="padding-bottom:4px" class="table-header">
+									Thá»ng kÃª
+								</div>
+
+								<div class="table-responsive">
+									<div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper"><div class="row"><div class="col-sm-6"><div id="sample-table-2_length" class="dataTables_length"><label>Hiá»n thá» <select name="sample-table-2_length" size="1" aria-controls="sample-table-2"><option value="10" selected="selected">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> báº£n ghi</label></div></div><div class="col-sm-6"><div class="dataTables_filter" id="sample-table-2_filter"><label>TÃ¬m kiáº¿m: <input type="text" aria-controls="sample-table-2"></label></div></div></div><table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
+										<thead>
+											<tr role="row"><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 249px;" aria-label="Sá» Äiá»n thoáº¡i">Sá» Äiá»n thoáº¡i</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 289px;" aria-label="Há» tÃªn: activate to sort column ascending">Há» tÃªn</th><th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 196px;" aria-label="Tiá»n: activate to sort column ascending">Tiá»n</th><th class="sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 329px;" aria-label="
+													
+													NgÃ y ÄÄng kÃœ
+												: activate to sort column ascending">
+													<i class="icon-time bigger-110 hidden-480"></i>
+													NgÃ y ÄÄng kÃœ
+												</th></tr>
+										</thead>
+
+										
+									<tbody role="alert" aria-live="polite" aria-relevant="all"><tr class="odd">
+												<td class="  sorting_1">
+													<a href="#">0918273645</a>
+												</td>
+												<td class=" ">Nguyá»
+n VÄn VÄn</td>
+												<td class="hidden-480 ">3,330 VND</td>
+												<td class=" ">12/10/2104</td>
+											</tr></tbody></table><div class="row"><div class="col-sm-6"><div class="dataTables_info" id="sample-table-2_info">Hiá»n thá» 1 Äáº¿n 1 cá»§a 1 báº£n ghi</div></div><div class="col-sm-6"><div class="dataTables_paginate paging_bootstrap"><ul class="pagination"><li class="prev disabled"><a href="#"><i class="icon-double-angle-left"></i></a></li><li class="active"><a href="#">1</a></li><li class="next disabled"><a href="#"><i class="icon-double-angle-right"></i></a></li></ul></div></div></div></div>
+								</div>
+
+								<!-- PAGE CONTENT ENDS -->
+							</div>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/report/viewSms.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/report/viewSms.php	(revision 422)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/report/viewSms.php	(revision 422)
@@ -0,0 +1,79 @@
+ 
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="modal-header no-padding">
+                <div class="table-header">
+                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
+                        <span class="white">Ã</span>
+                    </button>
+                    Máº«u tin nháº¯n
+                </div>
+            </div>
+
+            <div class="modal-body">
+                <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form">
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Máº«u tin nháº¯n </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_content" type="text" id="form-field-1" placeholder="Máº«u tin nháº¯n" value="<?php echo $sms_content;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Tin tráº£ lá»i </label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input disabled name="sms_reply" type="text" id="form-field-1" placeholder="Tin tráº£ lá»i"  value="<?php echo $sms_reply;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ dá»ch vá»¥</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="service_id" type="text" id="form-field-1" placeholder="MÃ£ dá»ch vá»¥"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    <div class="form-group">
+                        <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> MÃ£ lá»nh</label>
+
+                        <div class="col-sm-9">
+                            <span class="input-icon">
+                                <input  disabled name="commandcode" type="text" id="form-field-1" placeholder="MÃ£ lá»nh"  value="<?php echo $service_id;?>">
+                                <i class="icon-user blue"></i>
+                            </span>
+                        </div>
+                        <div class="help-block"> </div>
+                    </div>
+                    
+                   
+                    <div class="space-4"></div>
+
+                    
+
+                    <div class="space-4"></div>
+                    <div class="form-group errors" id="add_user"></div>
+                        
+                    </div>
+                    <div class="clearfix form-actions">
+                        <div class="col-md-offset-3 col-md-9">
+                            <a href="#" class="btn btn-primary" data-dismiss="modal">ÄÃ³ng cá»­a sá»</a>
+
+                            
+                        </div>
+                    </div>
+
+                </form></div>
+
+        </div>
Index: pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php
===================================================================
--- pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php	(revision 420)
+++ pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php	(revision 422)
@@ -79,5 +79,5 @@
 						</li>
 
-						<li>
+						<li class="<?php if(in_array($class,array("report"))) {echo "active open";}?>">
 							<a href="#" class="dropdown-toggle">
 								<i class="icon-bar-chart"></i>
@@ -88,6 +88,6 @@
 
 							<ul class="submenu">
-								<li>
-									<a href="report_all.html">
+								<li class="<?php if(in_array($class,array("report"))) {echo "active";}?>">
+									<a href="<?php echo $base_url;?>admin/doanh_thu_tong_hop">
 										<i class="icon-double-angle-right"></i>
 										Doanh thu tá»ng há»£p
