<?php include ("../../controller/session/session-checker-teacher-student-admin-parents.php"); ?>


<?php


    @$langold = $_GET['lang'];
    
    if ($langold == '' || $langold == NULL || $langold == 'undefined') {
    	$lang = 'english';
    } else {
    	$lang = $_GET['lang'];
    }
    include('../../lang/' . $lang . '.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">
    <meta name="author" content="EduMESS" />
    <meta name="description" content="EduMESS (Education Management and E-Learning Software Solution) 
        is a leading school management, automation and elearning solution. Since its 
        launch, EduMESS has grown to become a leader. Our clients say that the simplicity 
        of our interface, ease of use, cost effectiveness and excellent customer care is 
        the reason they prefare EduMESS. We have watched schools move from softwares they 
        are using to EduMESS." />
    <meta name="keywords" content="Best, School, Management, Best School, Best School Management, 
        Best School Management Software, Free School Management Software, Portal, 
        School Owner, Group of School Owner, Consultants, Brand Promoters | School Portal Generator ">
  
    
    <!-- SITE TITLE -->
	<title>
		<?php echo $website_title; ?>
	</title>
    <!-- FAVICON AND TOUCH ICONS -->
    <link rel="shortcut icon" href="../../assets/images/website_images/favicon.png" type="image/x-icon">
    <link rel="icon" href="../../assets/images/website_images/favicon.png" type="image/x-icon">
    <link rel="apple-touch-icon" sizes="152x152" href="../../assets/images/website_images/favicon.png">
    <link rel="apple-touch-icon" sizes="120x120" href="../../assets/images/website_images/favicon.png">
    <link rel="apple-touch-icon" sizes="76x76" href="../../assets/images/website_images/favicon.png">
    <link rel="apple-touch-icon" href="../../assets/images/website_images/favicon.png">
    <link rel="icon" href="../../assets/images/website_images/favicon.png" type="image/x-icon">

    <link href="../../assets/plugins/bootstrap5/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Arvo&display=swap" rel="stylesheet">
    <script src="../../assets/plugins/jquery/code.jquery.com_jquery-3.5.1.min.js"></script>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Sharp" rel="stylesheet">
    <link href='https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css' rel='stylesheet'>

 	<!-- Boxi Cons -->
	<link href='https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css' rel='stylesheet'>

    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

	<link href="../../css/user_css/teacher_css/bootstrap.min.css" rel="stylesheet">

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons+Sharp" rel="stylesheet">

	<!--CALENDER UI CSS -->
	<link href="../../js/website_js/Charts/morris.css" rel="stylesheet">

	<script src="https://code.jquery.com/ui/1.12.0-rc.2/jquery-ui.js" integrity="sha256-6HSLgn6Ao3PKc5ci8rwZfb//5QUu3ge2/Sw9KfLuvr8=" crossorigin="anonymous"></script>
	
	<!-- font awesome cn -->
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

	<!-- Phone Number CDN -->
	<link href="../../css/website_css/cdnjs/intlTelInput.min.css" rel="stylesheet" />
    <script src="../../css/website_css/cdnjs/intlTelInput.min.js"></script>

	 <!--This - Morris Chart CSS -->
	 <link href="../../assets/plugins/morrisjs/morris.css" rel="stylesheet">

	<!-- style sheet -->
     <link rel="stylesheet" href="../../css/user_css/teacher_css/staffStyle.css">
    
  

</head>
<style>

		

		.tari-topBanner {
			background-image: url('../../css/user_css/teacher_css/banners/7.png');
		}

		/* Header Profile */
		.avatar {
			cursor: pointer;
			height: 2.375rem;
			position: relative;
			width: 2.375rem;
		}
		.avatar img {
			height: 100%;
			width: 100%;
			border-radius: 5px;
		}
		.avatar .avatar-initial {
			-ms-flex-align: center;
			-ms-flex-pack: center;
			align-items: center;
			background-color: #8592a3;
			bottom: 0;
			color: #fff;
			display: -ms-flexbox;
			display: flex;
			font-weight: 700;
			justify-content: center;
			left: 0;
			position: absolute;
			right: 0;
			text-transform: uppercase;
			top: 0;
		}
		.avatar.avatar-away:after,
		.avatar.avatar-busy:after,
		.avatar.avatar-offline:after,
		.avatar.avatar-online:after {
			border-radius: 100%;
			bottom: 0;
			box-shadow: 0 0 0 2px #fff;
			content: "";
			height: 8px;
			position: absolute;
			right: 3px;
			width: 8px;
		}
		.avatar.avatar-online:after {
			background-color: #71dd37;
		}
		.avatar.avatar-offline:after {
			background-color: #8592a3;
		}
		.avatar.avatar-away:after {
			background-color: #ffab00;
		}
		.avatar.avatar-busy:after {
			background-color: #ff3e1d;
		}
		.w-px-400 {
			width: 400px !important;
		}
		.dropdown-toggle-hide-arrow > .dropdown-toggle:after,
		.dropdown-toggle-hide-arrow > .dropdown-toggle:before,
		.dropdown-toggle.hide-arrow:after,
		.dropdown-toggle.hide-arrow:before {
			display: none;
		}

		.badge.badge-notifications {
			display: inline-block;
			margin: 0;
			position: absolute;
			top: auto;
			-webkit-transform: translate(-50%, -30%);
			transform: translate(-50%, -30%);
		}
		
		.badge.badge-notifications:not(.badge-dot) {
			font-size: 0.582rem;
			line-height: 0.75rem;
			padding: 0.05rem 0.2rem;
		}



        .pros-topBanner {
                    position: relative;
                    border-radius: 20px;
                    height: 210px;
                    width: 100%;
                    padding: 20px 20px 0px 20px;
                    box-shadow: #a0a1a133 0px 8px 24px;
                    /* margin-top: 30px; */
                    background-color:transparent;
                     background-image: url('../../css/user_css/teacher_css/banners/3.png');
                    background-repeat: no-repeat;
                    background-size: 1000px;
                    bottom: 0;
                    display: flex;
                    align-items: left;
		}





	
	</style>

<body>

    <!-- Preloader HTML structure -->
    <!-- <div class="preloader">
        <span class="smooth spinner"></span>
    </div> -->

   <div id= "content" class="grid-container">
        
		<!-- Header -->
		<header class="chiheader align-items-center">
			<div class="menu-icon align-items-center" style="cursor: pointer;" onclick="openSidebar()">
				<span class="material-icons-sharp">menu</span>
			</div>
			<div class="header-left">
			
			</div>
			<div class="navbar-nav-right d-flex align-items-center" id="navbar-collapse">
				<div class="header-right">                             
					<ul class="navbar-nav flex-row align-items-center mx-auto">
						
						

						<!-- Language -->
						<li class="nav-item dropdown-notifications navbar-dropdown dropdown" style="margin-right: 10px;">
							<div class="langdropdown">
								<span class="langdropbtn" style="font-size: 20px;">
									<i class='bx bx-globe bx-sm'></i> 
								</span>

								<div class="langdropdown-content">
									<a href="#"> 
										<img src="../../assets/flags/1x1/ng.svg" style="width: 20px; height: 15px;"> Igbo
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/ng.svg" style="width: 20px; height: 15px;"> Hausa
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/ng.svg" style="width: 20px; height: 15px;"> Yoruba
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/us.svg" style="width: 20px; height: 15px;"> English
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/gf.svg"  style="width: 20px; height: 15px;"> French
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/es.svg"  style="width: 20px; height: 15px;"> Español
									</a>
									<a href="#"> 
										<img src="../../assets/flags/1x1/sa.svg"  style="width: 20px; height: 15px;"> Arabic العربية
									</a>
									<a href="#">
										<img src="../../assets/flags/1x1/cn.svg"  style="width: 20px; height: 15px;"> Chinese हिंदी
									</a>
									<a href="#">
										<img src="../../assets/flags/1x1/in.svg"  style="width: 20px; height: 15px;"> Hindi हिंदी

									</a>
								</div>
							</div>
						</li>
						<!-- Language -->

						<!-- Notification -->
						<li class="nav-item dropdown-notifications navbar-dropdown dropdown" style="margin-right: 15px;">
							<a class="nav-link dropdown-toggle hide-arrow" href="" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
							<i class="bx bx-bell bx-sm"></i>
							<span class="badge bg-danger rounded-pill badge-notifications">5</span>
							</a>
							<ul class="dropdown-menu dropdown-menu-end py-0">
							<li class="dropdown-menu-header border-bottom">
								<div class="dropdown-header d-flex align-items-center py-3">
								<h5 class="text-body mb-0 me-auto">Notification</h5>
								<a href="" class="dropdown-notifications-all text-body" data-bs-toggle="tooltip" data-bs-placement="top" title="Mark all as read"><i class="bx fs-4 bx-envelope-open"></i></a>
								</div>
							</li>
							<li class="dropdown-notifications-list scrollable-container">
								<ul class="list-group list-group-flush">
								<li class="list-group-item list-group-item-action dropdown-notifications-item">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<img src="assets/img/avatars/1.png" alt class="w-px-40 h-auto rounded-circle">
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Congratulation Lettie 🎉</h6>
										<p class="mb-0">Won the monthly best seller gold badge</p>
										<small class="text-muted">1h ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<span class="avatar-initial rounded-circle bg-label-danger">CF</span>
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Charles Franklin</h6>
										<p class="mb-0">Accepted your connection</p>
										<small class="text-muted">12hr ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<img src="../../demo/assets/img/avatars/2.png" alt class="w-px-40 h-auto rounded-circle">
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">New Message ✉️</h6>
										<p class="mb-0">You have new message from Natalie</p>
										<small class="text-muted">1h ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<span class="avatar-initial rounded-circle bg-label-success"><i class="bx bx-cart"></i></span>
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Whoo! You have new order 🛒 </h6>
										<p class="mb-0">ACME Inc. made new order $1,154</p>
										<small class="text-muted">1 day ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<img src="../../demo/assets/img/avatars/9.png" alt class="w-px-40 h-auto rounded-circle">
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Application has been approved 🚀 </h6>
										<p class="mb-0">Your ABC project application has been approved.</p>
										<small class="text-muted">2 days ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<span class="avatar-initial rounded-circle bg-label-success"><i class="bx bx-pie-chart-alt"></i></span>
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Monthly report is generated</h6>
										<p class="mb-0">July monthly financial report is generated </p>
										<small class="text-muted">3 days ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<img src="../../demo/assets/img/avatars/5.png" alt class="w-px-40 h-auto rounded-circle">
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">Send connection request</h6>
										<p class="mb-0">Peter sent you connection request</p>
										<small class="text-muted">4 days ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="javascript:void(0)" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="javascript:void(0)" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<img src="../../demo/assets/img/avatars/6.png" alt class="w-px-40 h-auto rounded-circle">
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">New message from Jane</h6>
										<p class="mb-0">Your have new message from Jane</p>
										<small class="text-muted">5 days ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								<li class="list-group-item list-group-item-action dropdown-notifications-item marked-as-read">
									<div class="d-flex">
									<div class="flex-shrink-0 me-3">
										<div class="avatar">
										<span class="avatar-initial rounded-circle bg-label-warning"><i class="bx bx-error"></i></span>
										</div>
									</div>
									<div class="flex-grow-1">
										<h6 class="mb-1">CPU is running high</h6>
										<p class="mb-0">CPU Utilization Percent is currently at 88.63%,</p>
										<small class="text-muted">5 days ago</small>
									</div>
									<div class="flex-shrink-0 dropdown-notifications-actions">
										<a href="" class="dropdown-notifications-read"><span class="badge badge-dot"></span></a>
										<a href="" class="dropdown-notifications-archive"><span class="bx bx-x"></span></a>
									</div>
									</div>
								</li>
								</ul>
							</li>
							<li class="dropdown-menu-footer border-top">
								<a href="" class="dropdown-item d-flex justify-content-center text-primary p-2 h-px-40">
								View all notifications
								</a>
							</li>
							</ul>
						</li>
						<!--/ Notification -->

						<!-- User -->
						<li class="nav-item navbar-dropdown dropdown-user dropdown" style="margin-right: 10px;">
							<a class="nav-link dropdown-toggle hide-arrow" href="" data-bs-toggle="dropdown">
							<div class="avatar avatar-online">
								<?php
									if($ApplicantPhoto == '' ||  $ApplicantPhoto == '0'){

										echo '<img src="../../assets/images/Staff-Profile-Images/dummy.png" alt class="w-px-40 h-auto rounded-circle">';
	
										}else{
										
										echo '<img src="'.$ApplicantPhoto.'" alt class="w-px-40 h-auto rounded-circle">';
	
										}
								?>
								
							</div>
							</a>
							<ul class="dropdown-menu dropdown-menu-end">
							<li>
								<a class="dropdown-item" href="../candidate/profile/">
								<div class="d-flex">
									<div class="flex-shrink-0 me-3">
									<div class="avatar avatar-online">
									<?php
										if($ApplicantPhoto == '' ||  $ApplicantPhoto == '0'){

											echo '<img src="../../assets/images/Staff-Profile-Images/dummy.png" alt class="w-px-40 h-auto rounded-circle">';
		
											}else{
											
											echo '<img src="'.$ApplicantPhoto.'" alt class="w-px-40 h-auto rounded-circle">';
		
											}
									?>


									</div>
									</div>
									<div class="flex-grow-1">
									<span class="fw-semibold d-block">
										<?php echo $ApplicantFName;?> <?php echo  $ApplicantLName;?>
									</span>
									<small class="text-muted"><?php echo $UType; ?></small>
									</div>
								</div>
								</a>
							</li>
							<li>
								<div class="dropdown-divider"></div>
							</li>
							<li>
								<a class="dropdown-item" href="../candidate/profile/">
								<i class="bx bx-user me-2"></i>
								<span class="align-middle">My Profile</span>
								</a>
							</li>
							<li>
								<a class="dropdown-item" href="https://demos.themeselection.com/sneat-bootstrap-html-laravel-admin-template/demo-1/app/invoice/list">
								<i class="bx bx-credit-card me-2"></i>
								<span class="align-middle">Billing</span>
								</a>
							</li>
											<li>
								<div class="dropdown-divider"></div>
							</li>
											<li>
								<a class="dropdown-item" href="../../../controller/portal_login/logout.php" id="logout_btn">
								<i class='bx bx-log-in me-2'></i>
								<span class="align-middle">Logout</span>
								</a>
							</li>
							</ul>
						</li>
						<!--/ User -->
					</ul>
				</div>
			</div>
		</header>
		<!--End Header -->


        <!-- Sidebar -->
        <aside id="sidebar">
            <div class="sidebar-title">
                <div class="sidebar-brand">
                    <img src="favicon.png" style="width: 15%;" alt=""> <span>EduMESS </span>
                </div>
                <div class="close-icon" style="cursor: pointer;" onclick="closeSidebar()">
                    <span class="material-icons-sharp">close</span>
                </div>
            </div>
            
            <ul class="sidebar-List">
  
                <li class="sidebar-list-item">
                    <a href="../candidate/">
                        <i class='bx bx-grid-alt' style="margin-right: 10px;"></i>
                        <span >Dashboard</span>
                    </a>
                </li>
              
               
                
            </ul>
        </aside>
        <!-- End Sidebar -->


        <!--======Floating Button=========-->
             <!-- Buttons -->
             <a href="#" class="dashfloat " style="font-size: 14px; text-decoration: none; font-weight: 500;">
                <i class="fa fa-question-circle-o" aria-hidden="true"></i> Help
            </a>
                <ul class="floatBtn">  
                    <li class="floatBtnli">
                        <a href="#">
                            <i class="bx bx-user-circle icon"></i> <span>Ai Support</span>
                        </a>
                    </li>
                    <li class="floatBtnli">
                        <a href="#" style="background: #4CAF50;">
                            <i class="fa fa-whatsapp icon"></i> <span>Whatsapp</span>
                        </a>
                    </li>
                    <li class="floatBtnli">
                        <a href="#" style="background: #FF9800">
                            <i class="fa fa-book icon"></i> <span>Tutorial</span>
                        </a>
                    </li>
                </ul>
        <!-- End - Buttons -->
        <!--======Floating Button=========-->



         
		
       
        

        <!----Main----->
    <main class="main-container">


	





        <div class="main-cards" style="margin-top: 30px;">
                <div class="row g-3">
                    <div class="col-sm-8 col-md-12 col-lg-8">
                        <div class="row g-2">
                            <div class="col-sm-12 col-md-12">
                                <div class="pros-topBanner">
                                    <div class="row g-2">
                                        <div class="col-8">
                                            <div style="margin-top: 10px;">
                                                <h3 style="color: #ffffff;">Hi, <?php echo $ApplicantFName;?></h3>
                                                <p style="color: #ffffff;">Welcome Back!</p>
                                                <small style="color: #ffffff; font-size: 11px;">Congratulations on your application! We value your interest in joining our academic community. kindly check your admission status below.</small>
                                                <br> 

                                                    <?php

                                                            if($ApplicantStatus == '0') 
                                                            {
                                                                echo  '<span type="button"   data-currentstatus="0" class="btn btn-warning btn-sm text-light prosloadadminstatusbtn" style="font-size:11px;border-radius:7px;"  >  Pending </span>';

                                                            }else if($ApplicantStatus == '1')
                                                            { 
                                                                echo  '<span type="button"    class="btn btn-danger btn-sm text-light prosloadadminstatusbtn" style="font-size:11px;border-radius:7px;"  >  Declined </span>';
                                                            }else
                                                            {
                                                                    echo  '<span type="button"    class="btn btn-success btn-sm text-light prosloadadminstatusbtn" style="font-size:11px;border-radius:7px;"  >  Admitted </span>'; 
                                                            }


                                                    ?>
                                            </div>
                                        </div>
                                        <div class="col-4">
                                            <img class="tari_img-card" src="../../assets/images/student.png" alt="">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                      

                    </div>

                    <div class="col-sm-4 col-md-12 col-lg-4">
                    <div class="chiCourseCard" style="height: 200px;">
                            <h6 style="padding: 15px 10px 0px 20px; font-weight: 600; font-size: 17px;"><i class="bx bx-user"></i> Exam score</h6>

                            <a href="" style="float: right; margin-top: -30px; margin-right: 10px; color: #666666;">
                                <i class="bx bx-right-arrow-alt" style="font-size: 25px;"></i>
                            </a>

                            <div style="padding: 10px 10px 0px 10px;">
                            <?php



												$pros_select_owner = mysqli_query($link, "SELECT * FROM `admissionchilddetails` WHERE `CampusID`='$CampusID' AND `ChildDetailID`='$ApplicantID'");

												$pros_select_owner_cnt = mysqli_num_rows($pros_select_owner);
												$pros_select_owner_cnt_row = mysqli_fetch_assoc($pros_select_owner);



												  $AdmissionClassID = 	$pros_select_owner_cnt_row['AdmissionClassID'];
												 $Term = 	$pros_select_owner_cnt_row['Term'];


												


												

											$select_cbtquestionsanswers = "SELECT * FROM `cbtquestionsanswers` WHERE 
											`CampusID`='$CampusID' AND `StudentID`='$ApplicantID' AND
											 `sessionID`='$ApplicantsessionName' AND `TermOrSemesterID`='$Term' AND `ClassOrDepartmentID`='$AdmissionClassID'";

											 $select_cbtquestionsanswers_result = mysqli_query($link, $select_cbtquestionsanswers);

											// Calculate the total number of rows
										 
										   $select_cbtquestionsanswers_result_cnt = mysqli_num_rows($select_cbtquestionsanswers_result);

										
											if ($select_cbtquestionsanswers_result_cnt > 0) {

												$score = 0;
												$totscore = 0;

												while ($select_cbtquestionsanswers_result_row = mysqli_fetch_assoc($select_cbtquestionsanswers_result)) {



													$currect_answer = explode(',', $select_cbtquestionsanswers_result_row['Answer']);
													$student_answer = explode(',', $select_cbtquestionsanswers_result_row['studentAnswer']);


													// studentAnswer TheoryScore TotalScore


													$cnt_currect_answer = count($currect_answer);
													$intersect_to_get_marks = count(array_intersect_assoc($student_answer, $currect_answer));

													$totscore += $cnt_currect_answer;
													$score += $intersect_to_get_marks;
												}

												$percentage = ($score / $totscore) * 100;

												$percentageWithoutDecimals = floor($percentage);


												


											
									
										echo '<h1 style="text-align: center; font-size: 50px; margin-top: 20px; color: #0066ff;">' . $score . ' / ' . $totscore . '</h1>';
									} else {
										echo '<h6 style="text-align: center; font-size: 20px; margin-top: 20px; color: #0066ff;">No score found</h6>';
									}
									

                            ?>

                           
                                <p style="text-align: center;">Total Exam score</p>
                            </div>
                    </div>                               
                    </div>
                </div>
                </div>


				<div class="row mt-3 g-3">
				     <div class="col-sm-6 col-md-6 col-lg-6">

					 <?php
					 
					 
					 
					 

							if($ApplicantStatus == '0') 
							{
								
								$applicantfullnamepending = $ApplicantLName.' '.$ApplicantFName;

								echo '<h6>Dear '.$applicantfullnamepending.',</h6>';

								echo '<p>Your application is currently under review, and we are working diligently to process it. Updates will be provided soon.</p>';

							}else if($ApplicantStatus == '1')
							{ 
								echo '<h3>Admission Declined</h3>
								<p>We regret to inform you that your admission application has been declined.</p>';
							}else
							{
								echo '<h3>Accept Admission </h3>
								<p>Congratulations! You have been accepted for admission to our esteemed institution. kindlly click to accept.</p>';
									
							}
						
					?>
					
					 </div>
					 <div class="col-sm-6 col-md-2 col-lg-2"></div>

					 <div class="col-sm-12 col-md-4 col-lg-4">

					 <?php

							if($ApplicantStatus == '0') 
							{
								

							}else if($ApplicantStatus == '1')
							{ 
								
							}else
							{
									echo  '<button type="button" class="btn btn-success acceptadmissionbtn"  style="font-size: 13px;background-color:#1abc9c; border:#1abc9c solid 1px;  border-radius: 10px;">Accept Admission <i class="fa fa-check-circle-o"></i></button>
									&nbsp;&nbsp;&nbsp;
									<span class="text-primary" style="cursor:pointer;" id="download-pdf">Admission letter<i class="fa fa-download"></i></span>

									'; 

									
							}


					?>



							


					 </div>
				</div>


				
				

                <div class="main-cards" style="margin-top: 40px; padding-bottom: 50px;">
                <div class="row g-3">
                    <div class="col-sm-12 col-md-12 col-lg-12">
                        
                        <div class="chiCourseCard" style="height: 98%;">
                            <h6 style="padding: 15px 10px 0px 20px; font-weight: 600; font-size: 17px;">Exam</h6>

                            <div style="padding: 5px 10px 5px 10px;">
                               

                                     <div id="prosloadadmissioncontent"></div>

                                      
                                </div>
                            </div>
                    
                            <a href="" style="text-decoration: none; float: right; margin-top: 10px; margin-right: 20px; font-size: 15px; font-weight: 600;">View all</a>
                        </div>
                    </div>                 
                </div>
                </div>




				<div class="row ">
                    <div class="col-sm-12 col-md-12 col-lg-12">
									<?php
									$getownredetails = mysqli_query($link,"SELECT * FROM `institution` INNER JOIN `agencyorschoolowner` ON `institution`.`AgencyOrSchoolOwnerID` = `agencyorschoolowner`.`AgencyOrSchoolOwnerID` WHERE `institution`.`InstitutionID`='$GroupOfSchoolID'");
									$getownredetailscnt = mysqli_num_rows($getownredetails);
									$getownredetailscntrows = mysqli_fetch_assoc($getownredetails);



									$Agencyorschoolowner = $getownredetailscntrows['AgencyOrSchoolOwnerName'];
									$Agencyorschoolowneraddress = $getownredetailscntrows['AgencyOrSchoolOwnerAddress'];
									$AgencyOrSchoolOwnerState = $getownredetailscntrows['AgencyOrSchoolOwnerState'];
									$AgencyOrSchoolOwnerCity = $getownredetailscntrows['AgencyOrSchoolOwnerCity'];
									$AgencyOrSchoolOwnerEmail = $getownredetailscntrows['AgencyOrSchoolOwnerEmail'];
									$AgencyOrSchoolOwnerWhatsAppPhone = $getownredetailscntrows['AgencyOrSchoolOwnerWhatsAppPhone'];



									$institutionlogo = $getownredetailscntrows['InstitutionLogo'];
									$InstitutionGeneralName = $getownredetailscntrows['InstitutionGeneralName'];
									$Institutionmotto = $getownredetailscntrows['InstitutionMotto'];
									$InstitutionPhone = $getownredetailscntrows['InstitutionPhone'];
									$InstitutionEmail = $getownredetailscntrows['InstitutionEmail'];






									$selectcnt = mysqli_query($link,"SELECT * FROM `admissionletter` WHERE CampusID='$CampusID'");
									$selectcntrow = mysqli_num_rows($selectcnt);
									$selectcntrowcnt = mysqli_fetch_assoc($selectcnt);

					?>

	


				<?php


						if($selectcntrow > 0)
						{



							$selectlettername = $selectcntrowcnt['AdmissionLetter'];


							$applicantfullname = $ApplicantLName.' '.$ApplicantFName;
									

							$replacename = array("[Student's Full Name]","[School Name]", "[Recipient's Name]");
							$replaceownername = array($applicantfullname,$InstitutionGeneralName,$applicantfullname);
							
							// Perform the replacement
							$replaceschoolname = str_replace($replacename, $replaceownername, $selectlettername);

								// Perform the replacement

												echo '
												<div class="row">
												<div class="col-sm-12 col-md-12 col-lg-12">
												<div class="container" id="printdownload-admission" style="display:none;">
												<div class="row">
													<div class="col-sm-2 col-md-2 col-xs-2 col-lg-2">
														<div align="center">
															<img src="'.$institutionlogo.'" class="img-fluid" alt="...">
														</div>
													</div>
													<div class="col-sm-10 col-md-10 col-xs-10 col-lg-10">
														<p style="color: #000000;font-size:30px;">'.$InstitutionGeneralName.'</p>
														<p style="color: #000000;font-size:13px;font-weight:450;">Motto: '.$Institutionmotto.' | Phone: '.$InstitutionPhone.' | Email: '.$InstitutionEmail.'</p>
													</div>
												</div>
												';
												
						
											
												echo 
												
												'<div>
													'.$replaceschoolname.'
												</div>
												</div>
												</div>
												</div>
												';
								




									}else
									{



									}

					?>

								
                        </div>
                    </div>                 
             





			



          




				
        </main>
        <!-- End Main -->

    </div>

    

    <!--Script-->
    <!--jquery knob -->
    <script src="../../assets/plugins/knob/jquery.knob.js"></script>

    <script>
        $(function () {
            $('[data-plugin="knob"]').knob();
        });

        // $(window).on('load', function() {
        //     // When the window finishes loading, hide the preloader
        //     $('.preloader').fadeOut('slow');
        // });



    </script>
    
    
    <!-- Chima JS- -->
	 <script src="../../js/user_js/teacher_js/staffScript.js"></script>
    <script src="../../js/user_js/bootstrap.bundle.min.js"></script>

    <!--CALENDER UI JS -->
	<script src="../../js/website_js/Calender UI/cal.js"></script>
    
    <!--Chart UI JS -->
    <script src="../../js/website_js/Charts/morris.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
    <!--google chart-->

    <!--Apexcharts-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/apexcharts/3.40.0/apexcharts.min.js"></script>


        <?php include('../../controller/js/applicant/viewapplicantcont.php'); ?>
	 <!--Notifier UI -->
	 <script src="../../css/website_css/wnoty/wnoty.js"></script>
    
  
    
    
</body>

</html>