Index: pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/indexCollaborator.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/indexCollaborator.php	(revision 490)
+++ pro-violet-viettel/sourcecode/application/modules/admin/views/reportAsistant/indexCollaborator.php	(revision 490)
@@ -0,0 +1,207 @@
+<?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);
+              }
+            );
+
+
+
+				$('#sales-charts').css({'width':'100%' , 'height':'200px'});
+				$.plot("#sales-charts", <?php echo json_encode($chard) ?>, {
+					hoverable: true,
+					shadowSize: 0,
+					series: {
+						lines: { show: true },
+						points: { show: true }
+					},
+					xaxis: {
+						tickLength: 0
+					},
+					yaxis: {
+						ticks: 10,
+						min: 0,
+						max:<?php echo $max;?>,
+						tickDecimals: 0
+					},
+					grid: {
+						backgroundColor: { colors: [ "#fff", "#fff" ] },
+						borderWidth: 1,
+						borderColor:'#555'
+					}
+				});
+    }
+
+
+    function filter()
+    {
+        $.ajax({
+            url: '<?php echo base_url();?>admin/thong_ke_cong_tac_vien/trang_ctv/<?php echo $id;?>/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" >
+    <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="#">Thá»ng kÃª cá»ng tÃ¡c viÃª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>
+            BÃ¡o cÃ¡o
+            <small>
+                <i class="icon-double-angle-right"></i>
+                Thá»ng kÃª cá»ng tÃ¡c viÃªn
+            </small>
+        </h1>
+    </div><!-- /.page-header -->
+    
+     <div class="row">  
+    <?php echo $statistics; ?>   
+     </div>
+     <div class="row" id="content">    
+    <?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><!-- /.modal-dialog -->
+<?php
+$this->load->view('layout/admin/footer', array('base_url' => $base_url,'adminjs' => array('assets/js/admin/collaborator.js')));
+?>
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 489)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 490)
@@ -21,7 +21,6 @@
 		$aryParams = array();
 		parse_str($user_info['user'], $aryParams);		
-		$licenseAvailable = $this->User_model->checkLicense($aryParams['id']);
-		$licenseAvailable = $licenseAvailable == TRUE ? 'OK': '!OK';
-		
+		$licenseAvailable = $this->User_model->checkLicense($aryParams['id']);	
+                $licenseAvailable = $licenseAvailable == TRUE ? 'OK': '!OK';  
 		if ($user_info){
 			$username = $user_info['username'];
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 489)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/user.php	(revision 490)
@@ -17,4 +17,5 @@
 		if ($user_info)
 		{
+                        $this->load->model('servicepackage_model');
 			$user = $user_info['user'];
 			$us_id = $user_info['us_id'];
@@ -22,5 +23,6 @@
 			$token = md5($us_id.self::TOKENPW);
 			$data = $this->get_data($src, $token, $us_id);
-			$this->load->view('frontend/user_profile', $data);
+                        $data['packages'] =$this->servicepackage_model->getAllPackages();
+                        $this->load->view('frontend/user_profile', $data);
 			
 		}else
@@ -29,5 +31,26 @@
 		}
 	}
-	
+	public function packageRegister()
+        {
+                $result=array();
+                $input=$this->input->post();
+                $user_info = $this->session->userdata('userInfo');
+		if ($user_info)
+		{       
+                        $this->load->model('servicepackage_model');
+                        $this->load->model('user_model');
+                        $package=$this->servicepackage_model->getPackage($input['p_id']);
+			$user = $user_info['user'];
+			$us_id = $user_info['us_id'];
+                        $user = $this->user_model->get_user_by_id($us_id);
+			$result['user']=$user;
+                        $result['package']=$package;
+                        $result['modal']=$this->load->view('frontend/package_register_modal', $result,true);
+		}else
+		{
+			
+		}
+                echo json_encode($result);
+        }
 	private function get_data($src, $token, $us_id)
 	{
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php	(revision 490)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php	(revision 490)
@@ -0,0 +1,27 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+
+class Servicepackage_model extends MY_Model
+{
+	
+	protected $table_name = 'tblservicepackage';
+	protected $id_name = 'p_id';
+	const TOKENPW = 'violet';
+	
+	function __construct(){
+        parent::__construct();
+		$this->vservices->setApiUrl($this->config->item('api_url'));
+		$this->vservices->setConnection($this->curl);
+    } 
+	
+    function getAllPackages()
+    {
+        $sql="SELECT * FROM ".$this->table_name."";
+        return $this->db->query($sql)->result_array();
+    }
+    function getPackage($p_id)
+    {
+        $sql="SELECT * FROM ".$this->table_name." WHERE ".$this->id_name."=".$p_id;
+        return $this->db->query($sql)->row_array();
+    }
+	
+}
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 489)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 490)
@@ -36,7 +36,12 @@
 			</a>
 		</div><!-- /.main-container -->
-		
+                
+<script type="text/javascript">
+                    var licenseAvailable = "<?php echo $licenseAvailable;?>";
+                    var url= "<?php echo base_url();?>";
+</script>		
 <?php
 $this->load->view('servicemodals');
 $this->load->view('layout/frontend/footer', array('usjs'=> array('assets/js/frontend/lecture.js')));
 ?>
+               
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 490)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/package_register_modal.php	(revision 490)
@@ -0,0 +1,40 @@
+<div class="modal fade" id="package_register_modal" tabindex="-1" role="dialog"aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <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">ÄÄng kÃœ gÃ³i dá»ch vá»¥</h4>
+            </div>
+            <div class="modal-body">
+                <div class="alert alert-block alert-success">						
+                    <p>
+                        QuÃ­ vá» cáº§n Äiá»n Äáº§y Äá»§ Há» vÃ  tÃªn chÃ­nh xÃ¡c báº±ng tiáº¿ng Viá»t cÃ³ dáº¥u, cÃ¡c tÃªn ÄÆ¡n vá» sáºœ khÃŽng ÄÆ°á»£c cháº¥p nháº­n.
+                    </p>
+                </div>
+                <form class="form-horizontal" action="#" method="POST">
+                    <div class="form-group">
+                        <label for="form-field-first" class="col-sm-4 control-label no-padding-right">
+                            Há» vÃ  tÃªn</label>
+                        <div class="col-sm-8">
+                            <input type="text" value="" placeholder="Há»" id="form-field-first" class="input-small">
+                            <input type="text" value="" placeholder="TÃªn" id="form-field-last" class="input-small">
+                        </div>
+                    </div>
+
+                    <div class="space-4"></div>
+
+                    <div class="form-group">
+                        <label for="form-field-username" class="col-sm-4 control-label no-padding-right">
+                            ÄÆ¡n vá»</label>
+                        <div class="col-sm-8">
+                            <input type="text" placeholder="ÄÆ¡n vá»" id="form-field-username" class="col-xs-12 col-sm-10">
+                        </div>
+                    </div>
+                </form>
+                <div class="modal-footer">
+                    <a href="#" class="btn btn-success" data-dismiss="modal">ÄÄng kÃœ</a>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 489)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/user_profile.php	(revision 490)
@@ -1,298 +1,362 @@
 <?php
 $base_url = base_url();
-$this->load->view('layout/frontend/header', array('base_url' => $base_url, '$username'=>@$username));
+$this->load->view('layout/frontend/header', array('base_url' => $base_url, '$username' => @$username));
 $this->load->view('layout/frontend/sidebar', array('base_url' => $base_url));
 /*
-$this->load->view('layout/frontend/header', array('base_url'=>base_url(), '$username'=>$username));
-$base_url = base_url();
-$this->load->view('layout/frontend/sidebar', array('base_url'=>base_url()));*/
+  $this->load->view('layout/frontend/header', array('base_url'=>base_url(), '$username'=>$username));
+  $base_url = base_url();
+  $this->load->view('layout/frontend/sidebar', array('base_url'=>base_url())); */
 ?>
 <div class="main-content">
 
-	<div class="page-content">
-		<div class="page-header">
-			<h1>
-				ThÃŽng tin cÃ¡ nhÃ¢n
-				<small>
-					<i class="icon-double-angle-right"></i>
-					<?php echo @$username; ?>
-				</small>
-			</h1>
-		</div><!-- /.page-header -->
-
-		<div class="row">
-			<div class="col-xs-12">
-				<!-- PAGE CONTENT BEGINS -->
-				<div class="user-profile row" id="user-profile-3">
-					<div class="col-sm-offset-1 col-sm-10">
-
-							<div class="tabbable">
-								<ul class="nav nav-tabs padding-16">
-									<li class="active">
-										<a href="#edit-basic" data-toggle="tab">
-											<i class="green icon-edit bigger-125"></i>
-											ThÃŽng tin cÃ¡ nhÃ¢n
-										</a>
-									</li>
-
-									<li>
-										<a href="#edit-password" data-toggle="tab">
-											<i class="blue icon-key bigger-125"></i>
-											Äá»i máº­t kháº©u
-										</a>
-									</li>
-
-									<li>
-										<a href="#account-info" data-toggle="tab">
-											<img src="<?php echo $base_url; ?>assets/img/payment.png" width="16" class="img-responsive pull-left">
-											ThÃŽng tin tÃ i khoáº£n
-										</a>
-									</li>
-								</ul>
-
-								<div class="tab-content profile-edit-tab-content">
-									<div class="tab-pane in active" id="edit-basic">
-										<form id="frm1" role="form" class="form-horizontal">
-											<h4 class="header blue bolder smaller">ThÃŽng tin chung</h4>
-
-											<div class="row">
-
-												<div class="vspace-xs"></div>
-
-												<div class="col-xs-12 col-sm-8">
-													<div class="form-group">
-														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">TÃ i khoáº£n</label>
-
-														<div class="col-sm-8">
-															<input type="text" name="username" value="<?php echo @$username; ?>" placeholder="TÃ i khoáº£n" id="form-field-username" class="col-xs-12 col-sm-10" disabled>
-														</div>
-													</div>
-
-													<div class="space-4"></div>
-
-													<div class="form-group">
-														<label for="form-field-first" class="col-sm-4 control-label no-padding-right">Há» tÃªn</label>
-
-														<div class="col-sm-8">
-															<input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há»" id="form-field-first" class="col-xs-12 col-sm-10" disabled>
-								
-														</div>
-													</div>
-
-													<div class="space-4"></div>
-
-													<div class="form-group">
-														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">ÄÆ¡n vá»</label>
-
-														<div class="col-sm-8">
-															<input type="text" name="school" value="<?php echo @$school; ?>" placeholder="ÄÆ¡n vá»" id="form-field-username" class="col-xs-12 col-sm-10">
-														</div>
-													</div>
-													
-													<div class="space-4"></div>
-
-													<div class="form-group">
-														<label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tá»nh / ThÃ nh phá»</label>
-
-														<div class="col-sm-8">
-															<input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tá»nh / ThÃ nh phá»" id="form-field-username" class="col-xs-12 col-sm-10">
-														</div>
-													</div>
-
-												</div>
-											</div>
-
-											<hr>
-
-											<div class="space-4"></div>
-
-											<div class="form-group">
-												<label class="col-sm-3 control-label no-padding-right">Giá»i tÃ­nh</label>
-
-												<div class="col-sm-9">
-													<label class="inline">
-														<input type="radio" <?php if(@$gender=="male") echo "checked"; ?> class="ace" name="gender" value="male">
-														<span class="lbl"> Nam</span>
-													</label>
-
-													&nbsp; &nbsp; &nbsp;
-													<label class="inline">
-														<input type="radio" <?php if(@$gender=="female") echo "checked"; ?> class="ace" name="gender" value="female">
-														<span class="lbl"> Ná»¯</span>
-													</label>
-												</div>
-											</div>
-
-											<div class="space"></div>
-											<h4 class="header blue bolder smaller">ThÃŽng tin liÃªn há»</h4>
-
-											<div class="form-group">
-												<label for="form-field-email" class="col-sm-3 control-label no-padding-right">Email</label>
-
-												<div class="col-sm-9">
-													<label class="block clearfix has-error">
-														<span class="input-icon input-icon-right">
-															<input name="email" type="email" value="<?php echo @$email; ?>" id="form-field-email">
-															<i class="icon-envelope"></i>
-														</span>
-														<div class="help-block" id="email_err"> </div>
-													</label>
-												</div>
-											</div>
-
-											<div class="clearfix form-actions">
-												<div class="col-md-offset-3 col-md-9">
-													<button type="button" onclick="return updateInfo(<?php echo @$us_id; ?>);" class="btn btn-info">
-														<i class="icon-ok bigger-110"></i>
-														Cáº­p nháº­t
-													</button>
-												</div>
-											</div>
-										</form>
-									</div>
-
-									
-									<div class="tab-pane" id="edit-password">
-										<div class="alert alert-block alert-success">						
-											<p>
-												QuÃ­ vá» cÃ³ thá» thay Äá»i máº­t kháº©u báº±ng cÃ¡ch dÃ¹ng sá» Äiá»n thoáº¡i [SoDTKhachhang] vÃ  soáº¡n tin theo cÃº phÃ¡p: <strong>SBG MK [matkhaumoi] gá»­i tá»i 8062</strong>. <br/>
-												Äá» láº¥y láº¡i máº­t kháº©u cá»§a mÃ¬nh trÃªn há» thá»ng SBG Online, quÃ­ vá» hÃ£y dÃ¹ng sá» Äiá»n thoáº¡i ÄÃ£ ÄÄng kÃ­ tÃ i khoáº£n vÃ  soáº¡n tin theo cÃº phÃ¡p: <strong>SBG MK gá»­i tá»i 8062</strong>.
-											</p>
-										</div>
-									</div>
-
-									<div class="tab-pane" id="account-info">
-										<form id="frm3" class="form-horizontal" role="form">
-											<h4 class="header blue bolder smaller">ThÃŽng tin tÃ i khoáº£n</h4>
-											<div class="col-sm-6">
-												<h4>Sá» tiá»n </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND</h3>
-											</div>
-											<div class="col-sm-6">
-												<h4>Thá»i báº¡n sá»­ dá»¥ng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo $date_diff; ?></span></h3>
-											</div>
-
-											<h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tháº» cÃ o</h4>
-											<div class="col-sm-8">
-												<div class="form-group">
-													<label for="form-field-pass1" class="col-sm-2 control-label no-padding-right">MÃ£ tháº»</label>
-
-													<div class="col-sm-10">
-														<input type="text" id="form-field-pass1" class="form-control">
-													</div>
-												</div>
-
-												<div class="space-4"></div>
-
-												<div class="form-group">
-													<label for="form-field-pass2" class="col-sm-2 control-label no-padding-right">Serial</label>
-
-													<div class="col-sm-10">
-														<input type="text" id="form-field-pass2" class="form-control">
-													</div>
-												</div>
-											</div>
-											<div class="col-sm-4">
-												<button type="button" class="btn btn-success" data-toggle="modal" data-target="#alert-payment">
-													<i class="icon-ok bigger-110"></i>
-													Tiáº¿p tá»¥c
-												</button>
-												<div class="space-4"></div>
-												<a href="#" data-toggle="modal" data-target="#trade-history"><i class="icon-archive"></i> Lá»ch sá»­ giao dá»ch</a>
-											</div>
-											<div class="clearfix">
-												
-											</div>
-											<h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tÃ i khoáº£n gá»c</h4>
-											<div class="alert alert-block alert-success">						
-												<p>
-													Sá»­ dá»¥ng thuÃª bao <strong>016825764</strong> soáº¡n tin nháº¯n: <strong>SBG NAP [sotien] gá»­i 8062</strong>. <br/>
-													Náº¿u quÃ­ vá» sá»­ dá»¥ng thuÃª bao Viettel khÃ¡c thÃ¬ soáº¡n tin nháº¯n: <strong>SBG NAP [tentruynhap] 
-													[sotien] gá»­i tá»i 8062</strong>.
-												</p>
-											</div>
-										</form>
-									</div>
-
-								</div>
-							</div>
-					</div><!-- /span -->
-				</div>
-
-				<!-- PAGE CONTENT ENDS -->
-			</div><!-- /.col -->
-		</div><!-- /.row -->
-	</div><!-- /.page-content -->
+    <div class="page-content">
+        <div class="page-header">
+            <h1>
+                ThÃŽng tin cÃ¡ nhÃ¢n
+                <small>
+                    <i class="icon-double-angle-right"></i>
+                    <?php echo @$username; ?>
+                </small>
+            </h1>
+        </div><!-- /.page-header -->
+
+        <div class="row">
+            <div class="col-xs-12">
+                <!-- PAGE CONTENT BEGINS -->
+                <div class="user-profile row" id="user-profile-3">
+                    <div class="col-sm-offset-1 col-sm-10">
+
+                        <div class="tabbable">
+                            <ul class="nav nav-tabs padding-16">
+                                <li class="active">
+                                    <a href="#edit-basic" data-toggle="tab">
+                                        <i class="green icon-edit bigger-125"></i>
+                                        ThÃŽng tin cÃ¡ nhÃ¢n
+                                    </a>
+                                </li>
+
+                                <li>
+                                    <a href="#edit-password" data-toggle="tab">
+                                        <i class="blue icon-key bigger-125"></i>
+                                        Äá»i máº­t kháº©u
+                                    </a>
+                                </li>
+
+                                <li>
+                                    <a href="#account-info" data-toggle="tab">
+                                        <img src="<?php echo $base_url; ?>assets/img/payment.png" width="16" class="img-responsive pull-left">
+                                        ThÃŽng tin tÃ i khoáº£n
+                                    </a>
+                                </li>
+                                <li>
+                                    <a href="#services-register" data-toggle="tab">
+                                        <i class="blue icon-cog bigger-125"></i>
+                                        ÄÄng kÃœ dá»ch vá»¥
+                                    </a>
+                                </li>
+                            </ul>
+
+                            <div class="tab-content profile-edit-tab-content">
+                                <div class="tab-pane in active" id="edit-basic">
+                                    <form id="frm1" role="form" class="form-horizontal">
+                                        <h4 class="header blue bolder smaller">ThÃŽng tin chung</h4>
+
+                                        <div class="row">
+
+                                            <div class="vspace-xs"></div>
+
+                                            <div class="col-xs-12 col-sm-8">
+                                                <div class="form-group">
+                                                    <label for="form-field-username" class="col-sm-4 control-label no-padding-right">TÃ i khoáº£n</label>
+
+                                                    <div class="col-sm-8">
+                                                        <input type="text" name="username" value="<?php echo @$username; ?>" placeholder="TÃ i khoáº£n" id="form-field-username" class="col-xs-12 col-sm-10" disabled>
+                                                    </div>
+                                                </div>
+
+                                                <div class="space-4"></div>
+
+                                                <div class="form-group">
+                                                    <label for="form-field-first" class="col-sm-4 control-label no-padding-right">Há» tÃªn</label>
+
+                                                    <div class="col-sm-8">
+                                                        <input type="text" name="fullname" value="<?php echo @$fullname; ?>" placeholder="Há»" id="form-field-first" class="col-xs-12 col-sm-10" disabled>
+
+                                                    </div>
+                                                </div>
+
+                                                <div class="space-4"></div>
+
+                                                <div class="form-group">
+                                                    <label for="form-field-username" class="col-sm-4 control-label no-padding-right">ÄÆ¡n vá»</label>
+
+                                                    <div class="col-sm-8">
+                                                        <input type="text" name="school" value="<?php echo @$school; ?>" placeholder="ÄÆ¡n vá»" id="form-field-username" class="col-xs-12 col-sm-10">
+                                                    </div>
+                                                </div>
+
+                                                <div class="space-4"></div>
+
+                                                <div class="form-group">
+                                                    <label for="form-field-username" class="col-sm-4 control-label no-padding-right">Tá»nh / ThÃ nh phá»</label>
+
+                                                    <div class="col-sm-8">
+                                                        <input type="text" name="province" value="<?php echo @$province; ?>" placeholder="Tá»nh / ThÃ nh phá»" id="form-field-username" class="col-xs-12 col-sm-10">
+                                                    </div>
+                                                </div>
+
+                                            </div>
+                                        </div>
+
+                                        <hr>
+
+                                        <div class="space-4"></div>
+
+                                        <div class="form-group">
+                                            <label class="col-sm-3 control-label no-padding-right">Giá»i tÃ­nh</label>
+
+                                            <div class="col-sm-9">
+                                                <label class="inline">
+                                                    <input type="radio" <?php if (@$gender == "male") echo "checked"; ?> class="ace" name="gender" value="male">
+                                                    <span class="lbl"> Nam</span>
+                                                </label>
+
+                                                &nbsp; &nbsp; &nbsp;
+                                                <label class="inline">
+                                                    <input type="radio" <?php if (@$gender == "female") echo "checked"; ?> class="ace" name="gender" value="female">
+                                                    <span class="lbl"> Ná»¯</span>
+                                                </label>
+                                            </div>
+                                        </div>
+
+                                        <div class="space"></div>
+                                        <h4 class="header blue bolder smaller">ThÃŽng tin liÃªn há»</h4>
+
+                                        <div class="form-group">
+                                            <label for="form-field-email" class="col-sm-3 control-label no-padding-right">Email</label>
+
+                                            <div class="col-sm-9">
+                                                <label class="block clearfix has-error">
+                                                    <span class="input-icon input-icon-right">
+                                                        <input name="email" type="email" value="<?php echo @$email; ?>" id="form-field-email">
+                                                        <i class="icon-envelope"></i>
+                                                    </span>
+                                                    <div class="help-block" id="email_err"> </div>
+                                                </label>
+                                            </div>
+                                        </div>
+
+                                        <div class="clearfix form-actions">
+                                            <div class="col-md-offset-3 col-md-9">
+                                                <button type="button" onclick="return updateInfo(<?php echo @$us_id; ?>);" class="btn btn-info">
+                                                    <i class="icon-ok bigger-110"></i>
+                                                    Cáº­p nháº­t
+                                                </button>
+                                            </div>
+                                        </div>
+                                    </form>
+                                </div>
+
+
+                                <div class="tab-pane" id="edit-password">
+                                    <div class="alert alert-block alert-success">						
+                                        <p>
+                                            QuÃ­ vá» cÃ³ thá» thay Äá»i máº­t kháº©u báº±ng cÃ¡ch dÃ¹ng sá» Äiá»n thoáº¡i [SoDTKhachhang] vÃ  soáº¡n tin theo cÃº phÃ¡p: <strong>SBG MK [matkhaumoi] gá»­i tá»i 8062</strong>. <br/>
+                                            Äá» láº¥y láº¡i máº­t kháº©u cá»§a mÃ¬nh trÃªn há» thá»ng SBG Online, quÃ­ vá» hÃ£y dÃ¹ng sá» Äiá»n thoáº¡i ÄÃ£ ÄÄng kÃ­ tÃ i khoáº£n vÃ  soáº¡n tin theo cÃº phÃ¡p: <strong>SBG MK gá»­i tá»i 8062</strong>.
+                                        </p>
+                                    </div>
+                                </div>
+
+                                <div class="tab-pane" id="account-info">
+                                    <form id="frm3" class="form-horizontal" role="form">
+                                        <h4 class="header blue bolder smaller">ThÃŽng tin tÃ i khoáº£n</h4>
+                                        <div class="col-sm-6">
+                                            <h4>Sá» tiá»n </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND</h3>
+                                        </div>
+                                        <div class="col-sm-6">
+                                            <h4>Thá»i báº¡n sá»­ dá»¥ng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo $date_diff; ?></span></h3>
+                                        </div>
+
+                                        <h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tháº» cÃ o</h4>
+                                        <div class="col-sm-8">
+                                            <div class="form-group">
+                                                <label for="form-field-pass1" class="col-sm-2 control-label no-padding-right">MÃ£ tháº»</label>
+
+                                                <div class="col-sm-10">
+                                                    <input type="text" id="form-field-pass1" class="form-control">
+                                                </div>
+                                            </div>
+
+                                            <div class="space-4"></div>
+
+                                            <div class="form-group">
+                                                <label for="form-field-pass2" class="col-sm-2 control-label no-padding-right">Serial</label>
+
+                                                <div class="col-sm-10">
+                                                    <input type="text" id="form-field-pass2" class="form-control">
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="col-sm-4">
+                                            <button type="button" class="btn btn-success" data-toggle="modal" data-target="#alert-payment">
+                                                <i class="icon-ok bigger-110"></i>
+                                                Tiáº¿p tá»¥c
+                                            </button>
+                                            <div class="space-4"></div>
+                                            <a href="#" data-toggle="modal" data-target="#trade-history"><i class="icon-archive"></i> Lá»ch sá»­ giao dá»ch</a>
+                                        </div>
+                                        <div class="clearfix">
+
+                                        </div>
+                                        <h4 class="header blue bolder smaller">Náº¡p tiá»n báº±ng tÃ i khoáº£n gá»c</h4>
+                                        <div class="alert alert-block alert-success">						
+                                            <p>
+                                                Sá»­ dá»¥ng thuÃª bao <strong>016825764</strong> soáº¡n tin nháº¯n: <strong>SBG NAP [sotien] gá»­i 8062</strong>. <br/>
+                                                Náº¿u quÃ­ vá» sá»­ dá»¥ng thuÃª bao Viettel khÃ¡c thÃ¬ soáº¡n tin nháº¯n: <strong>SBG NAP [tentruynhap] 
+                                                    [sotien] gá»­i tá»i 8062</strong>.
+                                            </p>
+                                        </div>
+                                    </form>
+                                </div>
+                                <div class="tab-pane" id="services-register">
+                                    <form action="<?php echo base_url();?>frontend/user/packageRegister"  class="form-horizontal" id="package_register">
+                                        <h4 class="header blue bolder smaller">ThÃŽng tin tÃ i khoáº£n</h4>
+                                        <div class="col-sm-6">
+                                            <h4>Sá» tiá»n </h4> <h3><?php echo number_format(@$acc_balanced, 0); ?> VND</h3>
+                                        </div>
+                                        <div class="col-sm-6">
+                                            <h4>Thá»i báº¡n sá»­ dá»¥ng </h4> <h3><?php echo $expire_date; ?> <span class="badge"><?php echo $date_diff; ?></span></h3>
+                                        </div> 
+                                        <h4 class="header blue bolder smaller">ÄÄng kÃœ dá»ch vá»¥</h4>
+                                        <h5>CÃ¡ch 1: Má»i quÃ­ vá» chá»n cÃ¡c gÃ³i dá»ch vá»¥ sau</h5>
+                                        <div class="errors" id="package_register">
+                                            
+                                        </div>
+                                        <div class="alert alert-block alert-success">						
+                                            <table class="table">
+                                                <tbody>
+                                                    <?php foreach ($packages as $index=>$package)
+                                                    {
+                                                    ?>
+                                                    <tr>
+                                                        <td><?php echo $package['p_name'];?></td>
+                                                        <td><?php echo number_format($package['p_price'], 0); ?> VNÄ</td>
+                                                        <td class="center">
+                                                            <label>
+                                                                <input <?php if($index==0) {echo "checked='checked'";}?> type="radio" value="<?php echo $package['p_id'];?>" name="p_id" class="ace" />
+                                                                <span class="lbl"></span>
+                                                            </label>
+                                                        </td>
+                                                    </tr>
+                                                    <?php } ?>
+                                                    
+                                                </tbody>
+                                            </table>
+                                            <button type="submit" class="btn btn-success">ÄÄng kÃœ</button>
+                                        </div>
+                                        <h5>CÃ¡ch 2</h5>
+                                        <h4>Soáº¡n tin: SBG DK 1 (hay 3, 6, 12) gá»­i tá»i 8062</h4>
+                                    </form>
+                                </div>
+
+                            </div>
+                        </div>
+                    </div><!-- /span -->
+                </div>
+
+                <!-- PAGE CONTENT ENDS -->
+            </div><!-- /.col -->
+        </div><!-- /.row -->
+    </div><!-- /.page-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>
+    <i class="icon-double-angle-up icon-only bigger-110"></i>
 </a>
 </div><!-- /.main-container -->
 
 <div class="modal fade" id="trade-history" tabindex="-1" role="dialog"aria-hidden="true">
-<div class="modal-dialog">
-<div class="modal-content">
-<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á»­ giao dá»ch</h4>
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <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á»­ giao dá»ch</h4>
+            </div>
+            <div class="modal-body">
+                <div class="table-responsive">
+                    <table id="sample-table-1" class="table table-striped table-bordered table-hover">
+                        <thead>
+                            <tr>
+                                <th class="center">
+                                    <label>
+                                        <input type="checkbox" class="ace" />
+                                        <span class="lbl"></span>
+                                    </label>
+                                </th>
+                                <th>Sá» tiá»n</th>
+
+                                <th>
+                                    <i class="icon-time bigger-110 hidden-480"></i>
+                                    Thá»i gian
+                                </th>
+                            </tr>
+                        </thead>
+
+                        <tbody>
+                            <tr>
+                                <td class="center">
+                                    <label>
+                                        <input type="checkbox" class="ace" />
+                                        <span class="lbl"></span>
+                                    </label>
+                                </td>
+                                <td>$45</td>
+                                <td>Feb 12</td>
+                            </tr>
+                        </tbody>
+                    </table>
+                </div><!-- /.table-responsive -->
+            </div>
+        </div>
+    </div>
 </div>
-<div class="modal-body">
-<div class="table-responsive">
-			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
-				<thead>
-					<tr>
-						<th class="center">
-							<label>
-								<input type="checkbox" class="ace" />
-								<span class="lbl"></span>
-							</label>
-						</th>
-						<th>Sá» tiá»n</th>
-
-						<th>
-							<i class="icon-time bigger-110 hidden-480"></i>
-							Thá»i gian
-						</th>
-					</tr>
-				</thead>
-
-				<tbody>
-					<tr>
-						<td class="center">
-							<label>
-								<input type="checkbox" class="ace" />
-								<span class="lbl"></span>
-							</label>
-						</td>
-						<td>$45</td>
-						<td>Feb 12</td>
-					</tr>
-				</tbody>
-			</table>
-		</div><!-- /.table-responsive -->
+
+<div class="modal fade" id="alert-payment" tabindex="-1" role="dialog"aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <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">ThÃŽng bÃ¡o dá»ch vá»¥</h4>
+            </div>
+            <div class="modal-body">
+                <div class="alert alert-block alert-success">						
+                    <p>
+                        QuÃ­ vá» ÄÃ£ náº¡p thÃ nh cÃŽng <b>10.000 </b>VND vÃ o tÃ i khoáº£n <b>0168942155</b>, tÃ i khoáº£n hiá»n táº¡i cá»§a quÃ­ vá» lÃ  <b>20.000 </b>VND.
+                    </p>
+                </div>
+            </div>
+        </div>
+    </div>
 </div>
+
+<div class="modal fade" id="package_register_modal" tabindex="-1" role="dialog"aria-hidden="true">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <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">ÄÄng kÃœ gÃ³i dá»ch vá»¥</h4>
+            </div>
+            <div class="modal-body">
+                <div class="alert alert-block alert-success">						
+                   
+                </div>
+            </div>
+        </div>
+    </div>
 </div>
-</div>
-</div>
-
-<div class="modal fade" id="alert-payment" tabindex="-1" role="dialog"aria-hidden="true">
-<div class="modal-dialog">
-<div class="modal-content">
-<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">ThÃŽng bÃ¡o dá»ch vá»¥</h4>
-</div>
-<div class="modal-body">
-<div class="alert alert-block alert-success">						
-			<p>
-				QuÃ­ vá» ÄÃ£ náº¡p thÃ nh cÃŽng <b>10.000 </b>VND vÃ o tÃ i khoáº£n <b>0168942155</b>, tÃ i khoáº£n hiá»n táº¡i cá»§a quÃ­ vá» lÃ  <b>20.000 </b>VND.
-			</p>
-		</div>
-</div>
-</div>
-</div>
-</div>
-		
+
+
+
 <?php
 $this->load->view('layout/frontend/footer', array('base_url' => $base_url, 'usjs' => array('assets/js/frontend/user.js')));
