D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
u166148318
/
domains
/
avrd.org
/
public_html
/
admin
/
Filename :
dashboard.php
back
Copy
<?php include '../components/connect.php' ?> <!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.0"> <title>Dashboard</title> <!-- font awesome cdn link --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"> <!-- custom css file link --> <link rel="stylesheet" href="./css/admin_style.css"> </head> <body> <!-- header section starts --> <?php include '../components/admin_header.php'; ?> <!-- header section ends --> <!-- dashboard section starts --> <section class="dashboard"> <h1 class="heading">dashboard</h1> <div class="box-container"> <div class="box"> <?php $a_id = $_SESSION['aid']; $select_profile = $conn->prepare("SELECT * FROM `admin` WHERE id = '".$a_id."' "); $select_profile->execute(); $fetch_profile = $select_profile->fetch(PDO::FETCH_ASSOC); ?> <h3>welcome!</h3> <p><?= $fetch_profile['username']; ?></p> <a href="./update.php?get_id=<?php echo $a_id?>" class="btn">update profile</a> </div> <div class="box"> <?php $select_activity = $conn->prepare("SELECT * FROM `activity`"); $select_activity->execute(); $count_activity = $select_activity->rowCount(); ?> <h3><?= $count_activity; ?></h3> <p>activity posted</p> <a href="./view_activity.php" class="btn">view activity</a> </div> <div class="box"> <?php $select_event = $conn->prepare("SELECT * FROM `event`"); $select_event->execute(); $count_event = $select_event->rowCount(); ?> <h3><?= $count_event; ?></h3> <p>Event posted</p> <a href="view_event.php" class="btn">view event</a> </div> <div class="box"> <?php $select_team = $conn->prepare("SELECT * FROM `team`"); $select_team->execute(); $count_team = $select_team->rowCount(); ?> <h3><?= $count_team; ?></h3> <p>Team Members</p> <a href="view_team.php" class="btn">view Members</a> </div> <div class="box"> <?php $select_messages = $conn->prepare("SELECT * FROM `messages`"); $select_messages->execute(); $count_messages = $select_messages->rowCount(); ?> <h3><?= $count_messages; ?></h3> <p>Messages</p> <a href="messages.php" class="btn">view messages</a> </div> <div class="box"> <?php $select_volunteer = $conn->prepare("SELECT * FROM `volunteer`"); $select_volunteer->execute(); $count_volunteer = $select_volunteer->rowCount(); ?> <h3><?= $count_volunteer; ?></h3> <p>volunteers</p> <a href="view_volunteer.php" class="btn">view volunteers</a> </div> <div class="box"> <?php $select_newsletter = $conn->prepare("SELECT * FROM `newsletter`"); $select_newsletter->execute(); $count_newsletter = $select_newsletter->rowCount(); ?> <h3><?= $count_newsletter; ?></h3> <p>Subscribers</p> <a href="newsletter.php" class="btn">view Subscribers</a> </div> <div class="box"> <?php $select_attendance = $conn->prepare("SELECT * FROM `attendance`"); $select_attendance->execute(); $count_attendance = $select_attendance->rowCount(); ?> <h3><?= $count_attendance; ?></h3> <p>attendances</p> <a href="view_attendance.php" class="btn">view attendances</a> </div> <div class="box"> <?php $select_admin = $conn->prepare("SELECT * FROM `admin`"); $select_admin->execute(); $count_admin = $select_admin->rowCount(); ?> <h3><?= $count_admin; ?></h3> <p>Admins</p> <a href="admins.php" class="btn">view Admins</a> </div> </div> </section> <!-- dashboard section ends --> <script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js"></script> <!-- custom js file link --> <script src="./js/admin_script.js"></script> <?php include '../components/message.php'; ?> </body> </html>