File Manager

Path: /home/heznutpr/log.heznutprivate.com/dashboard/

Viewing File: viewloans.php

<?php
session_start();
include_once ('../include/session.php');
require_once '../include/class.user.php';
if (!isset($_SESSION['acc_no'])) {
    header("Location: login.php");
    exit();
}


$reg_user = new USER();

$stmt = $reg_user->runQuery("SELECT * FROM account WHERE acc_no=:acc_no");
$stmt->execute(array(":acc_no" => $_SESSION['acc_no']));
$row = $stmt->fetch(PDO::FETCH_ASSOC);



$email = $row['email'];

$temp = $reg_user->runQuery("SELECT * FROM ticket WHERE email = '$email' ");
$temp->execute(array(":acc_no" => $_SESSION['acc_no']));
$rows = $temp->fetch(PDO::FETCH_ASSOC);


?>
<?php include 'mheader.php';
?>
<title>Loan Statement</title>


<!-- content @s -->
                <div class="nk-content nk-content-fluid">
                    <div class="container-xl wide-lg">
                        <div class="nk-content-body">
                            <div class="components-preview wide-md mx-auto">
                                <div class="nk-block-head nk-block-head-lg wide-sm">
                                    <div class="nk-block-head-content">
                                        <br>
                                        <h2 class="nk-block-title fw-normal">Loan Statement</h2>
                                        
                                    </div>
                                </div><!-- .nk-block-head -->
                                <div class="nk-block nk-block-lg">
                                    <div class="nk-block-head">
                                        <div class="nk-block-head-content">
                                            <h4 class="nk-block-title">History</h4>
                                            
                                        </div>
                                    </div>
                                    <div class="card card-preview">
                                        <div class="card-inner">
        <table class="datatable-init-export nowrap table" data-export-title="Export">
                   <thead>
                      <tr>
						<th class="no-sort" style="width:1%">Loan ID</th>
						<th style="white-space: nowrap">Months</th>
						<th style="white-space: nowrap">Amount</th>
						<th style="white-space: nowrap">Reason</th>
						<th style="white-space: nowrap">Date</th>
						<th style="white-space: nowrap">Status</th>
						 
						
					</tr>
				</thead>
				<tbody>
				 <?php
                $acc_no = $_SESSION['acc_no'];
				$email = $row['email'];
				$his = $reg_user->runQuery("SELECT * FROM ticket WHERE email = '$email'");
				$his->execute(array(":acc_no"=>$_SESSION['acc_no']));
				while($rows = $his->fetch(PDO::FETCH_ASSOC)){?>
					<tr>
					   <td><?php echo $rows['tc']; ?></td>
					   <td><?php echo $rows['mail']; ?></td>
                       <td><?php echo $rows['subject']; ?></td>
                       <td><?php echo $rows['msg']; ?></td>
                       <td><?php echo $rows['date']; ?></td>
                       <td><?php echo $rows['status']; ?></td>
						
					</tr>
				<?php } ?>
				</tbody>
			</table>
        </div>
              
                              </div><!-- .card-preview -->
                                </div> <!-- nk-block -->    
    
	</div>
                                    </div> 
                                </div></div>
                                </div>
                                </div>                          
   <?php include 'mfooter.php';
?>