Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/balajimall.com/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/balajimall.com/checkout-complete.php

<?php
	require_once("lib/functions.php");
	$db = new login_function();
	$current_session = session_id(); 
	
	$admin_email    =   "contact@gmc.com";
	$email          =   "";
	$total_amount  	= 0;
	$total_amount 	= 	$db->fetch_total_price_by_session_id($current_session);
	if(isset($_SESSION['login_email']))
	{
		$email	=	$_SESSION['login_email'];
	}
	if($total_amount == 0)
	{
		header("Location:cart.php");
	}
	$_SESSION['show_total_amount']=$total_amount;
	$full_name 			= "";	
	$address 			= "";
	$contact_no 		= "";	
	$user_email 		= "";
	$contact_no_error 	= "";
	$flag 				= 0;
	$success_msg 		= 0;
	$email_id_error 	= ""; 
	$fetch_total_amount = 0;
	
	
	$details = $db->fetch_user_data_by_email_id($email);
	if(!empty($details))
	{
		$id 		= $details[0];
		$full_name	= $details[1];
		$address 	= $details[2];
		$contact_no	= $details[3];
		$user_email	= $details[4];
	}
	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 	= $email;
		
		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);
			$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];
					$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_price);
				
					$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");	
?>
<div class="slider_above_div"> 
</div>
<div class="banner-top">
<div class="container">
<h3 >CHECKOUT</h3>
<h4><a href="index.php">Home</a><label>/</label>CHECKOUT</h4>
<div class="clearfix"> </div>
</div>
</div>
<style>
    table tr td
    {
        padding-top:5px;
        padding-bottom:5px;
        font-weight:bold;
        font-size:16px;
    }
    .txt_val
    {
        font-size:18px !important;
        font-weight:bold !important;
        border:1px solid #666;
        border-radius:7px;
    }
</style>
<body>
<div>
<div id="wrapper">
    <form action="checkout-complete.php" method="POST" name="register_mail">
	<center>
	<table class="f14" id="tblcrtac">
		<tbody>
				<?php
					if($success_msg == 1)
					{
				?>
					<div class="alert alert-success">
						Order Placed Successfully.
					</div>
				<?php
					}
				?>
		
		<tr><td height="17"></td></tr>
		<tr>
			<td width="180" style="color:#DB0D58;">Total Amount</td>
			<td width="14"><b>:</b></td>
			<td width="185"><input type="text" class="txt_val" name="total_amount" value="<?php echo $total_amount; ?>" style="width:220px;padding:5px;border:none;font-size:14px; color:#DB0D58;" required readonly></td>

			<td width="6"></td>
		<br />
		</tr>
		
		<tr><td height="17"></td></tr>
		<tr>
			<td width="180">Full Name</td>
			<td width="14"><b>:</b></td>
			<td width="185"><input type="text" placeholder="Full Name" class="txt_val" name="full_name" value="<?php echo $full_name; ?>" style="width:220px;padding:5px;;" required></td>
			<td width="6"></td>
		<br />
		</tr>
		
		<tr><td height="5"></td></tr>
		<tr>
		
			<td width="180">Shipping Address</td>
			<td width="14"><b>:</b></td>
			<td width="185"><textarea  placeholder="Enter Shipping Address" name="address" class="txt_val" style="width:220px;padding:5px;" required><?php echo $address; ?></textarea></td>
			<td width="6"></td>
		</tr>
		<tr><td height="5"></td></tr>
		<tr>
		
			<td width="180">Contact No</td>
			<td width="14"><b>:</b></td>
			<td width="185"><input type="number" placeholder="Enter Contact Number" class="txt_val" name="contact_no" value="<?php echo $contact_no; ?>" style="width:220px;padding:5px;" required></td>
			<td width="6"></td>
		</tr>
		<tr><td height="5"><span class="error_indicator"><?php echo $contact_no_error; ?></span></td></tr>
		
		<tr>
		
			<td width="180">Email</td>
			<td width="14"><b>:</b></td>
			<td width="185"><input type="email" placeholder="Enter Email Id" class="txt_val" name="user_email" value="<?php echo $email; ?>" style="width:220px;padding:5px;" required readonly></td>
			<td width="6"><span class="error_indicator"><?php echo $email_id_error; ?></span>	</td>
		</tr>
		
		<tr><td height="25"></td></tr>
		<tr>
			<center><td colspan="3" style="text-align:center;"><input type="submit" id="Register" name="checkout_btn" value="Place My Order" class="btn_new" style="border:none;"></td></center>
		</tr>
		
	</tbody>
	</table>
</form>	
</div>

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

<hr style="border-bottom:1px solid #DFDFDF" />

<?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