Server IP : 162.214.80.37 / Your IP : 216.73.216.1 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/skyispatudyog/sym/Users/0-imyrqtmy/zugadu/AdminPanel/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include"include/connection.php"?> <!DOCTYPE html> <html> <head> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css"> <link rel="stylesheet" href="https://sweetalert.js.org/assets/css/app.css"> <script src="https://sweetalert.js.org/assets/sweetalert/sweetalert.min.js"></script> <style type="text/css"> /*.swal-title { font-size: 100px; } .swal-button,.swal-text { font-size: 50px; } .swal-modal { width: 80%; padding:50px; }*/ </style> </head> <body> <?php if(isset($_POST['apply'])) { $sae=mysqli_query($db,"SELECT * FROM order_data"); $odnum=mysqli_num_rows($sae); $odno=$odnum+1; $orderid="ODR".$odno; date_default_timezone_set("Asia/Kolkata"); $date=date("d-m-Y / h:i:s a"); $done="0"; if($_POST['productid1']=="") {?> <script> swal({ title: "Sorry!", text: "Please select product first.", type: "Error", icon: "Error" }).then(function() { window.location = "orderpg.php"; }); </script> <?php } else { if($_POST['productid1']!="Select Product") { $p1=$_POST['productid1']; $q1=$_POST['quantity1']; $sql1=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p1','$q1','$date')") or die(mysqli_error($db)); } if($_POST['productid2']!="Select Product") { $p2=$_POST['productid2']; $q2=$_POST['quantity2']; $sql2=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p2','$q2','$date')") or die(mysqli_error($db)); } if($_POST['productid3']!="Select Product") { $p3=$_POST['productid3']; $q3=$_POST['quantity3']; $sql3=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p3','$q3','$date')") or die(mysqli_error($db)); } if($_POST['productid4']!="Select Product") { $p4=$_POST['productid4']; $q4=$_POST['quantity4']; $sql4=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p4','$q4','$date')") or die(mysqli_error($db)); } if($_POST['productid5']!="Select Product") { $p5=$_POST['productid5']; $q5=$_POST['quantity5']; $sql5=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p5','$q5','$date')") or die(mysqli_error($db)); } if($_POST['productid6']!="Select Product") { $p6=$_POST['productid6']; $q6=$_POST['quantity6']; $sql6=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p6','$q6','$date')") or die(mysqli_error($db)); } if($_POST['productid7']!="Select Product") { $p7=$_POST['productid7']; $q7=$_POST['quantity7']; $sql7=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p7','$q7','$date')") or die(mysqli_error($db)); } if($_POST['productid8']!="Select Product") { $p8=$_POST['productid8']; $q8=$_POST['quantity8']; $sql8=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p8','$q8','$date')") or die(mysqli_error($db)); } if($_POST['productid9']!="Select Product") { $p9=$_POST['productid9']; $q9=$_POST['quantity9']; $sql9=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p9','$q9','$date')") or die(mysqli_error($db)); } if($_POST['productid10']!="Select Product") { $p10=$_POST['productid10']; $q10=$_POST['quantity10']; $sql10=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p10','$q10','$date')") or die(mysqli_error($db)); } if($_POST['productid11']!="Select Product") { $p11=$_POST['productid11']; $q11=$_POST['quantity11']; $sql11=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p11','$q11','$date')") or die(mysqli_error($db)); } if($_POST['productid12']!="Select Product") { $p12=$_POST['productid12']; $q12=$_POST['quantity12']; $sql12=mysqli_query($db,"INSERT INTO odr_data(OrderId,ProductId,Quantity,Date_Time) VALUES('$orderid','$p12','$q12','$date')") or die(mysqli_error($db)); } $done="1"; if ($done==1) { echo"<script>location.href='order.php?id=$orderid';</script>"; } } } if(isset($_POST['order'])) { $orderid=$_POST['orderid']; $name=$_POST['name']; $phone=$_POST['phone']; $amount=$_POST['amount']; $gst=$_POST['gst']; $total=$_POST['total']; $daw=mysqli_query($db,"INSERT INTO order_data(OrderId,Name,PhoneNo,Amount,Gst,Total) VALUES('$orderid','$name','$phone','$amount','$gst','$total')") or die(mysqli_error($db)); if($daw) { echo "done"; } else { echo "errror"; } } ?> </body> </html>