1$(function () { 2$("body").on("click", "div#booking_section input[data-booking]", function (e) { 3 e.preventDefault(); 4 var $thisbookdiv = $("div#booking_section"); 5 if ( 6 $thisbookdiv.find("select.productselect").val() == "0" || 7 $thisbookdiv.find("input#date_booking").val().length < 2 || 8 $thisbookdiv.find("input#name_booking").val().length < 5 || 9 $thisbookdiv.find("input#email_booking").val().length < 10 10 ) { 11 messagecentre("yel", decodeURIComponent(escape(atob(window.theSetting['databasemessage']))).split('!!')[11]); 12 return false; 13 } 14 var $ProductID = $thisbookdiv.find("select.productselect").val(); 15 var $CartName = btoa( 16 unescape( 17 encodeURIComponent( 18 $thisbookdiv.find("input#name_booking").val().replace(/\'/g, "â") 19 ) 20 ) 21 ); 22 var $CartEmail = btoa( 23 unescape( 24 encodeURIComponent( 25 $thisbookdiv.find("input#email_booking").val().replace(/\'/g, "â") 26 ) 27 ) 28 ); 29 var $CartPhone = btoa(unescape(encodeURIComponent("+90"))); 30 var $AddressArray = ["x", "x", "x", "x", "x"]; 31 var $CartAddress = btoa( 32 unescape(encodeURIComponent($AddressArray.join(",").replace(/\'/g, "â"))) 33 ); 34 var $CartDate = $.format.date(new Date(), "yyyy-MM-dd HH:mm"); 35 var $CartNote = []; 36 $CartNote.push( 37 $thisbookdiv.find("textarea#subject_booking").val().replace(/\'/g, "â") 38 ); 39 $CartNote.push($thisbookdiv.find("input#date_booking").val()); 40 var dataProdClass = []; 41 var selectedOptionValue = [ 42 $thisbookdiv.find("input#date_booking").val(), 43 decodeURIComponent(escape(atob(getformvalues($thisbookdiv)))), 44 ]; 45 var $itemCount = 1; 46 47 $("div.bookform").load( 48 "../webparts/addcart.modal.php", 49 { 50 ProductID: $ProductID, 51 ProdClassID: dataProdClass, 52 BookNote: selectedOptionValue, 53 ItemCount: $itemCount, 54 }, 55 function () { 56 var $thisform = $("div.bookform").find("form"); 57 var $CartID = $thisform.find("input.CartID").val(); 58 var $ProductID = $thisform.find("input.ProductID").val(); 59 var $ItemCount = $thisform.find("input.ItemCount").val(); 60 var $ItemPrice = parseFloat($thisform.find("input.ProductPrice").val()); 61 var $SuccessMessage = $thisform.find("input.SuccessMessage").val(); 62 var $ItemNotes = btoa( 63 unescape( 64 encodeURIComponent( 65 $thisform.find("input.MessageBody").val().replace(/\'/g, "â") 66 ) 67 ) 68 ); 69 var $CartProduct = btoa( 70 unescape( 71 encodeURIComponent( 72 $thisform.find("input.CartProduct").val().replace(/\'/g, "â") 73 ) 74 ) 75 ); 76 $thisform.find("input").attr("disabled", "disabled"); 77 $thisform.find("input").attr("readonly", "readonly"); 78 $thisform.find("textarea").attr("disabled", "disabled"); 79 $thisform.find("textarea").attr("readonly", "readonly"); 80 // console.log($thisform.find("input.CartUpgrade").val().replace(/\'/g, "â")); 81 if (true) { 82 $.post( 83 "../datacontrol/bookingitems.dc.php", 84 { 85 bookingitemsman: "bookingitemsadd", 86 submit: "submit", 87 ItemID: "", 88 CartID: $CartID, 89 ProductID: $ProductID, 90 ItemCount: $ItemCount, 91 ItemPrice: $ItemPrice, 92 ItemNotes: $ItemNotes, 93 ItemImage: $CartProduct, 94 ItemStatus: 1, 95 }, 96 function (data, status) { 97 console.log(data); 98 if (status == "success") { 99 var $ardata = JSON.parse(data); 100 if ($ardata[0].substring(0, 2) == "--") { 101 var itemcats = $thisform 102 .find("input.CategoryName") 103 .val() 104 .split(","); 105 try { 106 dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. 107 dataLayer.push({ 108 event: "add_to_cart", 109 ecommerce: { 110 currency: decodeURIComponent( 111 escape(atob($("body").data("currency"))) 112 ).split(";;")[0], 113 value: $ItemPrice * $itemCount, 114 items: [ 115 { 116 item_id: $ProductID, 117 item_name: $thisform 118 .find("input.MessageSubject") 119 .val(), 120 affiliation: $("html title").text(), 121 coupon: "NOKOPON", 122 discount: 0, 123 index: 0, 124 item_brand: $thisform 125 .find("input.MessageSubject") 126 .val(), 127 item_category: itemcats[0], 128 item_category2: 129 itemcats.length > 1 ? itemcats[1] : "", 130 item_category3: 131 itemcats.length > 2 ? itemcats[2] : "", 132 item_category4: "", 133 item_category5: "", 134 item_list_id: "feature_products", 135 item_list_name: "Feature Products", 136 item_variant: selectedOptionValue.join("-"), 137 location_id: "", 138 price: $ItemPrice, 139 quantity: $itemCount, 140 }, 141 ], 142 }, 143 }); 144 } catch (error) {} 145 var icon = "green"; 146 var datamsg = $ardata[0].substring(2); 147 $.post( 148 "../datacontrol/bookingcart.dc.php", 149 { 150 bookingcartman: "bookingcartedit", 151 submit: "submit", 152 CartID: $CartID, 153 CartName: $CartName, 154 CartPhone: $CartPhone, 155 CartEmail: $CartEmail, 156 CartAddress: $CartAddress, 157 CartDate: $CartDate, 158 CartNote: btoa( 159 unescape(encodeURIComponent($CartNote.join(" - "))) 160 ), 161 CartStatus: 2, 162 }, 163 function (data, status) { 164 console.log(data); 165 if (status == "success") { 166 var $ardata = JSON.parse(data); 167 if ($ardata[0].substring(0, 2) == "--") { 168 // prepCartItems(); 169 try { 170 dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object. 171 dataLayer.push({ 172 event: "purchase", 173 ecommerce: { 174 transaction_id: "ORDER-" + pad($CartID, 5), 175 // Sum of (price * quantity) for all items. 176 value: parseFloat( 177 $( 178 "body div.shopping-cart-area div.shopping-cart div.tab-content div#shopping-cart table.total-cart tr.total-cart td.total-cart" 179 ).attr("data-totalcart") 180 ), 181 tax: 0, 182 shipping: 0,
183 currency: decodeURIComponent(escape(atob(window.theSetting['sitecurrency']))).split('!!')[0], 184 coupon: $( 185 "body div.shopping-cart-area div.shopping-cart div.tab-content div#shopping-cart table.total-cart tr.couponcode td.couponcode" 186 ).attr("data-couponcode"), 187 items: cartItemList, 188 }, 189 }); 190 } catch (error) {} 191 var icon = "green"; 192 var datamsg = $ardata[0].substring(2); 193 $("body").attr("data-cartid", $ardata[1]); 194 Swal.fire({ 195 title: decodeURIComponent( 196 escape( 197 atob( 198 $thisform 199 .find("input.CartSuccess") 200 .attr("data-head") 201 ) 202 ) 203 ).replace("%s", pad($ardata[1], 5)), 204 text: decodeURIComponent( 205 escape( 206 atob( 207 $thisform 208 .find("input.CartSuccess") 209 .attr("data-title") 210 ) 211 ) 212 ), 213 icon: "success", 214 showDenyButton: false, 215 allowEscapeKey: false, 216 allowOutsideClick: false, 217 denyButtonColor: "#12C6CD80", 218 denyButtonText: 219 '<i class="fal fa-file-pdf"></i> ' + 220 txtLang( 221 "Download Reservation", 222 "تØÙ ÙÙ Ù ÙÙ Ø§ÙØ·Ùب", 223 "indir" 224 ), 225 }).then((result) => { 226 if (result.isConfirmed) { 227 $.post( 228 "../include/email.template.php", 229 { 230 emailCont: { 231 CartID: $ardata[1], 232 }, 233 }, 234 function (data) {} 235 ); 236 window.location = "../thankyou/"; 237 } else if (result.isDenied) { 238 $.post( 239 "../include/email.template.php", 240 { 241 emailCont: { 242 CartID: $ardata[1], 243 }, 244 }, 245 function (data) {} 246 ); 247 let pdfwin; 248 pdfwin = window.open( 249 "../include/pdf.template.php?emailCont[CartID]=" + 250 $ardata[1], 251 "_blank" 252 ); 253 setTimeout(() => { 254 pdfwin.close(); 255 window.location = "../thankyou/"; 256 }, 10000); 257 } 258 }); 259 } else { 260 if ($ardata[0].substring(0, 2) == "++") { 261 var icon = "yel"; 262 var datamsg = $ardata[0].substring(2); 263 } else { 264 var icon = "red"; 265 var datamsg = $ardata[0]; 266 } 267 messagecentre(icon, datamsg); 268 } 269 // 270 } 271 } 272 ); 273 } else { 274 if ($ardata[0].substring(0, 2) == "++") { 275 var icon = "yel"; 276 var datamsg = $ardata[0].substring(2); 277 messagecentre(icon, datamsg); 278 } else { 279 Swal.fire({ 280 title: decodeURIComponent( 281 escape( 282 atob($thisform.find("input.CartFail").attr("data-head")) 283 ) 284 ).replace("%s", pad($ardata[1], 5)), 285 text: decodeURIComponent( 286 escape( 287 atob( 288 $thisform.find("input.CartFail").attr("data-title") 289 ) 290 ) 291 ), 292 icon: "error",
293 showDenyButton: false, 294 allowEscapeKey: false, 295 allowOutsideClick: false, 296 }); 297 } 298 } 299 // 300 } 301 } 302 ); 303 } 304 } 305 ); 306}); 307});
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.