ok
Direktori : /home/ngwcolle/www/LIBRARY-NGWC/admin/ |
Current File : //home/ngwcolle/www/LIBRARY-NGWC/admin/dashboard.php |
<?php session_start(); date_default_timezone_set('Asia/Kolkata'); include_once('includes/config.php'); if (strlen($_SESSION['aid']==0)) { header('location:logout.php'); } else{ ?> <!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, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>Dashboard</title> <!-- Custom fonts for this template--> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <link rel="icon" type="image/x-icon" href="../assets/favicon.ico" /> <!-- Custom styles for this template--> <link href="css/sb-admin-2.min.css" rel="stylesheet"> </head> <body id="page-top"> <!-- Page Wrapper --> <div id="wrapper"> <!-- Sidebar --> <?php include_once('includes/sidebar.php');?> <!-- End of Sidebar --> <!-- Content Wrapper --> <div id="content-wrapper" class="d-flex flex-column"> <!-- Main Content --> <div id="content"> <!-- Topbar --> <?php include_once('includes/topbar.php');?> <!-- End of Topbar --> <!-- Begin Page Content --> <div class="container-fluid"> <!-- Page Heading --> <div class="d-sm-flex align-items-center justify-content-between mb-4"> <h1 class="h3 mb-0 text-gray-800">Dashboard</h1> <!-- <a href="registrations.php" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Generate Report</a> --> </div> <!-- Content Row --> <div class="row"> <?php //Total $query=mysqli_query($con,"select id from tbl_students"); $totalpatrons=mysqli_num_rows($query); $queryb=mysqli_query($con,"select id from tbl_book"); $totalbooks=mysqli_num_rows($queryb); $query1=mysqli_query($con,"select id from tbl_book where bookstatus <>'New'"); $missing=mysqli_num_rows($query1); $query11=mysqli_query($con,"select `borrow_book_id` from borrow_book where DATE(date_borrowed)=CURDATE() and borrowed_status='borrowed'"); $borrowtoday=mysqli_num_rows($query11); $query2=mysqli_query($con,"select `return_book_id` from return_book where DATE(date_returned)=CURDATE()"); $returntoday=mysqli_num_rows($query2); $query3=mysqli_query($con,"select `borrow_book_id` from borrow_book where DATE(due_date)=CURDATE() and borrowed_status='borrowed'"); $todaydue=mysqli_num_rows($query3); $query4=mysqli_query($con,"select id from tblfirereport where status is null"); $newrequests=mysqli_num_rows($query4); ?> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-danger shadow h-100 py-2"> <a href="all-students.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-danger text-uppercase mb-1"> Total No. of Patrons </div> <div class="row no-gutters align-items-center"> <div class="col-auto"> <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800"><?php echo $totalpatrons;?></div> </div> <div class="col"> </div> </div> </div> <div class="col-auto"> <i class="fa fa-fire fa-2x text-gray"></i> </div> </div> </div> </a> </div> </div> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-primary shadow h-100 py-2"> <a href="manage-book.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-primary text-uppercase mb-1"> Total Books</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $totalbooks;?></div> </div> <div class="col-auto"> <i class="fas fa-fire fa-2x text-red-300"></i> </div> </div> </div> </a> </div> </div> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-success shadow h-100 py-2"> <a href="completed-requests.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-success text-uppercase mb-1"> Books Missing/Damaged/Replacement/Loan</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $missing;?></div> </div> <div class="col-auto"> <i class="fas fa-fire fa-2x text-red-300"></i> </div> </div> </div> </a> </div> </div> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-info shadow h-100 py-2"> <a href="today-issue.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-info text-uppercase mb-1">Book Issued Today </div> <div class="row no-gutters align-items-center"> <div class="col-auto"> <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800"><?php echo $borrowtoday;?></div> </div> <div class="col"> </div> </div> </div> <div class="col-auto"> <i class="fas fa-fire fa-2x text-gray-300"></i> </div> </div> </div> </a> </div> </div> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-warning shadow h-100 py-2"> <a href="today-return.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-warning text-uppercase mb-1"> Book Returned Today </div> <div class="row no-gutters align-items-center"> <div class="col-auto"> <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800"><?php echo $returntoday;?></div> </div> <div class="col"> </div> </div> </div> <div class="col-auto"> <i class="fas fa-fire fa-2x text-gray-300"></i> </div> </div> </div> </a> </div> </div> <div class="col-xl-4 col-md-6 mb-4"> <div class="card border-left-info shadow h-100 py-2"> <a href="today-due.php"> <div class="card-body"> <div class="row no-gutters align-items-center"> <div class="col mr-2"> <div class="text-xs font-weight-bold text-info text-uppercase mb-1"> Today Due for Return</div> <div class="h5 mb-0 font-weight-bold text-gray-800"><?php echo $todaydue;?></div> </div> <div class="col-auto"> <i class="fa fa-fire fa-2x text-gray-300"></i> </div> </div> </div> </a> </div> </div> </div> <!-- Content Row --> <!-- Footer --> <?php include_once('includes/footer.php');?> <!-- End of Footer --> </div> <!-- End of Content Wrapper --> </div> <!-- End of Page Wrapper --> <!-- Scroll to Top Button--> <?php include_once('includes/footer2.php');?> <!-- Bootstrap core JavaScript--> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Custom scripts for all pages--> <script src="js/sb-admin-2.min.js"></script> <!-- Page level plugins --> <script src="vendor/chart.js/Chart.min.js"></script> <!-- Page level custom scripts --> <script src="js/demo/chart-area-demo.js"></script> <script src="js/demo/chart-pie-demo.js"></script> </body> </html> <?php } ?>