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/checkout-complete.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 = session_id(); 
	
	$order_total_amount 	= 	$db->fetch_total_price_by_session_id($current_session);
	$total_amount = $order_total_amount;
		        
	/**********************Charges Calculate*************************************/
	$delivery_charges   =   20;
    $delivery_charges_text   =   "";
    $min_order_amount   =   100;
    $total_of_selling = $total_amount;
    if($total_of_selling >= $min_order_amount)
    {
        if($total_of_selling >= 500)
        {
            $delivery_charges = 0;
        }
        
        //Add delivery charges in selling bill
        $final_total    =   $total_of_selling + $delivery_charges;
        
        $total_amount = $final_total;
    }
    else
    {
        header("Location:cart.php");
    }
    /***********************************************************/
    
    if($total_amount == 0)
	{
		header("Location:cart.php");
	}
	
	$admin_email    =   "sattvic@gmail.com";
	// $email          =   "";
	$full_name="";
	$address1="";
	$user_email="";
	
	if (isset($_GET['mobile_nu'])) {
    $contact_no1 = $_GET['mobile_nu'];
    
	} else {
	    $contact_no1 = ''; 
	}

	$details = $db->fetch_user_data_by_email_id($contact_no1);
	// print_r($details);
	if(!empty($details))
	{
		$id 		= $details[0];
		$full_name	= $details[1];
		$address1 	= $details[2];
		$contact_no	= $details[3];
		$user_email	= $details[4];
		$pin		= $details[5];
		$latitude	= $details[6];
		$longitude	= $details[7];
	}

	$flag 				= 0;
	$success_msg 		= 0;
	$email_id_error 	= ""; 
	$fetch_total_amount = 0;
	$contact_no_error ="";
	$contact_no = "";

	$_SESSION['show_total_amount']=$total_amount;

	if(isset($_POST['checkout_btn']))
	{
		//$total_amount	= $_POST['total_amount'];
		$full_name 		= $_POST['full_name'];
		$address 		= $_POST['address'];
		$contact_no 	= $_POST['contact_no'];
		$user_email 	= "";
		$password="123";
		$confirm_password="123";
		$gender="";
		$dob="";
		$wife_name="";
		$wife_dob="";
		$anniversary_date="";
		$child_name="";
		$child_dob="";
		$status="";
		$pin 		= "0"; //$_POST['pin'];
		$latitude 	= "A"; //$_POST['latitude'];
		$longitude 	= "B"; //$_POST['longitude'];


		if(!is_numeric($contact_no))
		{
			$contact_no_error = "Please enter numeric value";
			$flag = 1;
		}
		else if(strlen($contact_no)<10 OR strlen($contact_no)>10)
		{
			$contact_no_error	=	"Please enter valid 10 digit contact no";
			$flag				=	1;
		}
	
		if($flag == 0)
		{
			$transaction_id = $db->add_record_to_checkout($full_name, $address, $contact_no, $user_email, $total_amount,$latitude,$longitude);
			  
			$iexist = $db->get_exist_code_for_update($contact_no);

			if ($iexist == "") 
			{
			    if (!$db->add_user($full_name, $address, $contact_no, $user_email, $password, $confirm_password, $gender, $dob, $wife_name, $wife_dob, $anniversary_date, $child_name, $child_dob,$pin,$latitude,$longitude)) {
			        echo "<script>alert('Order placed Successfully')</script>";
			        
			        
			    $whatsapp_message = "*Sattvicyug* \n\n*Dear $full_name* \n\n"
                . "Thank you for Choose Us.\n\n"
                . "Welcome Message. \n"
                . "*Link:* https://sattvicyug.com/index.php \n\n"
                . "*Contact*\n"
                . "*Sattvicyug*\n"
                . "*Phone Number*  :  7447847000 \n"
                . "*Address*       :  solapur \n";
    
                // $url = "http://web.cloudwhatsapp.com/wapp/api/send?apikey=bbf183d4fb3d4be7a8cdfd951fda6be1&mobile=$contact_no&msg=" . urlencode($whatsapp_message);
                
                // $response = file_get_contents($url);
                
                // echo $response; 

			    }
			} else {
			    if (!$db->user_update_details($full_name, $address, $contact_no, $user_email,$pin,$latitude,$longitude)) {
			        
			        echo "<script>alert('insert exist')</script>";
			            $whatsapp_message = "*Sattvicyug* \n\n*Dear $full_name* \n\n"
                        . "Thank you for Choose Us.\n\n"
                        . "Welcome Message. \n"
                        . "*Link:* https://sattvicyug.com/index.php \n\n"
                        . "*Contact*\n"
                        . "*Sattvicyug*\n"
                        . "*Phone Number*  :  7447847000 \n"
                        . "*Address*       :  solapur \n";
            
                        // $url = "http://web.cloudwhatsapp.com/wapp/api/send?apikey=bbf183d4fb3d4be7a8cdfd951fda6be1&mobile=$contact_no&msg=" . urlencode($whatsapp_message);
                        
                        // $response = file_get_contents($url);
                        
                        // echo $response; 
			    }
			}



			$product_id = $db->fetch_all_temp_cart_data($current_session);
			if(!empty($product_id))
			{
				$counter = 0;
				foreach($product_id as $record)
				{
					$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];

					$cart_data 	= $db->fetch_product_for_checklist($p_id);
					if(!empty($cart_data))
					{
							$prod_id		=	$cart_data[0];
							$added_by		=	$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];
					}
					$db->add_items_to_checkout_list($transaction_id,$added_by,$prod_id,$qty,$selling_price1,$actual_price1,$grams,$unit);

					$counter ++;
				}
				

			}
			$db->delete_product_from_temp_cart_by_product_id($current_session);	    
			unset($_SESSION['return_to_cart_reg']);
			header("Location:order-success.php");
			$success_msg = 1;
		}		
	}
?>
<?php
	require_once("header.php");	
?>

<style>
label
{
    font-family:arial;
    /*font-weight:bold !important;*/
}
    table tr td
    {
        padding-top:5px;
        padding-bottom:5px;
        font-weight:bold;
        font-size:16px;
    }
    .txt_val
    {
        font-size:14px !important;
        border:1px solid #DFDFDF;
        border-radius:4px;
        width:100%;
        font-weight:bold;
        padding:12px;
        color:#cf5ba3;
        margin-bottom:9px;
        font-family:arial;
    }
    .verifybutton
    {
        height:38px;
        width:15%;
        font-size:12px;
        margin-left:5px;
        border:none;
        background-color:#DB0D58;
        color:white;
    }
    .form_container
    {
        width:500px;
        margin:auto;
        
    }
    @media only screen and (max-width: 700px) {
      .form_container{
        width:90%;
      }
    }
</style>
<body>
    
    <br />
    
    <div class="spec" style="margin-bottom:1em;">
		<h3>Order Your Items</h3>
	
	<div class="ser-t">
		<b></b>
		<span><i></i></span>
		<b class="line"></b>
	</div>
	</div>
    
<div>
<div id="wrapper" style="background-color:#F6F6F4;">
    <form action="checkout-complete.php" method="POST" name="register_mail">
            <div class="form_container">
				<?php
					if($success_msg == 1)
					{
				?>
					<div class="alert alert-success">
						Order Placed Successfully.
					</div>
				<?php
					}
				?>
		<br />
			    <!--<label class="form_title_label">Total Amount : </label>-->
			    <!--<span style="color:green;padding:5px;border:none;font-size:17px; color:#DB0D58;"><?php echo $total_amount; ?>/-</span>-->
			    <!--<input type="hidden" class="txt_val" name="total_amount" value="<?php echo $total_amount; ?>" required readonly>-->

       <!--         <br />-->
       <!--         <br />-->

    			<label class="form_title_label">Full Name : </label><br />
    			<input type="text" placeholder="Full Name" class="txt_val" name="full_name" value="<?php echo $full_name; ?>" required></td>
			       
                <br />
                <?php
                    if($contact_no=="")
                    {
                        $contact_no = $contact_no1;
                    }
                ?>
    			<label class="form_title_label">Contact No : </label>
    			<input type="number" placeholder="Enter Contact Number" class="txt_val" name="contact_no" value="<?php echo $contact_no; ?>" required>
            
            
        		<br />

    			<label class="form_title_label">Delivery Address</label><label style="font-size:12px;">(Enter The Full And Correct Address For Proper Delivery) :</label>
    			<textarea  placeholder="Enter Shipping Address" name="address" class="txt_val" required><?php echo $address1; ?></textarea>

                <br />
                <br />
                
                <center><input type="submit" name="checkout_btn" onclick="check_location_fetched()" id="place_order_btn" value="Place My Order" class="btn_new" style="border:none;"></center>
	</div>
	
</form>	
</div>

 
    
<br /><br />
</center>

<hr style="border-bottom:1px solid #DFDFDF" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<?php
	require_once("footer.php");
?>
</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