loading='<center><img src="images/loading1.gif"/></center>';function Facebook(answer,userid){$("#Facebook").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"Facebook="+answer+"&userid="+userid,dataType:'html',success:function(html){$("#Facebook").html(html)}})}function SetFree(id){$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"SetFree="+id,dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}function UnFree(id){$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"UnFree="+id,dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}function EditTitle(id){$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"EditTitle="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}function NewName(id){var form=document.forms['title'];var name=form.name.value;$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"NewName="+encodeURIComponent(name)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}function Check(id,userid){$("#CheckDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"checkid="+id+"&userid="+userid,dataType:'html',success:function(html){$("#CheckDiv").html(html)}})}function Thank(id,userid){$("#ThankDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"thankid="+id+"&userid="+userid,dataType:'html',success:function(html){$("#ThankDiv").html(html)}})}function UpTorrent(id,point){if(confirm("Bạn có chắc chắn muốn thực hiện không?")){$("#UpDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"upid="+id,dataType:'html',success:function(html){$("#UpDiv").html(html)}})}}function Reports(id){$("#ReportsDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"Reports="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#ReportsDiv").html(html)}})}function ReportsBack(id){$("#ReportsDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"ReportsBack="+id,dataType:'html',success:function(html){$("#ReportsDiv").html(html)}})}function SendReportInfo(id){var form=document.forms['report'];var ReportInfo=form.reportinfo.value;if(ReportInfo==""){alert("Bạn chưa nhập nội dung báo cáo!")}else{$("#ReportsDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"ReportInfo="+encodeURIComponent(ReportInfo)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#ReportsDiv").html(html)}})}}function EditPreview(){$("#PreviewDiv").html(loading);window.scrollTo(0,0);var form=document.forms['edit'];var info=form.comment.value;$.ajax({type:"POST",url:"detail_ajax.php",data:"EditPreview="+encodeURIComponent(info)+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#PreviewDiv").html(html)}})}function UploadPreview(){$("#PreviewDiv").html(loading);window.scrollTo(0,0);var form=document.forms['upload'];var info=form.info.value;$.ajax({type:"POST",url:"detail_ajax.php",data:"EditPreview="+encodeURIComponent(info)+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#PreviewDiv").html(html)}})}function RequestSeed(id,userid){$("#RequestSeedDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"RequestSeedId="+id+"&userid="+userid,dataType:'html',success:function(html){$("#RequestSeedDiv").html(html)}})}function TopTorrent(){$("#ResultTopTorrentDiv").html(loading);var form=document.forms['toptorrent'];var category=form.category.value;var size=form.size.value;var from=form.from.value;var to=form.to.value;var fromdate=Date.parse(from);var todate=Date.parse(to);if(isNaN(fromdate)||isNaN(todate))alert("Vui lòng chọn ngày tháng cần tổng hợp \n .:: Lưu ý: Ngày bắt đầu <= Ngày kết thúc!");else if(fromdate>todate)alert("Bạn đã chọn Ngày bắt đầu > Ngày kết thúc! Vui lòng chọn lại! \n .:: Lưu ý: Ngày bắt đầu <= Ngày kết thúc!");else{$.ajax({type:"GET",url:"TopTorrents.php",data:"category="+category+"&size="+size+"&from="+from+"&to="+to,dataType:'html',success:function(html){$("#ResultTopTorrentDiv").html(html)}})}}function FullLeecherList(id){$("#LeecherList").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"FullLeecherList="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#LeecherList").html(html)}})}function FullThanksList(id){$("#ThanksList").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"FullThanksList="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#ThanksList").html(html)}})}function EditKeyword(id){$("#KeywordRelated").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"EditKeyword="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#KeywordRelated").html(html)}})}function SetKeyword(id){var form=document.forms['keyword'];var keyword=form.name.value;$("#KeywordRelated").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"SetKeyword="+encodeURIComponent(keyword)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#KeywordRelated").html(html)}})}function EditPoster(id){$("#Poster").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"EditPoster="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#Poster").html(html)}})}function SetPoster(id){var form=document.forms['poster'];var poster=form.poster.value;$("#Poster").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"SetPoster="+encodeURIComponent(poster)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#Poster").html(html)}})}function EditShortDescription(id){$("#ShortDescription").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"EditShortDescription="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#ShortDescription").html(html)}})}function SetShortDescription(id){var form=document.forms['shortdescription'];var shortdescription=form.shortdescription.value;$("#ShortDescription").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"SetShortDescription="+encodeURIComponent(shortdescription)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#ShortDescription").html(html)}})}function DeleteTorrent(id){$("#DeleteTorrent").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"DeleteTorrent="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#DeleteTorrent").html(html)}})}function SendDeleteReason(id){var form=document.forms['deleteTorrent'];var DeleteReason=form.deleteReason.value;if(DeleteReason==""){alert("Bạn chưa nhập lý do xóa Torrent này!")}else{$("#DeleteTorrent").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"DeleteReason="+encodeURIComponent(DeleteReason)+"&id="+id+"&t="+new Date().getTime(),dataType:'html',success:function(html){$("#DeleteTorrent").html(html)}})}}function CancelDeleteTorrent(){$("#DeleteTorrent").html("<font size='2' color='#BEC635'><b>Thông tin Torrent</b></font>")}function SetLock(id){$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"SetLock="+id,dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}function UnLock(id){$("#FileNameDiv").html(loading);$.ajax({type:"GET",url:"detail_ajax.php",data:"UnLock="+id,dataType:'html',success:function(html){$("#FileNameDiv").html(html)}})}
