[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: all_bill.php
<?php include'header.php';?> <style> .col-md-6,.col-md-4,.col-md-3,.col-md-2,.col-md-1{ display:inline-block !important; } </style> <script src="jquery-1.11.1.min.js"></script> <div class="main-panel"> <div class="content"> <div class="container-fluid"> <div class="page-header"> <h4 class="page-title">All Bills</h4> </div> <div class="row"> <div class="col-md-12"> <div class="card"> <form method="post"> <div class="col-md-4"> <label>From</label> <input type="date" class="form-control" name="from"> </div> <div class="col-md-4"> <label>To</label> <input type="date" class="form-control" name="to"> </div> <div class="col-md-2"> <input type="submit" name="sub" class="btn btn-xs btn-info" value="Search"> </div> </form> <div class="card-body"> <div class="table-responsive"> <table id="basic-datatables" class="display table table-striped table-hover"> <thead> <tr> <th>Sl</th> <th>Date</th> <th>Order Id</th> <th>User Id</th> <th>Package Id</th> <th>Type</th> <th>Name/type</th> <th>Phone/ Alt Phone</th> <th>Father<br>Details</th> <th>Mother<br>Details</th> <th>Siblings</th> <th>Address</th> <th>Pay Status</th> <th>Upload Report</th> <th>Show/Delete</th> </tr> </thead> <tbody> <?php if(isset($_POST['sub'])){ $sr='place_order'; $from=date('Y-m-d',strtotime($_POST['from'])); $to=date('Y-m-d',strtotime($_POST['to'])); $s="select * from orders where date between '$from' and '$to' order by id desc";//echo $s; $stmt=$con->prepare($s); $stmt->execute(); $num = $stmt->rowCount(); if($num>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; $pro_id=$row['order_id']; echo " <tr> <td>$count</td> <td>".date("d-m-Y",strtotime($row['date']))."</td> <td>".$row['order_id']."</td> <td>".$row['user_id']."</td> <td>".$row['package_id']."</td> <td>".$row['marraige_type']."</td> <td><b>".$row['type']."</b><br>".$row['name']."</td> <td>".$row['phone']."<br>".$row['alt_phone']."</td> <td>".$row['father']."<br>".$row['father_phone']."<br>".$row['father_office_address']."</td> <td>".$row['mother']."<br>".$row['mother_phone']."<br>".$row['mother_office_address']."</td> <td>".$row['brothers']."</td> <td>".$row['residential_address']."<br>".$row['pincode']."</td> <td>".$row['pay_status']."</td>"; ?> <td> <button onclick="openModal(<?=$row['id']?>,'<?=htmlspecialchars($row['name'], ENT_QUOTES) ?>','<?=htmlspecialchars($row['email'], ENT_QUOTES) ?>')">Edit</button> </td> <?php echo "<td><a href='bill_final.php?user=".$row['user_id']."&order=".$pro_id."' target='_blank' class='btn btn-xs btn-success'>Edit Bill</a> <a href='delete.php?id=$id&table=$sr&url=".$_SERVER['REQUEST_URI']."' class='btn btn-xs btn-danger' onclick='return send();'>Delete</a> </td> </tr>"; ++$count; } } }else{ $count=1; $stmt=$show->readAll('orders'); $num = $stmt->rowCount(); if($num>0){ while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){ extract($row); $id=$row['id']; $pro_id=$row['order_id']; echo " <tr> <td>$count</td> <td>".date("d-m-Y",strtotime($row['date']))."</td> <td>".$row['order_id']."</td> <td>".$row['user_id']."</td> <td>".$row['package_id']."</td> <td>".$row['marraige_type']."</td> <td><b>".$row['type']."</b><br>".$row['name']."</td> <td>".$row['phone']."<br>".$row['alt_phone']."</td> <td>".$row['father']."<br>".$row['father_phone']."<br>".$row['father_office_address']."</td> <td>".$row['mother']."<br>".$row['mother_phone']."<br>".$row['mother_office_address']."</td> <td>".$row['brothers']."</td> <td>".$row['residential_address']."<br>".$row['pincode']."</td> <td>".$row['pay_status']."</td>"; ?> <td> <button onclick="openModal(<?=$row['id']?>,'<?=htmlspecialchars($row['name'], ENT_QUOTES) ?>','<?=htmlspecialchars($row['email'], ENT_QUOTES) ?>')">Edit</button> </td> <?php echo " <td><a href='edit_report.php?user=".$row['user_id']."&order=".$pro_id."' class='btn btn-xs btn-success'>Edit Order</a> <a href='delete.php?id=$id&table=$sr&url=".$_SERVER['REQUEST_URI']."' class='btn btn-xs btn-danger' onclick='return send();'>Delete</a> </td> </tr>"; ++$count; } } } ?> </tbody> </table> <form method="post" action="csv/excel_bill.php"> <input type="submit" name="export" class="btn btn-success" value="Download & Export to Excel" /> </form> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div id="editModal" style="display:none;"> <form method="post"> <input type="text" name="id" id="edit_id"> <input type="text" name="name" id="edit_name" required> <input type="email" name="email" id="edit_email" required> <button type="submit" name="update_row">Update</button> <button type="button" onclick="closeModal()">Cancel</button> </form> </div> <script> function openModal(id, name, email) { document.getElementById('edit_id').value = id; document.getElementById('edit_name').value = name; document.getElementById('edit_email').value = email; document.getElementById('editModal').style.display = 'block'; } function closeModal() { document.getElementById('editModal').style.display = 'none'; } </script> <script > $(document).ready(function() { $('#basic-datatables').DataTable({ }); $('#multi-filter-select').DataTable( { "pageLength": 5, initComplete: function () { this.api().columns().every( function () { var column = this; var select = $('<select class="form-control"><option value=""></option></select>') .appendTo( $(column.footer()).empty() ) .on( 'change', function () { var val = $.fn.dataTable.util.escapeRegex( $(this).val() ); column .search( val ? '^'+val+'$' : '', true, false ) .draw(); } ); column.data().unique().sort().each( function ( d, j ) { select.append( '<option value="'+d+'">'+d+'</option>' ) } ); } ); } }); // Add Row $('#add-row').DataTable({ "pageLength": 5, }); var action = '<td> <div class="form-button-action"> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-primary btn-lg" data-original-title="Edit Task"> <i class="la la-edit"></i> </button> <button type="button" data-toggle="tooltip" title="" class="btn btn-link btn-danger" data-original-title="Remove"> <i class="la la-times"></i> </button> </div> </td>'; $('#addRowButton').click(function() { $('#add-row').dataTable().fnAddData([ $("#addName").val(), $("#addPosition").val(), $("#addOffice").val(), action ]); $('#addRowModal').modal('hide'); }); }); </script> <?php include'footer.php';?> <style> #editModal{position: fixed; top: 22%; left: 22%; background: rgb(247, 247, 247); padding: 15px 15px; width: 74.5%; border-radius: 8px; border: 1px solid #cecece; box-shadow: 0 22px 43px rgba(0, 0, 0, 0.09); } #editModal form{width: 100%; padding: 0 0; margin: 0;} #editModal form input{border: 1px solid #e3e3e3; font-size: 15px; line-height: 22px; padding: 6px 10px 10px; color: #000; border-radius: 5px; margin: 0 5px 0 0;} #editModal form input[type="text"]{} #editModal form input[type="email"]{} #editModal form button[type="button"]{border: 1px solid #fff; background: #d20813; color: #fff; font-weight: bold; font-size: 16px; text-transform: uppercase; padding: 7px 20px 9px; border-radius: 5px; cursor: pointer;} #editModal form button[type="submit"]{border: 1px solid #fff; background: #00cbe6; color: #fff; font-weight: bold; font-size: 16px; text-transform: uppercase; padding: 7px 20px 9px; border-radius: 5px; cursor: pointer; margin: 0 5px 0 0;} #editModal form button[type="submit"]:hover{ background: #14d7f0; } #editModal form button[type="button"]:hover{ background: #f7010f; } </style>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.61 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619