/
home
/
u718748226
/
domains
/
saraswatihousingco.com
/
public_html
/
admin
/
Upload File
HOME
<?php session_start(); require("config.php"); if(!isset($_SESSION['auser'])) { header("location:index.php"); } ///code $error=""; $msg=""; if(isset($_POST['insert'])) { $customer=$_POST['customer']; $date=$_POST['date']; $address=$_POST['address']; $phone=$_POST['phone']; $email=$_POST['email']; $location=$_POST['location']; $property=$_POST['property']; $price=$_POST['price']; $adv=$_POST['adv']; $project_no=$_POST['project_no']; $remarks=$_POST['remarks']; if(!empty($customer) && !empty($date)){ $sql="insert into property_sale (date,customer,address,phone,email,location,property,price,adv,project_no,remarks) values('$date','$customer','$address','$phone','$email','$location','$property','$price','$adv','$project_no','$remarks')"; $result=mysqli_query($con,$sql); if($result) { $msg="<p class='alert alert-success'>Property Sale Inserted Successfully</p>"; } else { $error="<p class='alert alert-warning'>* Property Sale Not Inserted</p>"; } } else{ $error = "<p class='alert alert-warning'>* Fill all the Fields</p>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0"> <title>SRHousing - Property Sale</title> <!-- Favicon --> <link rel="shortcut icon" type="image/x-icon" href="assets/img/favicon.png"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="assets/css/bootstrap.min.css"> <!-- Fontawesome CSS --> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> <!-- Feathericon CSS --> <link rel="stylesheet" href="assets/css/feathericon.min.css"> <!-- Datatables CSS --> <link rel="stylesheet" href="assets/plugins/datatables/dataTables.bootstrap4.min.css"> <link rel="stylesheet" href="assets/plugins/datatables/responsive.bootstrap4.min.css"> <link rel="stylesheet" href="assets/plugins/datatables/select.bootstrap4.min.css"> <link rel="stylesheet" href="assets/plugins/datatables/buttons.bootstrap4.min.css"> <!-- Main CSS --> <link rel="stylesheet" href="assets/css/style.css"> <!--[if lt IE 9]> <script src="assets/js/html5shiv.min.js"></script> <script src="assets/js/respond.min.js"></script> <![endif]--> </head> <body> <!-- Main Wrapper --> <!-- Header --> <?php include("header.php");?> <!-- /Sidebar --> <!-- Page Wrapper --> <div class="page-wrapper"> <div class="content container-fluid"> <!-- Page Header --> <div class="page-header"> <div class="row"> <div class="col"> <h3 class="page-title">Property Sale</h3> <ul class="breadcrumb"> <li class="breadcrumb-item"><a href="dashboard.php">Dashboard</a></li> <li class="breadcrumb-item active">Property Sale</li> </ul> </div> </div> </div> <!-- /Page Header --> <!-- Property Sale add section --> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-header"> <h1 class="card-title">Add Property Sale</h1> <?php echo $error;?> <?php echo $msg;?> <?php if(isset($_GET['msg'])) echo $_GET['msg']; ?> </div> <form method="post" id="insert product" enctype="multipart/form-data"> <div class="card-body"> <h5 class="card-title">Property Sale Details</h5> <div class="row"> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Date of Sale</label> <div class="col-lg-9"> <input type="date" class="form-control" name="date"> </div> </div> </div> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Property</label> <div class="col-lg-9"> <input type="text" class="form-control" name="property"> </div> </div> </div> </div> <div class="row"> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Customer Name</label> <div class="col-lg-9"> <input type="text" class="form-control" name="customer"> </div> </div> </div> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Price</label> <div class="col-lg-9"> <input type="text" class="form-control" name="price"> </div> </div> </div> </div> <div class="row"> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Phone No.</label> <div class="col-lg-9"> <input type="text" class="form-control" name="phone"> </div> </div> </div> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Advanced</label> <div class="col-lg-9"> <input type="text" class="form-control" name="adv"> </div> </div> </div> </div> <div class="row"> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Email ID.</label> <div class="col-lg-9"> <input type="text" class="form-control" name="email"> </div> </div> </div> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Location</label> <div class="col-lg-9"> <input type="text" class="form-control" name="location"> </div> </div> </div> </div> <div class="row"> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Address</label> <div class="col-lg-9"> <textarea id="address" name="address" class="form-control" rows="4" cols="50"></textarea> </div> </div> </div> <div class="col-xl-6"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Property No.</label> <div class="col-lg-9"> <select class="form-control" name="project_no"> <option value="">Select</option> <?php $query1=mysqli_query($con,"select * from project_master"); while($row1=mysqli_fetch_row($query1)) { ?> <option value="<?php echo $row1['0']; ?>" class="text-captalize"><?php echo $row1['1'] ."--". $row1['3']; ?></option> <?php } ?> </select> </div> </div> </div> </div> <div class="row"> <div class="col-xl-12"> <div class="form-group row"> <label class="col-lg-3 col-form-label">Remarks</label> <div class="col-lg-9"> <textarea id="remarks" name="remarks" class="form-control" rows="4" cols="50"></textarea> </div> </div> </div> </div> <div class="text-left"> <input type="submit" class="btn btn-primary" value="Submit" name="insert" style="margin-left:200px;"> </div> </div> </form> </div> </div> </div> <!----End Property Sale add section ---> <!----view Property Sale ---> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Property Sale List</h4> </div> <div class="card-body"> <table id="table1" class="table table-bordered table-hover"> <thead> <tr> <th>#</th> <th>Date</th> <th>Customer Name</th> <th>Flat No.</th> <th>Price</th> <th>Advanced</th> <th>Balance</th> <th>Remarks</th> <th>Actions</th> </tr> </thead> <tbody> <?php $query=mysqli_query($con,"select * from property_sale"); $cnt=1; while($row=mysqli_fetch_row($query)) { ?> <tr> <td><?php echo $cnt; ?></td> <td><?php echo $formattedDate = date("d-m-Y", strtotime($row['1'])); ?></td> <td><?php echo $row['2']; ?><br><p style="color: blue; font-size: 12px;"4px;"><strong>Address :</strong><?php echo $row['3']; ?><br> <strong>Phone No :</strong><?php echo $row['4']; ?><br><strong>Email :</strong><?php echo $row['5']; ?></p></td> <td><?php echo $row['7']; ?><br><p style="color: blue; font-size: 12px;"4px;"><strong>Details :</strong><br><?php echo $row['10']; ?><br></p></td> <td><?php echo $row['8']; ?></td> <td><?php echo $row['9']; ?></td> <td><?php echo $bal = ($row['8'] - $row['9']); ?></td> <td><?php echo $row['11']; ?></td> <td><a href="#.php?id=<?php echo $row['0']; ?>"><img src="edit-icon.png" alt="Edit" width="20" height="20"></a> <a href="#.php?id=<?php echo $row['0']; ?>"><img src="red-trash-can-icon.png" alt="Delete" width="20" height="20"></a></td> </tr> <?php $cnt=$cnt+1; } ?> </tbody> </table> </div> </div> </div> </div> <!-- view state --> </div> </div> <!-- /Main Wrapper --> <!--- <label class="col-lg-3 col-form-label">State Name</label> <div class="col-lg-9"> <select class="form-control"> <option>Select</option> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> <option>Option 4</option> <option>Option 5</option> </select> </div> ----> <!-- jQuery --> <script src="assets/js/jquery-3.2.1.min.js"></script> <!-- Bootstrap Core JS --> <script src="assets/js/popper.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <!-- Slimscroll JS --> <script src="assets/plugins/slimscroll/jquery.slimscroll.min.js"></script> <!-- Datatables JS --> <!-- Datatables JS --> <script src="assets/plugins/datatables/jquery.dataTables.min.js"></script> <script src="assets/plugins/datatables/dataTables.bootstrap4.min.js"></script> <script src="assets/plugins/datatables/dataTables.responsive.min.js"></script> <script src="assets/plugins/datatables/responsive.bootstrap4.min.js"></script> <script src="assets/plugins/datatables/dataTables.select.min.js"></script> <script src="assets/plugins/datatables/dataTables.buttons.min.js"></script> <script src="assets/plugins/datatables/buttons.bootstrap4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/pdfmake.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.7/vfs_fonts.js"></script> <script src="assets/plugins/datatables/buttons.html5.min.js"></script> <script src="assets/plugins/datatables/buttons.flash.min.js"></script> <script src="assets/plugins/datatables/buttons.print.min.js"></script> <!-- Custom JS --> <script src="assets/js/script.js"></script> <script> $(document).ready(function() { //$('#table1').DataTable(); $('#table1').DataTable({ dom: 'Bfrtip', buttons: ['copy', 'csv', 'pdf', 'print'] }); }); </script> </body> </html>