PageSourceSearch

https://www.allirafontana.com/sy-inc/store/manage.packages.js?63e757b7101fe8890971a7c69d734263b

js allirafontana.com collected 2026-10-05 21:56:21 UTC 29,150 bytes, 849 lines download raw bytes

1function adjustphotodisplayheightformanagepackage() { 
2	// $("#log").show().append("display: "+$("#viewimagemanagepackage").css("display")+"   lenngth: "+$("#mainpackagecontainer").length+" <br>");
3	if($("#mainpackagecontainer").length > 0) { 
4		// if($("#vinfo").attr("data-view-photo-height-adjusted") != "1") { 
5		$("#vinfo").attr("data-view-photo-height-adjusted",'1');
6			// alert($("#viewimagemanagepackage").length);
7				mainpackagecontainerheight = Math.round($("#mainpackagecontainer").height()) - 8;
8				/* 
9				photoviewactionsheight = $("#thephotocontainer").outerHeight(true);
10				photoviewnameclose = $("#thephotocontainer").offset().top;
11				newheight = Math.round(photoviewactionsheight - mainpackagecontainerheight - 4);
12				*/
13				//  $("#log").show().append(" "+photoviewactionsheight+" - "+photoviewnameclose+" "+newheight+"<br>");
14	
15		
16		
17				carttab = $("#managepackagecarttab").height();
18				gsbottom = Math.round($("#mainpackagecontainer").height() - carttab);
19				$("#selectgsbackground").css({"bottom": gsbottom+"px"});
20		
21		
22		
23		ww = $(window).width();
24		if(ww < 1024) { 
25				$(document.body).append('<style>.thephotocontainer { height: 50VH !important; } </style>');
26				$(".thephotocontainer").css({"height":"50VH"});
27		} else { 
28				$(document.body).append('<style>.thephotocontainer { height: 60VH !important; } </style>');
29				$(".thephotocontainer").css({"height":"60VH"});
30
31		}
32	//	}
33	} else { 
34		ww = $(window).width();
35		if(ww < 1024) { 
36			$(document.body).append('<style>.thephotocontainer { height: 60VH !important; } </style>');
37			$(".thephotocontainer").css({"height":"60VH"});
38		} else { 
39			$(document.body).append('<style>.thephotocontainer { height: 70VH !important; } </style>');
40			$(".thephotocontainer").css({"height":"70VH"});
41		}
42	}
43	pic_key = $("#vinfo").attr("data-pic-key");
44	
45	if($("#vinfo").attr("data-scd") > 1) { 
46		checkforscreenshotblur(pic_key);
47	}
48	
49}
50
51function addphototopackageitemclick(cart_id,prod_id,cart_package_photo,package_limit) { 
52	pic_key = $("#vinfo").attr("data-pic-key");
53	color_id = $("#filter").attr("color_id");
54	sub_id = $("#photoview-"+pic_key).attr("data-sub-id");
55	date_id = $("#photoview-"+pic_key).attr("data-date-id");
56	cart_photo_bg = $("#gs-bgimage-id").val();
57
58	qty = 1;
59
60	if($("#package-item-"+cart_id).attr("data-has-image") == "1") { 
61		return false;
62	}
63
64	if(pic_key == "") { 
65		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
66	} else { 
67		$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=addPackageItem&cart_id="+cart_id+"&pic_key="+pic_key+"&date_id="+date_id+"&qty="+qty+"&color_id="+color_id+"&photo_prod="+prod_id+"&cart_package_photo="+cart_package_photo+"&singleclick=1&package_limit="+package_limit+"&sub_id="+sub_id+"&cart_photo_bg="+cart_photo_bg, function(data) {	
68
69			thisdata = data.split("||");
70
71
72			if(thisdata[0] == "ERROR") { 
73				managepackageshowerrormessage(thisdata[1]);
74
75
76			} else { 
77				thisdata[1].split(",").forEach(function (cart_id) {
78					$("#package-item-"+cart_id).css({"background-image":"url('"+thisdata[2]+"')","background-size":"contain","background-position":"center center", "width":thisdata[3]+"px"});
79				//	closemanagepackageproduct();
80					$("#deletepackageitemicon-"+cart_id).show();
81					$("#package-item-"+cart_id).attr("data-has-image","1");
82					$("#package-item-"+cart_id).attr("data-pic-id",thisdata[4]);
83
84				});
85
86				// getpackagestats(cart_package_photo);
87
88
89				$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=getPackageStats&cart_id="+cart_package_photo, function(data) {	
90					thisdata = data.split("||");
91					$("#packagestats-"+cart_package_photo).html(thisdata[0]);
92					if(thisdata[1] == "COMPLETE") { 
93						if($("#packagecompletehtml-"+cart_package_photo).attr("data-show-addons") == "1") { 
94							managePackageExtraPhotos(cart_package_photo);
95						} else { 
96							message = $("#packagecompletehtml-"+cart_package_photo).html();
97							$("#packagemessagebg").fadeIn(50);
98							managepackageshowmessage(message);
99						}
100					} else { 
101						managepackageshownotice($("#mainpackagecontainer").attr("data_photo_added_to_package_"));
102					}
103				});
104			}
105		});
106	}
107}
108
109
110
111
112
113
114
115
116function addextraphototocart() { 
117	stop_process = false;
118	var fields = {};
119	fields['action'] = "addExtraPhotoToCart";
120	fields['cart_id'] = $("#package-cart-id").val();
121	fields['pic_key'] = $("#package-photo-pic-key").val();
122	fields['color_id'] = $("#filter").attr("color_id");
123	fields['sub_id'] = $("#photoview-"+$("#package-photo-pic-key").val()).attr("data-sub-id");
124	fields['date_id'] = $("#photoview-"+$("#package-photo-pic-key").val()).attr("data-date-id");
125
126	fields['qty'] = $("#package-photo-qty").val();
127	fields['cart_package_photo'] = $("#package-photo-package-cart-id").val();
128	fields['photo_prod'] = $("#package-photo-prod-id").val();
129	fields['list_id'] = $("#package-photo-list-id").val();
130	fields['cart_photo_bg'] = $("#gs-bgimage-id").val();
131
132	cart_id = $("#package-cart-id").val();
133	cart_package_photo = $("#package-photo-package-cart-id").val();
134
135	$("#managepackagerequiredfieldserror").hide();
136
137
138	$('.packageimageoption').each(function(){
139		var $this = $(this);
140		if( $this.attr('type') == "radio") { 
141			if($this.attr("checked")) { 
142				fields[$this.attr('name')] = $this.val(); 
143	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
144			}
145		} else if($this.attr('type') == "checkbox") { 
146			if($this.attr("checked")) { 
147				fields[$this.attr('name')] = $this.val(); 
148				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
149			}
150
151		} else { 
152			fields[$this.attr('name')] = $this.val(); 
153		//	alert($this.attr('name') +" = "+ $this.val() );
154		}
155	});
156	$('.packageproductoption').each(function(){
157		var $this = $(this);
158		$this.removeClass("inputError");
159
160		if( $this.attr('type') == "radio") { 
161			if($this.attr("checked")) { 
162				fields[$this.attr('name')] = $this.val(); 
163	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
164			}
165		} else if($this.attr('type') == "checkbox") { 
166			if($this.attr("checked")) { 
167				fields[$this.attr('name')] = $this.val(); 
168				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
169			}
170
171		} else { 
172
173			if($this.hasClass("required")) { 
174				if($this.val() == "") { 
175					$this.addClass("inputError");
176					stop_process = true;
177					// $("#log").show().append($this.attr('name')+" is required");
178				}
179			}
180
181			fields[$this.attr('name')] = $this.val(); 
182		//	alert($this.attr('name') +" = "+ $this.val() );
183		}
184	});
185
186
187	if(stop_process == true) { 
188		$("#managepackagerequiredfieldserror").slideDown(100);
189	} else if($("#package-photo-pic-key").val() == "") { 
190		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
191	} else { 
192
193		$("#addphototopackageloading").show();
194		$("#addphototopackagebutton").hide();
195
196		$.post(tempfolder+'/sy-inc/store/store_manage_package.php', fields,	function (data) { 
197			cart_id = $("#package-cart-id").val();
198			thisdata = data.split("||");
199
200			date_id = $("#vinfo").attr('did');
201			list_id = ''+$("#list_id").val()+'';
202
203			$.get(tempfolder+"/sy-inc/store/store_manage_package_items.php?date_id="+date_id+"&list_id="+list_id, function(data) {	
204				$("#viewimagemanagepackage").html(data).show();
205				$('#packagecontainer').animate({scrollLeft: $('#package-item-'+cart_id).position().left}, 500);
206				setTimeout(function() { 
207					managePackageExtraPhotos(cart_id); 
208				}, 100);
209				// closemanagepackageproduct();
210				managepackageshownotice($("#mainpackagecontainer").attr("data_photo_added_to_package_"));
211				getpackagestats(cart_package_photo);
212		});
213
214
215		});
216	}
217}
218
219
220
221
222
223function addextraphototocartpreorder() { 
224	stop_process = false;
225	var fields = {};
226	fields['action'] = "addExtraPhotoToCartPreOrder";
227	fields['cart_id'] = $("#package-cart-id").val();
228
229	fields['date_id'] = $("#vinfo").attr("did");
230	fields['qty'] = $("#package-photo-qty").val();
231	fields['cart_package_photo'] = $("#package-photo-package-cart-id").val();
232	fields['photo_prod'] = $("#package-photo-prod-id").val();
233	fields['list_id'] = $("#package-photo-list-id").val();
234	fields['cart_photo_bg'] = $("#gs-bgimage-id").val();
235	fields['reg_key'] = $("#regid").val();
236
237	cart_id = $("#package-cart-id").val();
238	cart_package_photo = $("#package-photo-package-cart-id").val();
239
240	$("#managepackagerequiredfieldserror").hide();
241
242
243	$('.packageimageoption').each(function(){
244		var $this = $(this);
245		if( $this.attr('type') == "radio") { 
246			if($this.attr("checked")) { 
247				fields[$this.attr('name')] = $this.val(); 
248	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
249			}
250		} else if($this.attr('type') == "checkbox") { 
251			if($this.attr("checked")) { 
252				fields[$this.attr('name')] = $this.val(); 
253				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
254			}
255
256		} else { 
257			fields[$this.attr('name')] = $this.val(); 
258		//	alert($this.attr('name') +" = "+ $this.val() );
259		}
260	});
261	$('.packageproductoption').each(function(){
262		var $this = $(this);
263		$this.removeClass("inputError");
264
265		if( $this.attr('type') == "radio") { 
266			if($this.attr("checked")) { 
267				fields[$this.attr('name')] = $this.val(); 
268	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
269			}
270		} else if($this.attr('type') == "checkbox") { 
271			if($this.attr("checked")) { 
272				fields[$this.attr('name')] = $this.val(); 
273				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
274			}
275
276		} else { 
277
278			if($this.hasClass("required")) { 
279				if($this.val() == "") { 
280					$this.addClass("inputError");
281					stop_process = true;
282					// $("#log").show().append($this.attr('name')+" is required");
283				}
284			}
285
286			fields[$this.attr('name')] = $this.val(); 
287		//	alert($this.attr('name') +" = "+ $this.val() );
288		}
289	});
290
291
292	if(stop_process == true) { 
293		alert("requiredfields");
294		$("#managepackagerequiredfieldserror").slideDown(100);
295	} else { 
296
297		$("#addphototopackageloading").show();
298		$("#addphototopackagebutton").hide();
299
300		$.post(tempfolder+'/sy-inc/store/store_manage_package.php', fields,	function (data) { 
301			cart_id = $("#package-cart-id").val();
302			thisdata = data.split("||");
303
304			date_id = $("#vinfo").attr('did');
305			list_id = ''+$("#list_id").val()+'';
306
307			preOrderManagePackageExtraPhotos(cart_id); 
308			/*
309			$.get(tempfolder+"/sy-inc/store/store_manage_package_items_pre_order.php?date_id="+date_id+"&list_id="+list_id, function(data) {	
310				$("#viewimagemanagepackage").html(data).show();
311				$('#packagecontainer').animate({scrollLeft: $('#package-item-'+cart_id).position().left}, 500);
312				setTimeout(function() { 
313				//	preOrderManagePackageExtraPhotos(cart_id); 
314				}, 100);
315				// closemanagepackageproduct();
316				managepackageshownotice($("#mainpackagecontainer").attr("data_photo_added_to_package_"));
317				getpackagestats(cart_package_photo);
318			});
319		*/
320
321		});
322	}
323}
324
325
326function addphototopackageitem() { 
327	stop_process = false;
328	var fields = {};
329	fields['action'] = "addPackageItem";
330	fields['cart_id'] = $("#package-photo-cart-id").val();
331	fields['pic_key'] = $("#package-photo-pic-key").val();
332	fields['color_id'] = $("#filter").attr("color_id");
333	fields['sub_id'] = $("#photoview-"+$("#package-photo-pic-key").val()).attr("data-sub-id");
334	fields['date_id'] = $("#photoview-"+$("#package-photo-pic-key").val()).attr("data-date-id");
335
336	fields['qty'] = $("#package-photo-qty").val();
337	fields['cart_package_photo'] = $("#package-photo-package-cart-id").val();
338	fields['photo_prod'] = $("#package-photo-photo-prod").val();
339	fields['list_id'] = $("#package-photo-list-id").val();
340	fields['cart_photo_bg'] = $("#gs-bgimage-id").val();
341	cart_id = $("#package-photo-cart-id").val();
342	cart_package_photo = $("#package-photo-package-cart-id").val();
343
344	$("#managepackagerequiredfieldserror").hide();
345
346
347	$('.packageimageoption').each(function(){
348		var $this = $(this);
349		if( $this.attr('type') == "radio") { 
350			if($this.attr("checked")) { 
351				fields[$this.attr('name')] = $this.val(); 
352	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
353			}
354		} else if($this.attr('type') == "checkbox") { 
355			if($this.attr("checked")) { 
356				fields[$this.attr('name')] = $this.val(); 
357				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
358			}
359
360		} else { 
361			fields[$this.attr('name')] = $this.val(); 
362		//	alert($this.attr('name') +" = "+ $this.val() );
363		}
364	});
365	$('.packageproductoption').each(function(){
366		var $this = $(this);
367		$this.removeClass("inputError");
368
369		if( $this.attr('type') == "radio") { 
370			if($this.attr("checked")) { 
371				fields[$this.attr('name')] = $this.val(); 
372	//				alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
373			}
374		} else if($this.attr('type') == "checkbox") { 
375			if($this.attr("checked")) { 
376				fields[$this.attr('name')] = $this.val(); 
377				// alert($this.attr('name')+': '+ $this.attr('type')+' CHECKED- '+$this.val());
378			}
379
380		} else { 
381
382			if($this.hasClass("required")) { 
383				if($this.val() == "") { 
384					$this.addClass("inputError");
385					stop_process = true;
386					// $("#log").show().append($this.attr('name')+" is required");
387				}
388			}
389
390			fields[$this.attr('name')] = $this.val(); 
391		//	alert($this.attr('name') +" = "+ $this.val() );
392		}
393	});
394
395
396	if(stop_process == true) { 
397		$("#managepackagerequiredfieldserror").slideDown(100);
398	} else if($("#package-photo-pic-key").val() == "") { 
399		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
400	} else { 
401
402		$("#addphototopackageloading").show();
403		$("#addphototopackagebutton").hide();
404
405		$.post(tempfolder+'/sy-inc/store/store_manage_package.php', fields,	function (data) { 
406			thisdata = data.split("||");
407			thisdata[1].split(",").forEach(function (cart_id) {
408				$("#package-item-"+cart_id).attr("data-has-image","1");
409				$("#package-item-"+cart_id).attr("data-pic-id",thisdata[4]);
410
411				$("#package-item-"+cart_id).css({"background-image":"url('"+thisdata[2]+"')","background-size":"contain","background-position":"center center", "width":thisdata[3]+"px"});
412				$("#deletepackageitemicon-"+cart_id).show();
413				$('html, body').animate({
414					scrollTop: 0
415				}, 200);	
416				updateCartMenu();
417
418			});
419			// $("#package-item-"+cart_id).css({"background-image":"url('"+thisdata[2]+"')","background-size":"contain","background-position":"center center", "width":thisdata[3]+"px"});
420			closemanagepackageproduct();
421			managepackageshownotice($("#mainpackagecontainer").attr("data_photo_added_to_package_"));
422
423				$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=getPackageStats&cart_id="+cart_package_photo, function(data) {	
424					thisdata = data.split("||");
425					$("#packagestats-"+cart_package_photo).html(thisdata[0]);
426					if(thisdata[1] == "COMPLETE") { 
427						if($("#packagecompletehtml-"+cart_package_photo).attr("data-show-addons") == "1") { 
428							setTimeout(function() { 
429								managePackageExtraPhotos(cart_package_photo);
430							}, 300);
431						} else { 
432
433							message = $("#packagecompletehtml-"+cart_package_photo).html();
434							$("#packagemessagebg").fadeIn(50);
435							managepackageshowmessage(message);
436						}
437					} else { 
438						managepackageshownotice($("#mainpackagecontainer").attr("data_photo_added_to_package_"));
439					}
440				});
441
442		});
443	}
444}
445function getpackagestats(cart_id) { 
446	$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=getPackageStats&cart_id="+cart_id, function(data) {	
447		thisdata = data.split("||");
448		$("#packagestats-"+cart_id).html(thisdata[0]);
449
450	});
451
452
453}
454 
455function managepackageproduct(cart_id) { 
456	if($("#package-item-"+cart_id).attr("data-has-image") == "1") { 
457		return false;
458	}
459
460	if($("#selectgsbackground").length > 0) { 
461		gsbottom = 12;
462	} else { 
463		gsbottom = 0;
464	}
465
466	newbottom = Math.round($("#mainpackagecontainer"
466).height()) + 8 + gsbottom;
467	// $("#log").show().append(newbottom+"<br>");
468	$('html, body').animate({
469		scrollTop: 0
470	}, 100);	
471
472
473	pic_id = $("#vinfo").attr("data-pic-key");
474	sub_id = $("#photoview-"+pic_id).attr("data-sub-id");
475	did = $("#photoview-"+pic_id).attr("data-date-id");
476	cart_photo_bg = $("#gs-bgimage-id").val();
477
478
479	if(pic_id == "") { 
480		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
481	} else { 
482		$("#packageitemwindowbg").show();
483
484		$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=managePackageItem&cart_id="+cart_id+"&pic_id="+pic_id+"&did="+did+"&sub_id="+sub_id+"&cart_photo_bg="+cart_photo_bg, function(data) {	
485			$("#packageitemcontent").html(data);
486			$("#packageitemwindow").css({"bottom":newbottom+"px", "top":"auto"}).fadeIn(100);
487
488			packagewindowtop = $("#packageitemwindow").offset().top;
489			if(packagewindowtop < 0) { 
490				$("#packageitemwindow").css({"bottom":"auto","top":"8px"});
491			} else { 
492				$("#packageitemwindow").css({"top":"auto"});
493			}
494			// $("#log").show().append(packagewindowtop+"<br>");
495
496		});
497	}
498}
499
500function managePackageExtraPhotos(cart_id) { 
501	if($("#selectgsbackground").length > 0) { 
502		gsbottom = 12;
503	} else { 
504		gsbottom = 0;
505	}
506	managepackagecancelmessage();
507	newbottom = Math.round($("#mainpackagecontainer").height()) + 8 + gsbottom;
508	// $("#log").show().append(newbottom+"<br>");
509	$('html, body').animate({
510		scrollTop: 0
511	}, 100);	
512
513
514	pic_id = $("#vinfo").attr("data-pic-key");
515	sub_id = $("#photoview-"+pic_id).attr("data-sub-id");
516	did = $("#photoview-"+pic_id).attr("data-date-id");
517
518
519	if(pic_id == "") { 
520		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
521	} else { 
522		$("#packageitemwindowbg").show();
523
524		$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=managePackageExtraPhotos&cart_id="+cart_id+"&pic_id="+pic_id+"&did="+did+"&sub_id="+sub_id, function(data) {	
525			$("#packageitemcontent").html(data);
526			$("#packageitemwindow").css({"bottom":newbottom+"px", "top":"auto"}).fadeIn(100);
527
528			packagewindowtop = $("#packageitemwindow").offset().top;
529			if(packagewindowtop < 0) { 
530				$("#packageitemwindow").css({"bottom":"auto","top":"8px"});
531			} else { 
532				$("#packageitemwindow").css({"top":"auto"});
533			}
534			// $("#log").show().append(packagewindowtop+"<br>");
535
536		});
537	}
538}
539
540function managePackageExtraPhotoProduct(prod_id,package_cart_id) { 
541
542	newbottom = Math.round($("#mainpackagecontainer").height()) + 8;
543	// $("#log").show().append(newbottom+"<br>");
544	$('html, body').animate({
545		scrollTop: 0
546	}, 100);	
547
548
549	pic_id = $("#vinfo").attr("data-pic-key");
550	sub_id = $("#photoview-"+pic_id).attr("data-sub-id");
551	did = $("#photoview-"+pic_id).attr("data-date-id");
552
553
554	if(pic_id == "") { 
555		managepackageshowerrormessage($("#mainpackagecontainer").attr("data-no-photo-selected"));
556	} else { 
557		$("#packageitemwindowbg").show();
558
559		$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=managePackageExtraPhotoProduct&cart_id="+package_cart_id+"&pic_id="+pic_id+"&did="+did+"&sub_id="+sub_id+"&prod_id="+prod_id, function(data) {	
560			$("#packageitemcontent").html(data);
561			$("#packageitemwindow").css({"bottom":newbottom+"px", "top":"auto"}).fadeIn(100);
562
563			packagewindowtop = $("#packageitemwindow").offset().top;
564			if(packagewindowtop < 0) { 
565				$("#packageitemwindow").css({"bottom":"auto","top":"8px"});
566			} else { 
567				$("#packageitemwindow").css({"top":"auto"});
568			}
569			// $("#log").show().append(packagewindowtop+"<br>");
570
571		});
572	}
573
574}
575
576
577function closemanagepackageproduct() { 
578	$("#packageitemwindow").fadeOut(100);
579	setTimeout(function() { 
580		$("#packageitemwindowbg").fadeOut(100);
581	}, 100);
582}
583function removephotofrompackageitemconfirm(cart_id) { 
584	closemanagepackageproduct();
585	pic_id = $("#package-item-"+cart_id).attr("data-pic-id");
586	cart_package_photo = $("#package-item-"+cart_id).attr("data-cart-package-photo");
587	package_limit = $("#package-item-"+cart_id).attr("data-package-limit");
588
589	var piccount = 0;
590	  $(".availableproduct").each(function() {
591			if($(this).attr("data-pic-id") == pic_id && $(this).attr("data-cart-package-photo") == cart_package_photo) { 
592				piccount++;
593			}
594	  });
595	  
596	if(package_limit == "1") { 
597		$(".deletepackageitemallphotoscheckbox").attr("checked",false);
598		$(".deletepackageitemallphotos").hide();
599	} else { 
600		  if(piccount > 1) { 
601			  $(".deletepackageitemallphotos").show();
602		  } else { 
603			  $(".deletepackageitemallphotos").hide();
604		  }
605	}
606	// $("#log").show().append(piccount+"<br>");
607
608	message = $("#deletepackageitemhtml-"+cart_id).html();
609	$("#packagemessagebg").fadeIn(50);
610	managepackageshowmessage(message);
611
612}
613
614
615
616
617function deleteextraphoto(cart_id,cart_package_photo) { 
618
619	$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=deleteExtraPhoto&cart_id="+cart_id, function(data) {	
620		date_id = $("#vinfo").attr('did');
621		list_id = ''+$("#list_id").val()+'';
622		$.get(tempfolder+"/sy-inc/store/store_manage_package_items.php?date_id="+date_id+"&list_id="+list_id, function(data) {	
623			$("#viewimagemanagepackage").html(data).show();
624			$('#packagecontainer').animate({scrollLeft: $('#package-item-'+cart_package_photo).position().left}, 500);
625			closemanagepackageproduct();
626			setTimeout(function() { 
627				managepackageshownotice($("#mainpackagecontainer").attr("data_photo_removed_from_package_"));
628			}, 100);
629
630		});
631
632	});
633
634}
635
636
637function removephotofrompackageitem(cart_id,cart_package_photo) { 
638	pic_id = $("#package-item-"+cart_id).attr("data-pic-id");
639	cart_package_photo = $("#package-item-"+cart_id).attr("data-cart-package-photo");
640	var cart_ids = "";
641	var piccount = 0;
642	$(".availableproduct").each(function() {
643		if($(this).attr("data-pic-id") == pic_id && $(this).attr("data-cart-package-photo") == cart_package_photo) { 
644			piccount++;
645			if(piccount == 1) { 
646				cart_ids = $(this).attr("data-cart-id");
647			} else { 
648				cart_ids = cart_ids+","+$(this).attr("data-cart-id");
649			}
650		}
651	});
652	if($("#deletepackageitemallphotos-"+cart_id).attr("checked")) { 
653		var removeallphotos = 1;
654	} else { 
655		var removeallphotos = 0;
656	}
657
658	// $("#log").show().append("remove all photos: "+removeallphotos+" "+" cart_ids: "+cart_ids+"<br>");
659
660	$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=removePhotoFromPackageItem&cart_id="+cart_id+"&removeallphotos="+removeallphotos, function(data) {	
661
662		thisdata = data.split("||");
663		thisdata[0].split(",").forEach(function (this_cart_id) {
664			// $("#log").show().append(this_cart_id+"<br>");
665			if($("#package-item-"+this_cart_id).attr("data-cart-extra-photo") > 0) { 
666				$("#package-item-"+this_cart_id).remove();
667			} else { 
668				$("#package-item-"+this_cart_id).css({"background-image":"url("+$("#mainpackagecontainer").attr("data-blank-item-graphic")+"","background-size":"contain","background-position":"center center", "width":"80px"});
669				$("#deletepackageitemicon-"+this_cart_id).hide();
670				$("#package-item-"+this_cart_id).attr("data-has-image","0");
671				$("#package-item-"+this_cart_id).attr("data-pic-id","");
672			}
673		});
674		getpackagestats(cart_package_photo);
675		updateCartMenu();
676		managepackageshownotice($("#mainpackagecontainer").attr("data_photo_removed_from_package_"));
677	$("#packagemessagebg").fadeOut(50);
678
679
680	});
681}
682function managepackagedeletepackage(cart_id) { 
683	closemanagepackageproduct();
684	message = $("#deletepackageconfirmhtml-"+cart_id).html();
685	$("#packagemessagebg").fadeIn(50);
686
687	managepackageshowmessage(message)
688}
689
690function managepackagedeletepackageconfirm(cart_id) { 
691	$.get(tempfolder+"/sy-inc/store/store_manage_package.php?action=managepackagedeletepackage&cart_id="+cart_id, function(data) {	
692		data = $.trim(data);
693		updateCartMenu();
694		picviewed = $("#vinfo").attr("data-pic-key");
695		if(picviewed !== "") { 
696			backtoproductlist('','');
697		}
698		// $("#log").show().append("Packages: ["+data+"]<br>");
699
700		if(data == "0") { 
701			$("#viewimagemanagepackage").html("").hide();
702			adjustphotodisplayheightformanagepackage();
703			if($("#vinfo").attr("data-scd") > 1) { 
704				checkforscreenshotblur(pic_key);
705			}
706				gsbottom = $(".viewimageshoppingcart:visible").outerHeight();
707				$("#selectgsbackground").css({"bottom": gsbottom+"px"});
708
709
710
711		} else { 
712
713			date_id = $("#vinfo").attr('did');
714			list_id = ''+$("#list_id").val()+'';
715			$.get(tempfolder+"/sy-inc/store/store_manage_package_items.php?date_id="+date_id+"&list_id="+list_id, function(data) {	
716				$("#viewimagemanagepackage").html(data).show();
717				adjustphotodisplayheightformanagepackage();
718			$("#packagemessagebg").fadeOut(50);
719
720		});
721		}
722	});
723}
724var timeoutid; 
725
726function managepackageshownotice(message) { 
727	$("#packageactionerrormessage").hide();
728	carttab = $("#managepackagecarttab").height();
729	if($("#selectgsbackground").length > 0) { 
730		gsbottom = 8;
731	} else { 
732		gsbottom = 0;
733	}
734	newbottom = Math.round($("#mainpackagecontainer").height()) - 8 - carttab;
735	// $("#log").show().append("gs: "+gsbottom+"|  "+newbottom+"<br>");
736	$("#packageactionmessages").css({"bottom":newbottom+"px", "padding-bottom":(carttab*2) + gsbottom+"px"});
737	$("#packageactionmessages").html(message);
738
739	if($("#packageactionmessages").attr("data-displaying") == "1") { 
740		$("#packageactionmessages").attr("data-displaying","0");
741		$("#packageactionmessages").hide();
742		if(timeoutid) { 
743			clearTimeout(timeoutid);
744		}
745	}
746
747	$("#packageactionmessages").slideDown(100, function() { 
748		$("#packageactionmessages").attr("data-displaying","1");	
749	});
750
751	timeoutid = setTimeout(function() {
752		if($("#packageactionmessages").attr("data-displaying") == "1") { 
753			$("#packageactionmessages").slideUp(100, function() { 
754				$("#packageactionmessages").attr("data-displaying","0");
755			});
756		}
757	}, 1600);
758
759}
760
761
762function managepackageshowmessage(message) { 
763	$("#packageactionerrormessage").hide();
764	carttab = $("#managepackagecarttab").height();
765	if($("#selectgsbackground").length > 0) { 
766		gsbottom = 8;
767	} else { 
768		gsbottom = 0;
769	}
770		clearTimeout(timeoutid);
771
772	newbottom = Math.round($("#mainpackagecontainer").height()) - 8- carttab;
773
774	// $("#log").show().append(newbottom+"<br>");
775	$("#packageactionmessages").css({"bottom":newbottom+"px", "padding-bottom":(carttab*2) + gsbottom+"px"});
776	$("#packageactionmessages").html(message);
777
778	if($("#packageactionmessages").attr("data-displaying") == "1") { 
779		$("#packageactionmessages").attr("data-displaying","0");
780		$("#packageactionmessages").hide();
781		clearTimeout(timeoutid);
782	}
783
784	$("#packageactionmessages").slideDown(100, function() { 
785		$("#packageactionmessages").attr("data-displaying","1");	
786	});
787	/*
788	timeoutid = setTimeout(function() {
789		if($("#packageactionmessages").attr("data-displaying") == "1") { 
790			$("#packageactionmessages").slideUp(100, function() { 
791				$("#packageactionmessages").attr("data-displaying","0");
792			});
793		}
794	}, 1000);
795	*/
796}
797function managepackageshowerrormessage(message) { 
798	$("#packageactionerrormessage").hide();
799	carttab = $("#managepackagecarttab").height();
800	newbottom = Math.round($("#mainpackagecontainer").height()) - 8 - carttab;
801	// $("#log").show().append(carttab+"<br>");
802
803	if($("#selectgsbackground").length > 0) { 
804		gsbottom = 8;
805	} else { 
806		gsbottom = 0;
807	}
808
809	$("#packageactionerrormessage").css({"bottom":newbottom+"px", "padding-bottom":(carttab*2) + gsbottom+"px"});
810	$("#packageactionerrormessagemessage").html(message);
811
812	$("#packageactionerrormessagemessage").html(message);
813
814	if($("#packageactionerrormessage").attr("data-displaying") == "1") { 
815		$("#packageactionmessages").attr("data-displaying","0");
816		$("#packageactionmessages").hide();
817		clearTimeout(timeoutid);
818	}
819
820	$("#packageactionerrormessage").slideDown(100, function() { 
821		$("#packageactionmessages").attr("data-displaying","1");	
822	});
823	/*
824	timeoutid = setTimeout(function() {
825		if($("#packageactionmessages").attr("data-displaying") == "1") { 
826			$("#packageactionmessages").slideUp(100, function() { 
827				$("#packageactionmessages").attr("data-displaying","0");
828			});
829		}
830	}, 1000);
831	*/
832}
833
834
835function managepackagecancelerrormessage() {
836	$("#packageactionerrormessage").slideUp(100, function() { 
837		$("#packageactionmessages").attr("data-displaying","0");
838			$("#packagemessagebg").fadeOut(50);
839
840	});
841}
842
843function managepackagecancelmessage() {
844	$("#packageactionmessages").slideUp(100, function() { 
845		$("#packageactionmessages").attr("data-displaying","0");
846			$("#packagemessagebg").fadeOut(50);
847
848	});
849}

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.