Index: pro-violet-viettel/sourcecode/application/language/message/messages_lang.php
===================================================================
--- pro-violet-viettel/sourcecode/application/language/message/messages_lang.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/language/message/messages_lang.php	(revision 654)
@@ -38,4 +38,5 @@
 $lang['_SBG_USER_INFO_REQUIRED_MSG'] = 'QuÃœ vá» hÃ£y nháº­p thÃŽng tin cÃ¡ nhÃ¢n Äá» cÃ³ thá» sá»­ dá»¥ng dá»ch vá»¥.';
 $lang['_SBG_USER_UNREGISTERING_SERVICE_MSG'] = 'QuÃœ vá» chÆ°a ÄÄng kÃœ sá»­ dá»¥ng dá»ch vá»¥ Soáº¡n BÃ i giáº£ng online. QuÃœ vá» cÃ³ thá» dÃ¹ng thá»­ dá»ch vá»¥ Soáº¡n BÃ i giáº£ng online trÆ°á»c khi ÄÄng kÃœ.';
+$lang['_SBG_USER_TRIAL_SERVICE_MSG'] = 'QuÃœ vá» Äang sá»­ dá»¥ng gÃ³i dÃ¹ng thá»­ cá»§a dá»ch vá»¥ Soáº¡n BÃ i giáº£ng online. QuÃœ vá» cÃ³ thá» dÃ¹ng thá»­ dá»ch vá»¥ Soáº¡n BÃ i giáº£ng online cho Äáº¿n háº¿t ngÃ y ';
 
 
Index: pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/controllers/lecture.php	(revision 654)
@@ -25,5 +25,5 @@
         $licenseAvailable = $this->User_model->checkLicense($aryParams['id']);
         $licenseAvailable = $licenseAvailable == TRUE ? 'OK' : '!OK';
-        
+       
         if ($user_info) {
             $username = $user_info['username'];    
@@ -34,5 +34,6 @@
             $user = $user_info['user'];
             $us_id = $user_info['us_id'];
-            $u = $this->user_model->get_user_by_id($us_id);
+            $u = $this->user_model->get_user_by_id($us_id); 
+            $info['fullname']="";
             if (($info['fullname']=="")&&($u['p_id']!=""))
             {
@@ -44,5 +45,5 @@
                $first_visit=1;
             }
-          $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id));
+          $this->load->view('lecture_editor', array('username' => $username, 'licenseAvailable' => $licenseAvailable, 'first_visit' => $first_visit, 'licflashVars' => $aryParams,'update_user_info'=>$update_user_info,'us_id'=>$us_id,"p_id"=>$u['p_id'],"expire_date"=>date("d-m-Y", strtotime($u['expire_date']))));
         } else {
             redirect('/frontend/home/');
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php	(revision 654)
@@ -18,5 +18,5 @@
     {
     	$this->db->query('UNLOCK TABLES');
-        $sql="SELECT * FROM ".$this->table_name."";
+        $sql="SELECT * FROM ".$this->table_name." WHERE p_period > 0";
         return $this->db->query($sql)->result_array();
     }
Index: pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/models/user_model.php	(revision 654)
@@ -86,4 +86,6 @@
 				$user ['created_time'] = date ( 'Y-m-d H:i:s' );
 				$user ['us_id'] = $us_id;
+                                $user ['p_id'] = 5; 
+                                $user['expire_date'] = date('Y-m-d', strtotime("+" . $this->config->item("trial_period") . " days", time()));
 				$user ['cellphone'] = $username;
 				if (! is_null ( $collaborator ) || $collaborator != '') {
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/lecture_editor.php	(revision 654)
@@ -94,14 +94,16 @@
     </div>
 </div>
-                
+                <?php echo $licenseAvailable;?>
 <script type="text/javascript">
 	var licenseAvailable = "<?php echo $licenseAvailable;?>";
 	var url= "<?php echo base_url();?>";
 	var first_visit= "<?php echo $first_visit;?>";
+        var p_id= "<?php echo $p_id;?>";
+        var expire_date= "<?php echo $expire_date;?>";
     var update_user_info="<?php echo $update_user_info;?>";
     var us_id="<?php echo $us_id;?>";
 </script>		
 <?php
-$this->load->view('servicemodals');
+$this->load->view('servicemodals',array("expire_date"=>$expire_date));
 $this->load->view('layout/frontend/footer', array('usjs'=> array('assets/js/frontend/lecture.js')));
 ?>
Index: pro-violet-viettel/sourcecode/application/modules/frontend/views/servicemodals.php
===================================================================
--- pro-violet-viettel/sourcecode/application/modules/frontend/views/servicemodals.php	(revision 653)
+++ pro-violet-viettel/sourcecode/application/modules/frontend/views/servicemodals.php	(revision 654)
@@ -1,3 +1,27 @@
 		<!-- alert-services -->
+		<div class="modal fade" id="alert-trial-services" 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>
+								<?php echo lang('_SBG_USER_TRIAL_SERVICE_MSG').$expire_date; ?>
+							</p>
+						</div>
+		      </div>
+
+		      <div class="modal-footer">
+		      	<button type="button" class="btn btn-info" data-dismiss="modal">DÃ¹ng thá»­</button>
+		      	<button type="button" class="btn btn-success" id="services-reg" data-dismiss="modal">ÄÄng kÃœ gÃ³i VIP</button>
+		      </div>
+		    </div>
+		  </div>
+		</div>
+		<!-- END: alert-services -->
+                <!-- alert-services -->
 		<div class="modal fade" id="alert-services" tabindex="-1" role="dialog"aria-hidden="true">
 		  <div class="modal-dialog">
Index: pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 653)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/lecture.js	(revision 654)
@@ -1,13 +1,22 @@
 if (licenseAvailable == "!OK")
 {
+    $('#alert-services').modal('show');
     if (first_visit == '1') {
-    	$('#alert-services').modal('show');
+        $('#alert-services').modal('show');
+    }
+}
+if (first_visit == '1') {
+    if (update_user_info == "1")
+    {
+        $('#update_user_info').modal({backdrop: 'static'});
+    } else {
+        if (p_id == 5)
+        {
+            $('#alert-trial-services').modal('show');
+        }
     }
 }
 
-if (update_user_info=="1")
-{
-    $('#update_user_info').modal({backdrop: 'static'});
-}
+
 $("#update_user_info.btn").click(function () {
     $(".error").html("");
@@ -21,6 +30,6 @@
             if (result.success == "1")
             {
-				$('#update_user_info').modal('hide');
-                
+                $('#update_user_info').modal('hide');
+
             }
             else
@@ -28,6 +37,6 @@
                 for (var key in result.errors)
                 {
-                    $("#"+result.errors[key]['field']+".error").html(result.errors[key]['content']);
-                    
+                    $("#" + result.errors[key]['field'] + ".error").html(result.errors[key]['content']);
+
                 }
             }
@@ -42,10 +51,10 @@
 
 $('#services-reg').click(function () {
-	$('#alert-services').modal('hide');
-	window.location=url+"frontend/user/profile#services-register";
+    $('#alert-services').modal('hide');
+    window.location = url + "frontend/user/profile#services-register";
 });
 
 $('#save-package').click(function () {
-	DoSaveLecture();
+    DoSaveLecture();
 });
 
@@ -99,11 +108,11 @@
 ;
 
-function DoSaveLecture () {
-	g_Flash.SetVariable("command", "Press Save");
+function DoSaveLecture() {
+    g_Flash.SetVariable("command", "Press Save");
 }
 
-function DoOpenLecture (filename) {
-	g_Flash.SetVariable("openedFileName", filename);
-	g_Flash.SetVariable("command", "Open File");
+function DoOpenLecture(filename) {
+    g_Flash.SetVariable("openedFileName", filename);
+    g_Flash.SetVariable("command", "Open File");
 }
 
@@ -149,6 +158,6 @@
 
 $(document).ready(function () {
-    InitViolet();    
+    InitViolet();
     //$('#open-lecture').click(function(e){DoOpenLecture('http://sbgapi.violet.vn/space/file/id/7');});
-    
+
 })
