D7net Mini Sh3LL v1

 
ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0777) :  C:/Domains/maymaytinson.com/httpdocs/lib/js/

 Home   ☍ Command   ☍ Upload File   ☍Info Server   ☍ Buat File   ☍ Mass deface   ☍ Jumping   ☍ Config   ☍ Symlink   ☍ About 

Current File : C:/Domains/maymaytinson.com/httpdocs/lib/js/index.js
$(document).ready(function(){
	$("#typeNewsz").change(function(){
		$("#codeNewsz").hide();
		if($(this).val()=='2'){
		  	$("#codeNewsz").show();
		  }
	})
	$("#selectClassify").change(function(){
		if($(this).val()=='all'){
			window.location="http://www.maymaytinson.com/listProduct.php";
		}
		$('.selectClassify').hide();
		$('.selectClassify').prop("disabled");
		$("#"+$(this).val()).show();
		$("#"+$(this).val()).removeAttr("disabled");
	})
	$("#report").change(function(){
		$(".report").hide();
		$("#report"+$(this).val()).show();
	});
	$("#listFrame").css("height",$(window).height()*70/100+"px");
	$("#listFrame1").css("height",$(window).height()*70/100+"px");
	$("#addFoodBtn").click(function(){
		$("#shadow").show();
		$("#addFood").show();
	});
	$("#online h4").click(function(){
		$("#online div").slideToggle();
	});
	$("#send img").click(function(){
		$("#send .contentSend").slideUp();
		$("#titleSend").hide();
		$("#titleSend1").show();
	});
	$("#titleSend1").click(function(){
		$(this).hide();
		$("#titleSend").show();
		$("#send .contentSend").slideDown();
	})
	//$(function() { $('textarea').froalaEditor() });
	$("#leftInfoProduct").html(function(){
		$("br").remove();
	});
	if($("#leftInfoProduct img").width() > $("#leftInfoProduct").width()){
		$("#leftInfoProduct img").css("width","100%")
	}
	$(".radio").click(function(){
		var method=$(this).val();
		if(method==1){
			$("#infoBank").slideDown();
		}else{
			$("#infoBank").slideUp();
		}
	});
	$(".radio").click(function(){
		var method=$(this).val();
		if(method==1){
			$("#infoBankM").slideDown();
		}else{
			$("#infoBankM").slideUp();
		}
	});
	$(".radio").click(function(){
		var method=$(this).val();
		if(method==1){
			$("#infoBankC").slideDown();
		}else{
			$("#infoBankC").slideUp();
		}
	});
	var widthSlide=$("#slide").width();
	$(".slide").css("height",widthSlide/2.5+"px");
	$("#slide").css("height",widthSlide/2.5+"px");
	var widthDef=$(window).width();
	var check=screen.width
	var fontSize=13;
	if(check>480){
	$( window ).resize(function() {
		var width=$(this).width()
  		var widthNew=width/widthDef*100;
  		var balance=widthNew-100;
  		var newBalance=100-balance;
  		var margin=(widthNew-100)/2;
  		var fontSizeChange=fontSize;
  		fontSizeChange=fontSizeChange-0.5;
  		$("#cart").css("margin-left",24-(margin)+"px");
  		$("a").css("font-size",fontSizeChange+"px");
  		$(".body").css("width","calc("+newBalance+"% - 131px)");
  		$(".body").css("margin","0 calc(50.5px + "+margin+"%)");
  		$("#menuBar").css("margin","0 calc(65.5px + "+margin+"%)");
  		$("#menuBar").css("width","calc("+newBalance+"% - 131px)");
  		$("#show").css("margin","0 calc(65.5px + "+margin+"%)")
  		$("#slide").css("margin","0 calc(50.5px + "+margin+"%)");
  		$("#rightContent #slide").css("margin","0 calc("+margin+"%)");
  		$("#show").css("width","calc("+newBalance+"% - 131px)");
  		$("#support").css("padding","0 calc(65.5px + "+margin+"%)")
  		$("#searchBox").css("width","calc(67% - "+balance+"%)");
  		$("#direct").css("margin","0 calc(65.5px + "+margin+"%)")
  		$("#footer").css("width","calc("+newBalance+"% - 131px)");
  		$("#footer").css("margin","0 calc(65.5px + "+margin+"%)");
  		$("#collection").css("width","calc("+newBalance+"%)");
  		$("#videos").css("width","calc("+newBalance+"%)");
  		$("#videos").css("margin","0 calc("+margin+"%)");
  		$("#collection").css("padding","0 calc(0px + "+margin+"%)")
  		$("#contactTitle").css("padding","0 calc(65.5px + "+margin+"%)")
  		$("#contactContent").css("padding","0 calc(65.5px + "+margin+"%)")
  		$("#news").css("margin","0 calc(65.5px + "+margin+"%)")
  		$("#picture").css("width","calc("+newBalance+"%)");
  		$("#picture").css("margin","0 calc("+margin+"%)");
  		if(widthNew==100){
  			$("#footer").css("width","100%");
  			$("#footer").css("margin","0");
  			$("#menuBar").css("width","100%");
  			$("#menuBar").css("margin","0");
  			$("#direct").css("margin","0")
  			$("a").css("font-size",13+"px");
  		}
  	});
	}
	$("#addPro").change(function(){
		var id=$(this).val();
		$.ajax({
			url:'selectDis.php',
			type: 'GET',
			dataType:'html',
			data: {
				id:id,
			}
		})
		.done(function(dulieu){
			$("#addDis").html(dulieu)
		})
	});
	$("#addProM").change(function(){
		var id=$(this).val();
		$.ajax({
			url:'selectDis.php',
			type: 'GET',
			dataType:'html',
			data: {
				id:id,
			}
		})
		.done(function(dulieu){
			$("#addDisM").html(dulieu)
		})
	});
	function $_GET(parameterName) {
	    var result = null,
	        tmp = [];
	    location.search
	        .substr(1)
	        .split("&")
	        .forEach(function (item) {
	          tmp = item.split("=");
	          if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
	        });
	    return result;
	}
	 
	//$(function() { $('textarea').froalaEditor() });
	$("#lastCheck").click(function(){
		var x=confirm("Bạn thật sự muốn xóa ?");
		if(x){
			return true;
		}else{
			return false;
		}
	})
	var heightLoginZip=$("#zip_login img").height();
	$("#zip_login img").css("margin-top","calc(("+$(window).height()+"px - "+heightLoginZip+"px)/2)");
	$(".deleteFood").click(function(){
		var x=confirm("Bạn thật sự muốn xóa ?");
		if(x){
			return true;
		}else{
			return false;
		}
	})
	var topHeight=$("#adminTop").height();
	var performHeight=$("#adminPerform").height();
	var sumHeight=topHeight+performHeight;
	var bodyHeight=$(window).height()
	var contentHeight=bodyHeight-sumHeight-30;
	$("#list").css("height",contentHeight);
	$("#editOrder").css("height",contentHeight-150);

	var logAdmin=$("#logAdmin").height();
	var menuAdmin=$("#menuAdmin").height();
	var subHeight=menuAdmin-logAdmin;
	var newHeight=subHeight/2
	$("#logAdmin").css("top",newHeight);
	function formatNumber (num) {
	    return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,")
	}
	var url=$(location).attr('pathname')
	var urlAdmin=url;
	url=url.substr(1)
	if(url==''){
	    $(".page:first").css("color","#0168B7");
	}
	$(".page").each(function(){
		var page=$(this).attr("href")
		if(page==url){
			$(this).css("color","#0168B7")
		}
	});
	var pages=$(location).attr('href')
	var startUrl=pages.indexOf("=")
	var present=$_GET('page');
	$("#page").find(".page").each(function(){
		var page=$(this).attr("id").substr(1)
		if(page==present){
			$("#p"+present).prop("class","active");
		}
		if(present==null){
			$("#p1").prop("class","active");
		}
	});
	$("#selectSort").change(function(){
		var sort=$(this).val()
			var urlSort=$(location).attr("href")
			var countUrl=0;
			if(urlSort.indexOf("?")==-1){
				if(countUrl==0){
					urlSort+="?sort="+sort;
					$(location).attr("href",urlSort)
					countUrl++;
				}
			}else{
				if(urlSort.indexOf("sort")==-1){
					urlSort+="&sort="+sort;
					$(location).attr("href",urlSort)
				}else{
					var endSort=urlSort.indexOf("sort")
					urlSort=urlSort.substr(0,endSort)+"sort="+sort;
					$(location).attr("href",urlSort)
					$(this).prop("checked");
				}	
			}
	});
	var startUrlAdmin=urlAdmin.lastIndexOf("/")+1;
	var endUrlAdmin=urlAdmin.lastIndexOf(".")-startUrlAdmin;
	pageAdmin=urlAdmin.substr(startUrlAdmin+4,endUrlAdmin-4)
	$(".menuAdmin").each(function(){
		var idMenuAdmin=$(this).attr("id");
		if(pageAdmin==idMenuAdmin){
			$(this).css("background-color","#efefef");
			$(this).css("color","#0168B7");
			$(this).find(".available").hide();
			$(this).find(".disable").show();
		}
	})
	$(".support").hover(function(){
		$(this).find('img').toggle();
	});
	$(".menu1").hover(function(){
		$(this).find(".subMenu1").stop(true, true).fadeIn(350);
		// $(this).find("a").css("color","#003E97");
		// $(".subMenu1 .menu2 a").css("color","#003E97");
	},function(){
		// $(this).find("a").css("color","#003E97");
		var page=$(".page").attr("href")
		$(".page").each(function(){
			var page=$(this).attr("href")
			if(page==url){
				$(this).css("color","#0168B7")
			}
		});
		$(this).find(".subMenu1").hide();
	});
	$(".menu2").hover(function(){
		$(this).find(".subMenu2").stop(true, true).show(300);
		$(this).find(".menu2").stop(true, true).show('high');
		// $(this).find("a").css("color","#003E97");
		$(".subMenu2 .menu3 a").css("color","#003E97");
	},function(){
		// $(this).find("a").css("color","#003E97");
		$(this).find(".subMenu2").hide();
		$(this).find(".menu2").hide();
	});
	$(".menu3").hover(function(){
		// $(this).find("a").css("color","#0168B7");
	},function(){
		// $(this).find("a").css("color","#003E97");
	});
	$(".icon").hover(function(){
		$(this).find('img').toggle();
	});
	$(".arrow").click(function(){
		$(this).closest("li").find("ul:first").toggle();
		$(this).find('img').toggle();
	});
	// $("#category a").hover(function(){
	// 	$(this).css("color","#0168B7");
	// },function(){
	// 	$(this).css("color","#76767e");
	// });
	// $("#leftInfoProduct img").css("width","100%");
	// $("#leftInfoProduct img").css("height","");
	$("#menuchinh").click(function(){
		$("#shadow").show();
		$("#menuMobile").show();
	});
	$("#shadow").click(function(){
		$("#addFood").hide();
		$("#editFood").hide();
		$("#shadow").hide();
		$("#New").hide();
		$("#newTrademark").hide();
		$("#newType").hide();
		$("#menuMobile").hide();
		$("#payment").hide();
		$("#frameCart").hide();
		$("#error").hide();
	})
	$("#addNew").click(function(){
		$("#New").show();
		$("#shadow").show();
	});
	$("#addNewTrademark").click(function(){
		$("#newTrademark").show();
		$("#shadow").show();
	});
	$("#addNewType").click(function(){
		$("#newType").show();
		$("#shadow").show();
	});
	var pay=0;
	$("#addPay").click(function(){
		$("#payment").show(function(){
			$(".amount").change(function(){
				var amount=$(this).val()
				priceFormat=formatNumber(price*amount);
				$("#"+id).find(".total span").html(priceFormat+" đ");
				$("#total").find(".price").html(priceFormat+ " đ");
				$("#payment #total").find(".price").html(priceFormat+ " đ");
				$("#amountProduct").prop("value",amount);
			});
			$("#comfirmPayment").click(function(){
				var x=confirm("Bạn đã chắc rằng những thông tin trên là chính xác ?");
				if(x){
					return true;
				}else{
					return false;
				}
			})
		});
		$("#shadow").show();
		var id=$("#idProduct").val()
		var image=$("#imageProduct").val()
		var name=$("#nameProduct").val()
		var price=$("#priceProduct").val()
		priceFormat=formatNumber(price)
		if(pay==0){
			$("#addPayment").after('<tr id="'+id+'"><td width="20%"><img src="'+image+'" height="70%" align="center"></td><td width="30%">'+name+'</td><td align="center"><span class="price">'+priceFormat+' đ</span></td><td><input type="number" class="amount" value="1" min="1" max="1000"></td><td class="total" align="right"><span class="price">'+priceFormat+' đ</span></td></tr><tr><td colspan="5" class="gach"><hr></td></tr>');
		}
		$("#total").find(".price").html(priceFormat+" đ");pay++;
		$("#amountProduct").prop("value",pay);
		$("#payment #total").find(".price").html(priceFormat+" đ")
	});
	$("#pay").click(function(){
				var x=confirm("Bạn đã chắc rằng những thông tin trên là chính xác ?");
				if(x){
					return true;
				}else{
					return false;
				}
			});
	$("#addPayMobile").click(function(){
		$("#shadow").show();
		$("#payment").show(function(){
			$(".amount").change(function(){
				var amount=$(this).val()
				priceFormat=formatNumber(price*amount);
				$("#tablePaymentMobile .price").html(priceFormat+" đ");
				$("#"+id).find(".total span").html(priceFormat+" đ");
				$("#payment #total .price").html(priceFormat+ " đ");
				$("#amountProduct").prop("value",amount);
			});
			$("#comfirmPayment").click(function(){
				var x=confirm("Bạn đã chắc rằng những thông tin trên là chính xác ?");
				if(x){
					return true;
				}else{
					return false;
				}
			})
		});
		var id=$("#idProduct").val()
		var image=$("#imageProduct").val()
		var name=$("#nameProduct").val()
		var price=$("#priceProduct").val();
		priceFormat=formatNumber(price)
		if(pay==0){
			$("#contentPayment").after('<table id="tablePaymentMobile" width="100%"><tr><td><img src="'+image+'" align="center"></td></tr><tr><td style="font-size:70px;">'+name+'</td></tr><tr><td><input type="number" class="amount" value="1" min="1" max="1000" style="width:100%;font-size:60px;text-align:center;line-height:80px;height:80px;"></td></tr><tr><td style="text-align:center"><span class="price" style="font-size:60px">'+priceFormat+' đ</span></td></tr></table>');
		}
		$("#total").find(".price").html(priceFormat+" đ");pay++;
		$("#amountProduct").prop("value",pay);
		$("#payment #total").find(".price").html(priceFormat+" đ")
	});
	var cart=0;
	$("#addCart").click(function(){
		$("#shadow").show();
		$("#frameCart").show(function(){
			$(".amount").change(function(){
				var amount=$(this).val()
				priceFormat=formatNumber(price*amount);
				$("#"+id).find(".total span").html(priceFormat+" đ");
				$("#total").find(".price").html(priceFormat+" đ");
				$("#amountProductC").prop("value",amount);
			});
		});
		var id=$("#idProductC").val()
		var image=$("#imageProductC").val()
		var name=$("#nameProductC").val()
		var price=$("#priceProductC").val()
		priceFormat=formatNumber(price)
		if(cart==0){
			$("#addFrameCart").after('<tr id="'+id+'"><td width="20%"><img src="'+image+'" height="70%" align="center"></td><td width="30%">'+name+'</td><td align="center"><span class="price">'+priceFormat+' đ</span></td><td><input type="number" class="amount" value="1" min="1" max="1000"></td><td class="total" align="right"><span class="price">'+priceFormat+' đ</span></td></tr><tr><td colspan="5" class="gach"><hr></td></tr>');
		}
		$("#total").find(".price").html(priceFormat+" đ");
		cart++;$("#amountProductC").prop("value",cart);
	});
	var slideAmount=$("#slideAmount").val()
	var tt=1;
	var ss=2;
	var delay=1000;
	var sumDelay=delay*(slideAmount*1);
	setInterval(function(){
		$("#slide"+(tt+1)).css("left","110%");
		$("#slide"+(tt+1)).show();
		$("#slide"+(tt-2)).hide();
		$("#slide"+tt).animate({left: "-110%"});
		$("#slide"+ss).animate({left: "15px"});
		tt++;ss++;
		if(tt==(slideAmount*1)){
			$("#slide1").css("left","110%");
		}
	},3000)
	setInterval(function(){
		$("#slide1").show();
		$("#slide1").animate({left: "15px"});
		tt=1;ss=2;
	},(3000*(slideAmount*1)))
	$("#next").click(function(){
		if(tt<6){
			$("#slide"+(tt+1)).css("left","110%");
			$("#slide"+(tt+1)).show();
			$("#slide"+(tt-2)).hide();
			$("#slide"+tt).animate({left: "-110%"});
			$("#slide"+ss).animate({left: "15px"});
			tt++;ss++;
		}else{
			tt=1;ss=2;
		}
	});
	$("#changeMail").click(function(){
		$(this).closest("tr").find("input").removeAttr("disabled")
	});
	$("#editTrademark").click(function(){
		var oldValue=$("#trademarkValue").val();
		$(this).closest("tr").find("#editFrameTrademark").html("<input hidden name='oldTrademark' value='"+oldValue+"'><input name='trademark1' value='"+oldValue+"'>");
		$(this).html("Lưu");
		$(this).hide();
		$("#saveTrademark").show();
	});
	$("#editType").click(function(){
		var oldValue=$("#typeValue").val();
		$(this).closest("tr").find("#editFrameType").html("<input hidden name='oldType' value='"+oldValue+"'><input name='type1' value='"+oldValue+"'>");
		$(this).html("Lưu");
		$(this).hide();
		$("#saveType").show();
	});
});

AnonSec - 2021 | Recode By D7net