Index: pro-violet-viettel/sourcecode/application/config/routes.php
===================================================================
--- pro-violet-viettel/sourcecode/application/config/routes.php	(revision 425)
+++ pro-violet-viettel/sourcecode/application/config/routes.php	(revision 426)
@@ -99,4 +99,13 @@
 $route['admin/nguoi_dung/id/:any'] = 'admin/user/get_user_by_id/$1';
 
+$route['admin/sms_log'] = 'admin/smslog';
+$route['admin/sms_log/trang'] = 'admin/smslog/get_smslogs/1';
+$route['admin/sms_log/trang/:any'] = 'admin/smslog/get_smslogs/$1';
+
+$route['admin/card_log'] = 'admin/cardlog';
+$route['admin/card_log/trang'] = 'admin/cardlog/get_cardlogs/1';
+$route['admin/card_log/trang/:any'] = 'admin/cardlog/get_cardlogs/$1';
+
+
 /* End of file routes.php */
 /* Location: ./application/config/routes.php */
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/cardlog.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/cardlog.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/cardlog.php	(revision 426)
@@ -0,0 +1,90 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+class Cardlog extends MX_Controller
+{
+	const TOKENPW = 'violet';
+	
+	public function __construct() 
+	{
+		parent::__construct();
+		$this->load->helper('cookie');
+	}
+	
+	public function index ()
+	{
+            
+		$admin_info = $this->session->userdata('adminInfo');
+		if ($admin_info)
+		{
+			$data['content'] = $this->get_cardlogs();
+			$this->load->view('cardlog/index', $data);
+		}else
+		{
+			$this->load->view ( 'login');
+		}
+	}
+	
+	public function get_cardlogs()
+	{
+		$this->load->helper('pagging');
+		$this->load->model('cardlog_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'] = "created_time";
+		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['keyword'] = $this->input->post('keyword');
+        }
+		$data['start'] = ($data['current_page'] - 1) * $data['perpage'];
+		$data['total'] = $this->cardlog_model->get_total_cardlogs($data);
+		$cls = $this->cardlog_model->get_cardlogs($data);
+		$cardlogs = array();
+		foreach($cls as $cl):
+			$id = $cl['us_id'];
+			$username = $this->get_username($id);
+			$cl['username'] = $username;
+			array_push($cardlogs, $cl);
+		endforeach;
+		$data['cardlogs'] = $cardlogs;
+		$data['paging_url'] = base_url() . "admin/card_log/trang/";
+		$data['num_links'] = 2;
+		$data['paging'] = pagging($data);
+		if ($this->input->is_ajax_request())
+		{
+			return $this->load->view('cardlog/listview', $data);
+		}
+		return $this->load->view('cardlog/listview', $data, true);
+	}
+	
+	private function get_username($us_id)
+	{
+		$src = 'violet';
+		$token = md5($us_id.self::TOKENPW);
+		$this->load->model('user_model');
+		$data = $this->user_model->get_user_info($src, $us_id, $token);
+		if (strlen($data) > 0){
+			$arr_users = explode("&", $data);
+			$str_username = $arr_users[1];
+			$arr_username = explode("=", $str_username);
+			return $arr_username[1];
+		}else
+		{
+			return "";
+		}
+
+	}
+	
+}
Index: pro-violet-viettel/sourcecode/application/modules/admin/controllers/smslog.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/controllers/smslog.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/controllers/smslog.php	(revision 426)
@@ -0,0 +1,90 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+
+class Smslog extends MX_Controller
+{
+	
+	const TOKENPW = 'violet';
+	
+	public function __construct() 
+	{
+		parent::__construct();
+		$this->load->helper('cookie');
+	}
+	
+	public function index ()
+	{
+            
+		$admin_info = $this->session->userdata('adminInfo');
+		if ($admin_info)
+		{
+			$data['content'] = $this->get_smslogs();
+			$this->load->view('smslog/index', $data);
+		}else
+		{
+			$this->load->view ( 'login');
+		}
+	}
+	
+	public function get_smslogs()
+	{
+		$this->load->helper('pagging');
+		$this->load->model('smslog_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'] = "created_time";
+		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['keyword'] = $this->input->post('keyword');
+        }
+		$data['start'] = ($data['current_page'] - 1) * $data['perpage'];
+		$data['total'] = $this->smslog_model->get_total_smslogs($data);
+		$smsls = $this->smslog_model->get_smslogs($data);
+		$smslogs = array();
+		foreach($smsls as $smsl):
+			$id = $smsl['us_id'];
+			$username = $this->get_username($id);
+			$smsl['username'] = $username;
+			array_push($smslogs, $smsl);
+		endforeach;
+		$data['smslogs'] = $smslogs;
+		$data['paging_url'] = base_url() . "admin/sms_log/trang/";
+		$data['num_links'] = 2;
+		$data['paging'] = pagging($data);
+		if ($this->input->is_ajax_request())
+		{
+			return $this->load->view('smslog/listview', $data);
+		}
+		return $this->load->view('smslog/listview', $data, true);
+	}
+	
+	private function get_username($us_id)
+	{
+		$src = 'violet';
+		$token = md5($us_id.self::TOKENPW);
+		$this->load->model('user_model');
+		$data = $this->user_model->get_user_info($src, $us_id, $token);
+		if (strlen($data) > 0){
+			$arr_users = explode("&", $data);
+			$str_username = $arr_users[1];
+			$arr_username = explode("=", $str_username);
+			return $arr_username[1];
+		}else
+		{
+			return "";
+		}
+
+	}
+}
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/cardlog_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/cardlog_model.php	(revision 425)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/cardlog_model.php	(revision 426)
@@ -1,3 +1,3 @@
-﻿<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 class Cardlog_model extends MY_Model
@@ -12,3 +12,30 @@
 	}
 
+	function get_cardlogs($data)
+	{
+		$sql = "SELECT * FROM " . $this->table_name;
+		if ($data['keyword'])
+		{
+			$sql.=" WHERE (sender LIKE '%".$data['keyword']."%'";
+		}
+		$order = "";
+		if ($data['sorting_order'] != "sorting") {
+			$sort = "DESC";
+			if ($data['sorting_order'] == "sorting_asc")
+				$sort = "ASC";
+			$order = "ORDER BY " . $data['sorting_field'] . " " . $sort;
+		}
+		return $this->db->query($sql." ".$order." LIMIT ".$data['start'].", ".$data['perpage']." ")->result_array();
+	}
+	
+	function get_total_cardlogs($data)
+	{
+		$sql="SELECT COUNT(".$this->id_name.") AS total FROM ".$this->table_name;
+		if (isset($data['keyword']))
+		{
+			if (strlen($data['keyword'])>0)
+				$sql.=" WHERE (sender LIKE '%".$data['keyword']."%'";
+		}
+		return $this->db->query($sql)->row_array()['total'];
+	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/models/smslog_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/models/smslog_model.php	(revision 425)
+++ pro-violet-viettel/sourcecode/application/modules/admin/models/smslog_model.php	(revision 426)
@@ -1,3 +1,3 @@
-﻿<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 class Smslog_model extends MY_Model
@@ -12,3 +12,30 @@
 	}
 	
+	function get_smslogs($data)
+	{
+		$sql = "SELECT * FROM " . $this->table_name;
+		if ($data['keyword'])
+		{
+			$sql.=" WHERE (sender LIKE '%".$data['keyword']."%' OR mobody LIKE '%".$data['keyword']."%' OR mtbody LIKE '%".$data['keyword']."%') ";
+		}
+		$order = "";
+		if ($data['sorting_order'] != "sorting") {
+			$sort = "DESC";
+			if ($data['sorting_order'] == "sorting_asc")
+				$sort = "ASC";
+			$order = "ORDER BY " . $data['sorting_field'] . " " . $sort;
+		}
+		return $this->db->query($sql." ".$order." LIMIT ".$data['start'].", ".$data['perpage']." ")->result_array();
+	}
+	
+	function get_total_smslogs($data)
+	{
+		$sql="SELECT COUNT(".$this->id_name.") AS total FROM ".$this->table_name;
+		if (isset($data['keyword']))
+		{
+			if (strlen($data['keyword'])>0)
+				$sql.=" WHERE (sender LIKE '%".$data['keyword']."%' OR mobody LIKE '%".$data['keyword']."%' OR mtbody LIKE '%".$data['keyword']."%') ";
+		}
+		return $this->db->query($sql)->row_array()['total'];
+	}
 }
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/index.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/index.php	(revision 426)
@@ -0,0 +1,95 @@
+<?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: $("#cardlog").serialize(),
+                success: function (data, textStatus, jqXHR)
+                {
+                    $("#content").html(data);
+                    init_page();
+                },
+                error: function (jqXHR, textStatus, errorThrown)
+                {
+                    $(".ajaxloading").hide();
+                }
+            });
+            return false;
+        });
+		$('#keyword').bind('input', function(){
+			filter();
+		});
+		
+		$( '.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();
+        });
+	}
+	
+	function filter()
+	{
+		$.ajax({
+			url: 'http://viettel.violet.vn/admin/card_log/trang/1',
+			type: "POST",
+			data: $("#cardlog").serialize(),
+			success: function (data, textStatus, jqXHR)
+			{
+				console.log(data);
+				$("#content").html(data);
+				init_page();
+				$("#keyword").focus();
+				$("#keyword").setCursorToTextEnd();
+			},
+			error: function (jqXHR, textStatus, errorThrown)
+			{
+				console.log("ERROR");
+				$(".ajaxloading").hide();
+			}
+        });
+	}
+		
+</script>
+
+<div class="main-content" id="content">
+    <?php echo $content; ?>
+</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 -->
+
+<?php
+$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs'=>array('assets/js/admin/smslog.js')));
+?>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/listview.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/listview.php	(revision 426)
@@ -0,0 +1,171 @@
+<div class="breadcrumbs" id="breadcrumbs">
+	<ul class="breadcrumb">
+		<li>
+			<i class="icon-home home-icon"></i>
+			<a href="#">Trang chá»§</a>
+		</li>
+		<li><a href="#">BÃ¡o cÃ¡o</a></li>
+		<li class="active">Card logs</li>
+	</ul><!-- .breadcrumb -->
+
+	<div class="nav-search" id="nav-search">
+		<form class="form-search">
+			<span class="input-icon">
+				<input type="text" placeholder="TÃ¬m kiáº¿m ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
+				<i class="icon-search nav-search-icon"></i>
+			</span>
+		</form>
+	</div><!-- #nav-search -->
+</div>
+
+<div class="page-content">
+
+	<div class="row">
+		<div class="col-xs-12">
+            <!-- PAGE CONTENT BEGINS -->
+            <div style="padding-bottom:4px" class="table-header">
+                Danh sÃ¡ch log
+            </div>
+			<!-- PAGE CONTENT BEGINS -->
+			<div class="table-responsive">
+                <div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper">
+                    <form onsubmit="return false;" id="cardlog" >
+                        <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>
+							<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 == 'sender') {echo $sorting_order;} else {echo "sorting";} ?>" id="sender" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="NgÆ°á»i gá»­i: activate to sort column ascending">NgÆ°á»i gá»­i</th>
+							<th class="<?php if ($sorting_field == 'us_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="us_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="TÃ i khoáº£n: activate to sort column ascending">TÃ i khoáº£n</th>
+							<th class="<?php if ($sorting_field == 'pin_code') {echo $sorting_order;} else {echo "sorting";} ?>" id="pin_code" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="MÃ£ pin: activate to sort column ascending">MÃ£ pin</th>
+							<th class="<?php if ($sorting_field == 'serial_number') {echo $sorting_order;} else {echo "sorting";} ?>" id="serial_number" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» seri: activate to sort column ascending">Sá» seri</th>
+							<th class="<?php if ($sorting_field == 'card_value') {echo $sorting_order;} else {echo "sorting";} ?>" id="card_value" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="GiÃ¡ trá» tháº» náº¡p: activate to sort column ascending">GiÃ¡ trá» tháº» náº¡p</th>
+							<th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";} ?>" id="created_time" class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Thá»i gian: activate to sort column ascending">
+								<i class="icon-time bigger-110 hidden-480"></i>
+								Thá»i gian náº¡p
+							</th>
+
+							<th></th>
+						</tr>
+					</thead>
+
+					<tbody role="alert" aria-live="polite" aria-relevant="all">
+						<?php foreach ($cardlogs as $cardlog): ?>
+						<tr>
+							<td class="center">
+								<label>
+									<input type="checkbox" class="ace" />
+									<span class="lbl"></span>
+								</label>
+							</td>
+
+							<td>
+								<a href="#"><?php echo $cardlog['sender']; ?></a>
+							</td>
+							<td><?php echo $cardlog['username']; ?></td>
+							<td><?php echo $cardlog['pin_code']; ?></td>
+							<td><?php echo $cardlog['serial_number']; ?></td>
+							<td><?php echo $cardlog['card_value']; ?></td>
+							<td><?php echo $cardlog['created_time']; ?></td>
+
+							<td>
+								<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
+									<button class="btn btn-xs btn-success">
+										<i class="icon-ok bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-info">
+										<i class="icon-edit bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-danger">
+										<i class="icon-trash bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-warning">
+										<i class="icon-flag bigger-120"></i>
+									</button>
+								</div>
+
+								<div class="visible-xs visible-sm hidden-md hidden-lg">
+									<div class="inline position-relative">
+										<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
+											<i class="icon-cog icon-only bigger-110"></i>
+										</button>
+
+										<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
+											<li>
+												<a href="#" class="tooltip-info" data-rel="tooltip" title="View">
+													<span class="blue">
+														<i class="icon-zoom-in bigger-120"></i>
+													</span>
+												</a>
+											</li>
+
+											<li>
+												<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
+													<span class="green">
+														<i class="icon-edit bigger-120"></i>
+													</span>
+												</a>
+											</li>
+
+											<li>
+												<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
+													<span class="red">
+														<i class="icon-trash bigger-120"></i>
+													</span>
+												</a>
+											</li>
+										</ul>
+									</div>
+								</div>
+							</td>
+						</tr>
+						<?php endforeach; ?>
+					</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><!-- /.table-responsive -->
+
+			<!-- PAGE CONTENT ENDS -->
+		</div><!-- /.col -->
+	</div><!-- /.row -->
+</div><!-- /.page-content -->
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/index.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/index.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/index.php	(revision 426)
@@ -0,0 +1,96 @@
+<?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: $("#smslog").serialize(),
+                success: function (data, textStatus, jqXHR)
+                {
+                    $("#content").html(data);
+                    init_page();
+                },
+                error: function (jqXHR, textStatus, errorThrown)
+                {
+                    $(".ajaxloading").hide();
+                }
+            });
+            return false;
+        });
+		$('#keyword').bind('input', function(){
+			filter();
+		});
+		
+		$( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
+			console.log("sort clicked");
+            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();
+        });
+	}
+	
+	function filter()
+	{
+		$.ajax({
+			url: 'http://viettel.violet.vn/admin/sms_log/trang/1',
+			type: "POST",
+			data: $("#smslog").serialize(),
+			success: function (data, textStatus, jqXHR)
+			{
+				console.log(data);
+				$("#content").html(data);
+				init_page();
+				$("#keyword").focus();
+				$("#keyword").setCursorToTextEnd();
+			},
+			error: function (jqXHR, textStatus, errorThrown)
+			{
+				console.log("ERROR");
+				$(".ajaxloading").hide();
+			}
+        });
+	}
+		
+</script>
+
+<div class="main-content" id="content">
+    <?php echo $content; ?>
+</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 -->
+
+<?php
+$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs'=>array('assets/js/admin/smslog.js')));
+?>
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/listview.php	(revision 426)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/smslog/listview.php	(revision 426)
@@ -0,0 +1,169 @@
+<div class="breadcrumbs" id="breadcrumbs">
+	<ul class="breadcrumb">
+		<li>
+			<i class="icon-home home-icon"></i>
+			<a href="#">Trang chá»§</a>
+		</li>
+		<li><a href="#">BÃ¡o cÃ¡o</a></li>
+		<li class="active">SMS logs</li>
+	</ul><!-- .breadcrumb -->
+
+	<div class="nav-search" id="nav-search">
+		<form class="form-search">
+			<span class="input-icon">
+				<input type="text" placeholder="TÃ¬m kiáº¿m ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
+				<i class="icon-search nav-search-icon"></i>
+			</span>
+		</form>
+	</div><!-- #nav-search -->
+</div>
+
+<div class="page-content">
+
+	<div class="row">
+		<div class="col-xs-12">
+            <!-- PAGE CONTENT BEGINS -->
+            <div style="padding-bottom:4px" class="table-header">
+                Danh sÃ¡ch log
+            </div>
+			<!-- PAGE CONTENT BEGINS -->
+			<div class="table-responsive">
+                <div role="grid" class="dataTables_wrapper" id="sample-table-2_wrapper">
+                    <form onsubmit="return false;" id="smslog" >
+                        <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>
+							<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 == 'sender') {echo $sorting_order;} else {echo "sorting";} ?>" id="sender" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="NgÆ°á»i gá»­i: activate to sort column ascending">NgÆ°á»i gá»­i</th>
+							<th class="<?php if ($sorting_field == 'us_id') {echo $sorting_order;} else {echo "sorting";} ?>" id="us_id" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="TÃ i khoáº£n: activate to sort column ascending">TÃ i khoáº£n</th>
+							<th class="<?php if ($sorting_field == 'mobody') {echo $sorting_order;} else {echo "sorting";} ?>" id="mobody" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="MO: activate to sort column ascending">MO</th>
+							<th class="<?php if ($sorting_field == 'mtbody') {echo $sorting_order;} else {echo "sorting";} ?>" id="mtbody" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="MT: activate to sort column ascending">MT</th>
+							<th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";} ?>" id="created_time" class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Thá»i gian: activate to sort column ascending">
+								<i class="icon-time bigger-110 hidden-480"></i>
+								Thá»i gian gá»­i
+							</th>
+
+							<th></th>
+						</tr>
+					</thead>
+
+					<tbody role="alert" aria-live="polite" aria-relevant="all">
+						<?php foreach ($smslogs as $smslog): ?>
+						<tr>
+							<td class="center">
+								<label>
+									<input type="checkbox" class="ace" />
+									<span class="lbl"></span>
+								</label>
+							</td>
+
+							<td>
+								<a href="#"><?php echo $smslog['sender']; ?></a>
+							</td>
+							<td><?php echo $smslog['username']; ?></td>
+							<td><?php echo $smslog['mobody']; ?></td>
+							<td><?php echo $smslog['mtbody']; ?></td>
+							<td><?php echo $smslog['created_time']; ?></td>
+
+							<td>
+								<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
+									<button class="btn btn-xs btn-success">
+										<i class="icon-ok bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-info">
+										<i class="icon-edit bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-danger">
+										<i class="icon-trash bigger-120"></i>
+									</button>
+
+									<button class="btn btn-xs btn-warning">
+										<i class="icon-flag bigger-120"></i>
+									</button>
+								</div>
+
+								<div class="visible-xs visible-sm hidden-md hidden-lg">
+									<div class="inline position-relative">
+										<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
+											<i class="icon-cog icon-only bigger-110"></i>
+										</button>
+
+										<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
+											<li>
+												<a href="#" class="tooltip-info" data-rel="tooltip" title="View">
+													<span class="blue">
+														<i class="icon-zoom-in bigger-120"></i>
+													</span>
+												</a>
+											</li>
+
+											<li>
+												<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
+													<span class="green">
+														<i class="icon-edit bigger-120"></i>
+													</span>
+												</a>
+											</li>
+
+											<li>
+												<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
+													<span class="red">
+														<i class="icon-trash bigger-120"></i>
+													</span>
+												</a>
+											</li>
+										</ul>
+									</div>
+								</div>
+							</td>
+						</tr>
+						<?php endforeach; ?>
+					</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><!-- /.table-responsive -->
+
+			<!-- PAGE CONTENT ENDS -->
+		</div><!-- /.col -->
+	</div><!-- /.row -->
+</div><!-- /.page-content -->
Index: pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 425)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php	(revision 426)
@@ -138,16 +138,17 @@
                             <?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>
+                        </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 class="col-sm-6">
+								<div class="dataTables_paginate paging_bootstrap">
+									<ul class="pagination">
+										<?php echo $paging; ?>
+									</ul>
+								</div>
+							</div>
+						</div>
 
                 </div>
Index: pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php
===================================================================
--- pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php	(revision 425)
+++ pro-violet-viettel/sourcecode/application/views/layout/admin/sidebar.php	(revision 426)
@@ -117,5 +117,5 @@
 
 								<li>
-									<a href="logs_sms.html">
+									<a href="<?php echo $base_url; ?>admin/sms_log">
 										<i class="icon-double-angle-right"></i>
 										SMS logs
Index: pro-violet-viettel/sourcecode/assets/js/admin/smslog.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/smslog.js	(revision 426)
+++ pro-violet-viettel/sourcecode/assets/js/admin/smslog.js	(revision 426)
@@ -0,0 +1,7 @@
+(function($){
+    $.fn.setCursorToTextEnd = function() {
+        $initialVal = this.val();
+        this.val($initialVal + ' ');
+        this.val($initialVal);
+    };
+})(jQuery);
