Index: pro-violet-viettel/sourcecode/assets/js/admin/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 643)
+++ pro-violet-viettel/sourcecode/assets/js/admin/user.js	(revision 644)
@@ -6,2 +6,99 @@
     };
 })(jQuery);
+
+function regisHistory(id, page)
+{
+	$.ajax({
+		url: '/frontend/user/regis_history/'+id +'/page/'+page,
+		type: 'POST',
+		success: function(data)
+		{
+			results = jQuery.parseJSON(data);
+			paging = results.paging;
+			result = results.packagelogs;
+			content = "";
+			if(result.length>0){
+				for (var i in result)
+				{
+					content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].p_name+'</td><td>'+result[i].created_time+'</td></tr>';
+					
+				}
+			}else
+			{
+				content += '<tr><td class="center" colspan=3>ChÆ°a ÄÄng kÃ­ gÃ³i dá»ch vá»¥ nÃ o!</td></tr>';
+			}
+			$("#user-history").find("#content-regis-histoty").html(content);
+			$("#user-history").find("#regis-pagination").html(paging);
+			$(".ajax_paging").click(function ()
+			{
+				$.ajax({
+					url: $(this).attr("href"),
+					type: "POST",
+					success: function (data, textStatus, jqXHR)
+					{
+						results = jQuery.parseJSON(data);
+						regisHistory(id, results.current_page);
+					},
+					error: function ()
+					{
+						$(".ajaxloading").hide();
+					}
+				});
+				return false;
+			});
+			
+		}
+	});
+}
+
+function tradeHistory(id, page)
+{
+	$.ajax({
+		url: '/frontend/user/trade_history/'+id +'/page/'+page,
+		type: 'POST',
+		success: function(data)
+		{
+			results = jQuery.parseJSON(data);
+			paging = results.paging;
+			result = results.paidlogs;
+			content = "";
+			if(result.length>0){
+				for (var i in result)
+				{
+					content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].amount+'</td><td>'+result[i].paid_time+'</td></tr>';
+					
+				}
+			}else
+			{
+				content += '<tr><td class="center" colspan=3>ChÆ°a cÃ³ giao dá»ch nÃ o!</td></tr>';
+			}
+			$("#user-history").find("#content-trade-histoty").html(content);
+			$("#user-history").find("#trade-pagination").html(paging);
+			 $(".ajax_paging").click(function ()
+			 {
+				$.ajax({
+					url: $(this).attr("href"),
+					type: "POST",
+					success: function (data, textStatus, jqXHR)
+					{
+						results = jQuery.parseJSON(data);
+						tradeHistory(id, results.current_page);
+					},
+					error: function ()
+					{
+						$(".ajaxloading").hide();
+					}
+				});
+				return false;
+			 });
+			
+		}
+	});	
+}
+
+function getUserHistory(id, page)
+{
+	regisHistory(id, page);
+	tradeHistory(id, page);
+	$("#user-history").modal('show');
+}
Index: pro-violet-viettel/sourcecode/assets/js/frontend/user.js
===================================================================
--- pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 643)
+++ pro-violet-viettel/sourcecode/assets/js/frontend/user.js	(revision 644)
@@ -186,5 +186,5 @@
 			}else
 			{
-				content += '<tr><td class="center" colspan=3>QuÃœ vá» chÆ°a cÃ³ giao dá»ch nÃ o!</td></tr>';
+				content += '<tr><td class="center" colspan=3>ChÆ°a cÃ³ giao dá»ch nÃ o!</td></tr>';
 			}
 			$("#trade-history").find("#content-trade-histoty").html(content);
@@ -226,10 +226,10 @@
 				for (var i in result)
 				{
-					content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].vip_name+'</td><td>'+result[i].created_time+'</td></tr>';
+					content += '<tr><td class="center">'+result[i].source+'</td><td class="center">'+result[i].p_name+'</td><td>'+result[i].created_time+'</td></tr>';
 					
 				}
 			}else
 			{
-				content += '<tr><td class="center" colspan=3>QuÃœ vá» chÆ°a ÄÄng kÃ­ gÃ³i dá»ch vá»¥ nÃ o!</td></tr>';
+				content += '<tr><td class="center" colspan=3>ChÆ°a ÄÄng kÃ­ gÃ³i dá»ch vá»¥ nÃ o!</td></tr>';
 			}
 			$("#regis-history").find("#content-regis-histoty").html(content);
