File manager - Edit - /home/familylifersmpc/htdocs/www.familylifersmpc.com/loans_applied.php
Back
<?php session_start(); error_reporting(0); include('includes/config.php'); $sid = $_SESSION['alogin']; if (strlen($_SESSION['alogin']) == "") { header("Location: index.php"); } else { ?> <style> #customers { border-collapse: collapse; width: 100%; white-space: nowrap; } #customers td, #customers th { color: Black; } #customers tr:nth-child(even) { background-color: #f2f2f2; } #customers tr:hover { background-color: #C3C0F7; } #myInput { background-image: url('images/search.png'); background-size: 13%; background-position: 5px 5px; background-repeat: no-repeat; width: 320px; font-size: 16px; font-weight: 700; padding: 14px 24px 12px 53px; border: 1px solid #ddd; margin-bottom: 12px; } .pagination button { padding: 10px 10px; margin: 10px 10px 10px 10px; cursor: pointer; outline: 2px solid #fff; border-radius: 10px; border: none; font-weight: 900; } .hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 3px; } .pagination button.active { background-color: #007bff; color: white; } </style> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <?php $sql = "SELECT * FROM tblsettings"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $result) { ?> <?php $BGCOLOR = $result->BGCOLOR; $COLOR1 = $result->COLOR1; $COLOR2 = $result->COLOR2; ?> <?php $cnt = $cnt + 1; } } ?> <meta name="theme-color" content="<?php echo htmlentities($BGCOLOR); ?>" /> <title>Applied Loans</title> <link rel="icon" href="favicon.ico" type="image/icon type"> <link rel="stylesheet" href="css/bootstrap.min.css" media="screen"> <link rel="stylesheet" href="css/font-awesome.min.css" media="screen"> <link rel="stylesheet" href="css/animate-css/animate.min.css" media="screen"> <link rel="stylesheet" href="css/lobipanel/lobipanel.min.css" media="screen"> <link rel="stylesheet" href="css/prism/prism.css" media="screen"> <!-- USED FOR DEMO HELP - YOU CAN REMOVE IT --> <link rel="stylesheet" type="text/css" href="js/DataTables/datatables.min.css" /> <link rel="stylesheet" href="css/main.css" media="screen"> <script src="js/modernizr/modernizr.min.js"></script> <link rel="stylesheet" href="table1.css"> <style> .errorWrap { padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #dd3d36; -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1); box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1); } .succWrap { padding: 10px; margin: 0 0 20px 0; background: #fff; border-left: 4px solid #5cb85c; -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1); box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .1); } </style> </head> <body class="top-navbar-fixed"> <div class="main-wrapper"> <!-- ========== TOP NAVBAR ========== --> <?php include('includes/topbar.php'); ?> <!-- ========== WRAPPER FOR BOTH SIDEBARS & MAIN CONTENT ========== --> <div class="content-wrapper"> <div class="content-container"> <?php include('includes/leftbar.php'); ?> <div class="main-page"> <div class="container-fluid"> <div class="row page-title-div"> <div class="col-md-6"> <h2 class="title"><strong>Applied loans</strong></h2> </div> <!-- /.col-md-6 text-right --> </div> <!-- /.row --> <div class="row breadcrumb-div"> <div class="col-md-6"> <ul class="breadcrumb"> <li><a href="dashboard.php"><i class="fa fa-home"></i><strong> Home</strong></a></li> <li class="active">Applied loans</li> </ul> </div> </div> <!-- /.row --> </div> <!-- /.container-fluid --> <section class="section"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="panel"> <div class="panel-heading"> <div class="panel-title"> <h5><strong>Loan Status</strong></h5> </div> </div> <?php if ($msg) { ?> <div class="alert alert-success left-icon-alert" role="alert"> <strong>Well done!</strong><?php echo htmlentities($msg); ?> </div><?php } else if ($error) { ?> <div class="alert alert-danger left-icon-alert" role="alert"> <strong>Oh snap!</strong> <?php echo htmlentities($error); ?> </div> <?php } ?> <div class="panel-body p-10 content " style="overflow-x:auto;"> <input type="text" id="myInput" onkeyup="myFunction1()" placeholder="Search Description" title="Type in Description"> <table id="customers" cellspacing="0" width="100%"> <thead> <tr class="display table table-striped table-bordered"> <th>Description</th> <th>Amount</th> <th>Terms</th> <th>Payment Mode</th> <th>Status</th> </tr> </thead> <tbody> <?php $sql = "SELECT * from tblloanapp WHERE USERID='" . $sid . "' ORDER BY appID DESC"; $query = $dbh->prepare($sql); $query->execute(); $results = $query->fetchAll(PDO::FETCH_OBJ); $cnt = 1; if ($query->rowCount() > 0) { foreach ($results as $result) { ?> <tr> <td><strong><?php echo htmlentities($result->description); ?><strong></td> <td><?php echo htmlentities(number_format($result->principal, 2)); ?></td> <td><?php echo htmlentities($result->terms); ?></td> <td><?php echo htmlentities($result->paymentmode); ?></td> <td><strong><?php echo htmlentities($result->status); ?></strong></td> </tr> <?php } } ?> </tbody> </table> <!-- /.col-md-12 --> </div> </div> </div> <!-- /.col-md-6 --> </div> <!-- /.col-md-12 --> </div> </div> <!-- /.panel --> </div> <!-- /.col-md-6 --> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </section> <!-- /.section --> </div> <!-- /.main-page --> </div> <!-- /.content-container --> </div> <!-- /.content-wrapper --> </div> <!-- /.main-wrapper --> <script> function myFunction1() { var input, filter, table, tr, td, i, txtValue; input = document.getElementById("myInput"); filter = input.value.toUpperCase(); table = document.getElementById("customers"); tr = table.getElementsByTagName("tr"); for (i = 0; i < tr.length; i++) { td = tr[i].getElementsByTagName("td")[0]; if (td) { txtValue = td.textContent || td.innerText; if (txtValue.toUpperCase().indexOf(filter) > -1) { tr[i].style.display = ""; } else { tr[i].style.display = "none"; } } } } document.addEventListener('DOMContentLoaded', function() { const content = document.querySelector('.content'); const itemsPerPage = 12; let currentPage = 0; const items = Array.from(content.getElementsByTagName('tr')).slice(1); function showPage(page) { const startIndex = page * itemsPerPage; const endIndex = startIndex + itemsPerPage; items.forEach((item, index) => { item.classList.toggle('hidden', index < startIndex || index >= endIndex); }); updateActiveButtonStates(); } function createPageButtons() { const totalPages = Math.ceil(items.length / itemsPerPage); const paginationContainer = document.createElement('div'); const paginationDiv = document.body.appendChild(paginationContainer); paginationContainer.classList.add('pagination'); // Add page buttons for (let i = 0; i < totalPages; i++) { const pageButton = document.createElement('button'); pageButton.textContent = i + 1; pageButton.addEventListener('click', () => { currentPage = i; showPage(currentPage); updateActiveButtonStates(); }); content.appendChild(paginationContainer); paginationDiv.appendChild(pageButton); } } function updateActiveButtonStates() { const pageButtons = document.querySelectorAll('.pagination button'); pageButtons.forEach((button, index) => { if (index === currentPage) { button.classList.add('active'); } else { button.classList.remove('active'); } }); } createPageButtons(); // Call this function to create the page buttons initially showPage(currentPage); }); </script> <!-- ========== COMMON JS FILES ========== --> <script src="js/jquery/jquery-2.2.4.min.js"></script> <script src="js/bootstrap/bootstrap.min.js"></script> <script src="js/pace/pace.min.js"></script> <script src="js/lobipanel/lobipanel.min.js"></script> <script src="js/iscroll/iscroll.js"></script> <!-- ========== PAGE JS FILES ========== --> <script src="js/prism/prism.js"></script> <script src="js/DataTables/datatables.min.js"></script> <!-- ========== THEME JS ========== --> <script src="js/main.js"></script> </body> </html> <?php } ?>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings