Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <head>
- <link href="http://admin.ourscorecard.com/css/navbar.css" rel="stylesheet" type="text/css">
- </head>
- <?php
- session_start();
- if (!isset($_SESSION['loggedin'])) {
- header('Location: http://admin.ourscorecard.com/index.php');
- exit();
- }
- ?>
- <?php
- include "config.php";
- $owner = $_SESSION['role'];
- ?>
- <?php include "../../assets/navbar.php" ?>
- <div>
- <form method='post' action='../finance/export/download.php'>
- <input type='submit' value='Export' name='Export'>
- <table id="invoice_table">
- <tr>
- <tr class="invheader">
- <th>Reference Number</th>
- <th>Memo</th>
- <th>Trans. Date</th>
- <th>Due Date</th>
- <th>Location</th>
- <th>PO Number</th>
- <th>Item Amount</th>
- <th>Pre Order #</th>
- <th>Quantity</th>
- <th>Vendor</th>
- <th>Balance</th>
- </tr>
- </tr>
- <?php
- $owner = $_SESSION['role'];
- $query = "SELECT l.AddressCode,
- l.owner,
- l.City,
- l.State,
- l.Zip,
- i.RefNumber,
- i.memo,
- i.Txndate,
- i.DueDate,
- i.ItemCustomerFullName,
- i.PO_number ,
- i.ItemAmount,
- i.PO_number,
- i.preorder_,
- i.Quantity,
- i.Vendor,
- i.balance
- FROM imw_locations l
- INNER JOIN vzw_invoice i
- ON l.AddressCode=i.ItemCustomerFullName
- WHERE l.owner='" . $owner . "'
- ";
- $result = mysqli_query($con,$query);
- $user_arr = array();
- while($row = mysqli_fetch_array($result)){
- $ref = $row['RefNumber'];
- $memo = $row['memo'];
- $Txndate = $row['Txndate'];
- $duedate = $row['DueDate'];
- $ItemCustomerFullName = $row['City'];
- $PO_number = $row['PO_number'];
- $ItemAmount = $row['ItemAmount'];
- $preorder_ = $row['preorder_'];
- $Quantity = $row['Quantity'];
- $Vendor = $row['Vendor'];
- $balance = $row['balance'];
- $user_arr[] = array($ref,$memo,$Txndate,$duedate,$ItemCustomerFullName,$PO_number,$ItemAmount,$preorder_,$Quantity,$Vendor,$balance);
- ?>
- <tr>
- <td><?php echo $ref; ?></td>
- <td><?php echo $memo; ?></td>
- <td><?php echo $Txndate; ?></td>
- <td><?php echo $duedate; ?></td>
- <td><?php echo $ItemCustomerFullName; ?></td>
- <td><?php echo $PO_number; ?></td>
- <td><?php echo $ItemAmount; ?></td>
- <td><?php echo $preorder_; ?></td>
- <td><?php echo $Quantity; ?></td>
- <td><?php echo $Vendor; ?></td>
- <td><?php echo $balance; ?></td>
- <td><? php echo $owner; ?></td>
- </tr>
- <?php
- }
- ?>
- </table>
- <?php
- $serialize_user_arr = serialize($user_arr);
- ?>
- <textarea name='export_data' style='display: none;'><?php echo $serialize_user_arr; ?></textarea>
- </form>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment