<?php 
require_once('includes/check-login.php');
require_once('includes/header.php'); 
require_once('includes/menu.php'); 
require_once('includes/config.php'); 
$tablename="reject_order";	
$addurl="service-view.php";
$sql = "SELECT * from ".$tablename." where status='0'";
$result = $con->query($sql);
?>
<!-- Datatable CSS -->
<link href='data_tables/datatables.min.css' rel='stylesheet' type='text/css' /> <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">                                
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>                    
                        <li class="active"><a href="#">Rejection List</a></li>           
                    </ol>                
            </section>
            <!-- Main content -->
            <section class="content">                
                <!-- Default box -->
                <div class="box box-form">
                    <div class="box-header with-border">
                        <h3 class="box-title">Rejection List</h3>
                        <div class="box-tools pull-right">
                            <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
                                <i class="fa fa-minus"></i></button>
                            <button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
                                <i class="fa fa-times"></i></button>
                        </div>
                    </div>
                    <div class="box-body">    
                        <!-- Table -->
                        <table id='workapp' class='display dataTable table table-bordered table-hover'>
                            <thead>
                            <tr>
							    <th>Order ID</th>
                                <th>Vendor Name</th>                        
                                <th>Rejected reason</th>              
                                <th>Rejected At</th>    
                                <th>Assign Some Other</th>                      
                            </tr>
                            </thead> 
                              <tbody>
							<?php $i=1;
							if ($result->num_rows > 0) {
                            while($row = $result->fetch_assoc()) {?>
						   <tr>
						   <td><?php echo $row['order_id'];?></td>
						   <td><?php echo $row['vendor_name'];?></td>
						   <td><?php echo $row['reason'];?></td>
						   <td><?php echo $row['created'];?></td>
						   <td><a href="<?php echo $base_url.$addurl;?>?id=<?php echo $row['order_id'];?>&vendor_id=<?php echo $row['vendor_id'];?>" class="tabledit-edit-button btn btn-sm btn-primary" title="View"><span class="glyphicon glyphicon-eye-open"></span></a></td>
						    </tr>								  
							 <?php $i++;}}?>
                           </tbody>							
                        </table>
                    </div>
                    <!-- /.box-footer-->                    
                </div>
                <!-- /.box -->

            </section>
            <!-- /.content -->                                        
        </div>
        <!-- /.content-wrapper -->        
<script src="js/common.js"></script>  
<script src="js/datatables.js"></script>    
<script src="<?php echo $base_url;?>js/lobibox.js"></script>  
<?php require_once('includes/footer.php'); ?>