Viewing file: index.php (7.14 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include("include/header.php"); ?>
<link href="https://cdn.datatables.net/1.12.1/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css">
<link href="https://cdn.datatables.net/buttons/2.2.3/css/buttons.dataTables.min.css" rel="stylesheet" type="text/css">
<?php
// Total doctors loan
$doctor = "SELECT COUNT(*) AS doctor_loan FROM `doctor_loan`";
$doctors_result = mysqli_query($conn, $doctor);
if (!$doctors_result) {
die("Query failed: " . mysqli_error($conn)); // Debug query failure
}
$rowdoctors = mysqli_fetch_assoc($doctors_result);
$doctors = $rowdoctors['doctor_loan'] ?? 0;
// Total Business loan
$Business = "SELECT COUNT(*) AS business_loan FROM `business_loan`";
$Businesss_result = mysqli_query($conn, $Business);
if (!$Businesss_result) {
die("Query failed: " . mysqli_error($conn)); // Debug query failure
}
$rowBusinesss = mysqli_fetch_assoc($Businesss_result);
$Businesss = $rowBusinesss['business_loan'] ?? 0;
// Total Professional loan
$professional = "SELECT COUNT(*) AS professional_loan FROM `professional_loan`";
$professionals_result = mysqli_query($conn, $professional);
if (!$professionals_result) {
die("Query failed: " . mysqli_error($conn)); // Debug query failure
}
$rowprofessionals = mysqli_fetch_assoc($professionals_result);
$professionals = $rowprofessionals['professional_loan'] ?? 0;
?>
<style>
.dt-button {
color:#fff !important;
}
</style>
<!-- HTML Output -->
<div id="page-wrapper" style="min-height:100vh;">
<div class="page-content">
<!-- begin PAGE TITLE AREA -->
<div class="row">
<div class="col-lg-12">
<div class="page-title">
<h1>Dashboard
<small>Content Overview</small>
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Dashboard</li>
</ol>
</div>
</div>
</div>
<!-- begin DASHBOARD CIRCLE TILES -->
<div class="row">
<!-- Free Class Users -->
<div class="col-lg-4 col-sm-6">
<div class="circle-tile">
<a href="display_profile.php?id=1">
<div class="circle-tile-heading blue">
<i class="fa-solid fa-user-doctor fa-4x"></i>
</div>
</a>
<div class="circle-tile-content blue">
<div class="circle-tile-description text-faded">Doctors Loan</div>
<div class="circle-tile-number text-faded">
<?php echo $doctors; ?>
</div>
<a href="doctors_loan.php" class="circle-tile-footer">More Info <i class="fa fa-chevron-circle-right"></i></a>
</div>
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="circle-tile">
<a href="display_profile.php?id=1">
<div class="circle-tile-heading orange">
<i class="fa-solid fa-business-time fa-4x"></i>
</div>
</a>
<div class="circle-tile-content orange">
<div class="circle-tile-description text-faded">Business Loan</div>
<div class="circle-tile-number text-faded">
<?php echo $Businesss; ?>
</div>
<a href="business_loan.php" class="circle-tile-footer">More Info <i class="fa fa-chevron-circle-right"></i></a>
</div>
</div>
</div>
<div class="col-lg-4 col-sm-6">
<div class="circle-tile">
<a href="display_profile.php?id=1">
<div class="circle-tile-heading red">
<i class="fa-solid fa-user-tie fa-4x"></i>
</div>
</a>
<div class="circle-tile-content red">
<div class="circle-tile-description text-faded">Professional Loan</div>
<div class="circle-tile-number text-faded">
<?php echo $professionals; ?>
</div>
<a href="professional_loan.php" class="circle-tile-footer">More Info <i class="fa fa-chevron-circle-right"></i></a>
</div>
</div>
</div>
</div>
<!-- end DASHBOARD CIRCLE TILES -->
</div>
</div>
<?php include("include/footer.php"); ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.colVis.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script>
$(document).ready(function() {
$('#free_class').DataTable({
pageLength: 5,
searching: false, // Disable the search box
info: false, // Optional: Hide "Showing x to y of z entries" text
lengthChange: false, // Optional: Remove the "Show x entries" dropdown
// dom: 'Bfrtip',
// buttons: [
// // { extend: 'copy', className: 'btn btn-primary', text: 'Copy' },
// // { extend: 'csv', className: 'btn btn-primary', text: 'CSV' },
// { extend: 'excel', className: 'btn btn-primary', text: 'Excel' },
// { extend: 'pdf', className: 'btn btn-primary', text: 'PDF' },
// // { extend: 'print', className: 'btn btn-primary', text: 'Print' }
// ]
});
});
$(document).ready(function() {
$('#reg_class').DataTable({
pageLength: 5,
searching: false, // Disable the search box
info: false, // Optional: Hide "Showing x to y of z entries" text
lengthChange: false, // Optional: Remove the "Show x entries" dropdown
// dom: 'Bfrtip',
// buttons: [
// // { extend: 'copy', className: 'btn btn-primary', text: 'Copy' },
// // { extend: 'csv', className: 'btn btn-primary', text: 'CSV' },
// { extend: 'excel', className: 'btn btn-primary', text: 'Excel' },
// { extend: 'pdf', className: 'btn btn-primary', text: 'PDF' },
// // { extend: 'print', className: 'btn btn-primary', text: 'Print' }
// ]
});
});
</script>
|