<?php ob_start(); ?>
<!DOCTYPE html>
<html lang="en"> 

<head>
<?php   require_once 'head_link.php'; ?>

</head>

<body>
 
<?php   require_once 'header1.php'; ?> 

<?php
  
	if(isset($_GET['delete_id']))
	{ 
		$stmt_delete = $DB_con->prepare('DELETE FROM payment_status WHERE ps_id=:uid');
		$stmt_delete->bindParam(':uid',$_GET['delete_id']);
		$stmt_delete->execute();
	 
	}

?>

<?php  require_once 'sidebar.php'; ?>


  <main id="main" class="main">

    <div class="pagetitle bg-light rounded p-2"> 
	  <h1>Payment Status | <span> <a href="paym-status-add">  <i class="bi bi-plus-square-fill"></i> </a> </span>  </h1>
	 
    </div> 

    <section class="section">
      <div class="row">
	  
        <div class="col-lg-12">

          <div class="card">
            <div class="card-body">
             
              <table width="100%" class="table table-hover datatable">
                <thead class="alert-primary">
                        <tr>							
							<th>SL</th>
							<th>Status Name</th>
							 
							<th>Edit</th>
							
							<th>Delete</th>
                        </tr>
                        </thead>
						
						
                <tbody id="tbody">
							<?php
							  $sl=0;
								$eq=mysqli_query($con,"select * from payment_status
								where user_id='".$_SESSION['id']."'
								ORDER BY ps_id ASC ");
								while($eqrow=mysqli_fetch_array($eq)){ 
									?>
										<tr> 
											<td><?php echo ++$sl; ?></td>
											<td><?php echo $eqrow['ps_name']; ?></td>
											 
											
				<td><a  class="btn-sm btn-info" href="paym-status-edit?edit_id=<?php echo $eqrow['ps_id']; ?>" title="click for edit">
				<span class="bi bi-pencil-square"></span> Edit</a> </td>
				
				
				
				<td>
				  <a class="btn-sm btn-danger delete-btn" href="#"   data-id="<?php echo $eqrow['ps_id']; ?>" 
                   data-bs-toggle="modal" data-bs-target="#confirmDeleteModal" 
				   title="Click for delete"> <span class="bi bi-trash"></span> Delete
                  </a>

				</td>
			<?php  require_once 'modal/delete_modal_for_all_list.php'; ?>
				
			</tr>
		<?php
		}  
		?>

</tbody>
              </table>
            
            </div>
          </div>

        </div>
      </div>
    </section>

  </main>
  
  
  <?php  require_once 'footer1.php'; ?>