1$(document).ready(function () { 2 3 4 client_id=getCookie("customer_id"); 5 var customer_id = $('#customer_id').val(); 6 7 if(customer_id=="") 8 { 9 $(".signin_div").removeClass( "hide" ); 10 $(".profile_div").addClass( "hide" ); 11 } 12 13 if(client_id != 0 || client_id != null) 14 { 15 $.post('set_session.php',{user_id:client_id},function(data) 16 { 17 var result = $.parseJSON(data); 18 customer_id= result[0]; 19 customer_name= result[1]; 20 bonus_wallet= result[2]; 21 22 //alert(bonus_wallet) 23 if(customer_id>0) 24 { 25 $(".profile_div").removeClass( "hide" ); 26 $(".signin_div").addClass( "hide" ); 27 $('#profile_name').html(customer_name); 28 $('#profile_bonus').text(bonus_wallet+" â¬"); 29 } 30 else 31 { 32 $(".signin_div").removeClass( "hide" ); 33 $(".profile_div").addClass( "hide" ); 34 } 35 36 37 }) 38 } 39 40 $("#logout_user").on("click", function() { 41 $.post('unset_session.php',function(data){ 42 removeCookie("customer_id"); 43 location.reload(); 44 }) 45 }); 46 47 48 49 50 var cart_order_id=getCookie("sesstion_order_id"); 51 if(cart_order_id !=null && cart_order_id !="") 52 { 53 54 $.post("get_card_count.php",{order_id:cart_order_id,view:'card_count'},function(data){ 55 var dt=$.trim(data); 56 if(dt == 0) 57 { 58 if(from == "checkout") 59 { 60 location.href = 'menu.php'; 61 } 62 $.post("get_card_count.php",{order_id:cart_order_id,view:'checkorderid'},function(data){ 63 var dth=$.trim(data); 64 if(dth == 0) 65 { 66 removeCookie("sesstion_order_id"); 67 } 68 }); 69 } 70 else 71 { 72 $('.show_card_sec').removeClass('hide'); 73 $('.basket-item-count').html(dt); 74 load_cart_item_details(); 75 } 76 77 }); 78 79 } 80 81 82}); 83 84function cart_count() 85{ //var cart_order_id=getCookie("sesstion_order_id"); 86var cart_order_id=getCookie("sesstion_order_id"); 87//alert(cart_order_id) 88if(cart_order_id !=null && cart_order_id !="") 89{ 90 //alert(cart_order_id); 91$.post("get_card_count.php",{order_id:cart_order_id,view:'card_count'},function(data){ 92 //alert(data+'-pp') 93$('.show_card_sec').removeClass('hide'); 94$('.basket-item-count').html(data); 95load_cart_item_details(); 96}); 97 98} 99} 100 101function setCookie(cname, cvalue, exdays) { 102 var exdate = new Date(); 103 exdate.setDate(exdate.getDate() + exdays); 104 if(typeof localStorage != "undefined") 105 { 106 localStorage.setItem(cname, cvalue); 107 } 108 else 109 { 110 111 } 112 113} 114function getCookie(cname) { 115 116 if(typeof localStorage != "undefined") 117 { 118 return localStorage.getItem(cname); 119 } 120 else 121 { 122 123 return ""; 124 } 125 126} 127function removeCookie(cname) 128{ 129 localStorage.removeItem(cname); 130}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.