Şuanki Dizin: /home/wwwdreamtechnolo/public_html/sattvicyug.com/ |
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/sattvicyug.com/registration.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($total_amount == 0) // { // header("Location:registration.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 = $_POST['user_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; } } if(isset($_POST['submit'])) { $u_name = $_POST['u_name']; $email = $_POST['email']; $gender = $_POST['gender']; $dob = $_POST['dob']; $mobile_no = $_POST['mobile_no']; $pasword = $_POST['pasword']; if($db->insert_user_registrtion($u_name,$email,$gender,$dob,$mobile_no,$pasword)) { $flag = 1; header("Location:user-login.php"); } else { $flag = 2; } } ?> <?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="" 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 height="17"></td></tr> <tr> <td width="180">Name</td> <td width="14"><b>:</b></td> <td width="185"><input type="text" placeholder="Full Name" class="txt_val" name="u_name" value="<?php echo $full_name; ?>" style="width:220px;padding:5px;;" required></td> <td width="6"></td> <br /> </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="email" value="<?php echo $user_email; ?>" style="width:220px;padding:5px;" required></td> <td width="6"><span class="error_indicator"><?php echo $email_id_error; ?></span> </td> </tr> <tr> <td width="180">Gender</td> <td width="14"><b>:</b></td> <td><input type="radio" id="html" name="gender" value="male"> <label >Male</label> <input type="radio" id="html" name="gender" value="female"> <label >Female</label><br> </td> <!-- <td width="185"><input type="number" placeholder="Enter Contact Number" class="txt_val" name="gender" value="<?php echo $contact_no; ?>" style="width:220px;padding:5px;" required></td> --> <td width="6"></td> </tr> <tr> <td width="180">Date of Birth</td> <td width="14"><b>:</b></td> <td width="185"><input type="date" placeholder="Enter Contact Number" class="txt_val" name="dob" value="<?php echo $contact_no; ?>" style="width:220px;padding:5px;" required></td> <td width="6"></td> </tr> <tr> <td width="180">Mobile Number</td> <td width="14"><b>:</b></td> <td width="185"><input type="text" placeholder="Enter Mobile Number" class="txt_val" name="mobile_no" value="<?php echo $contact_no; ?>" style="width:220px;padding:5px;" required></td> <td width="6"></td> </tr> <tr> <td width="180">Password</td> <td width="14"><b>:</b></td> <td width="185"><input type="password" placeholder="Enter Mobile Number" class="txt_val" name="pasword" value="<?php echo $contact_no; ?>" style="width:220px;padding:5px;" required></td> <td width="6"></td> </tr> <tr><td height="25"></td></tr> <tr> <center><td colspan="3" style="text-align:center;"><input type="submit" id="Register" name="submit" value="Register" 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>
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