<?php
				
			    
 if($UType == 'parent')
 {
?>


         <!-- Header -->
		 <header class="chiheader">

		<div class="menu-icon" style="cursor: pointer;" onclick="openSidebar()">
			<span class="material-icons-sharp">menu</span>
		</div>

		<input type="hidden" id="user_type_holder" value="<?php echo $UType;?>">
		<input type="hidden" id="user_id" value="<?php echo @$parentID;?>">
		<input type="hidden" id="institutionid_header" value="<?php echo @$GroupOfSchoolID;?>">
		
	

		<div class="header-left">
			<div class="input-group">
				<div class="input-group-text"
					style="border-radius:10px 0px 0px 10px;border-right:none;background:transparent;border-color:#007ffb;">
					<i class="fa fa-chain-broken" aria-hidden="true" style="color:#007ffb;"></i>
				</div>
				
			    <select class="form-select dropbtn abba_display_mykids" id="autoSizingSelect"style="border-left:none;background:transparent;border-color:#007ffb;">
			
				    <option value="NULL" selected disabled>Switch To Kids</option>
				    
					<?php
					
					
    						$parentID = mysqli_real_escape_string($link, $parentID);
    
    						$prosgerstudentrec = mysqli_query($link, "SELECT * FROM `student` JOIN `parent` ON `student`.`ParentID` = `parent`.`ParentID`
    						WHERE `parent`.`ParentID` ='$parentID' ORDER BY `student`.`StudentFirstName` ASC");
    						$prosgerstudentrec_cnt = mysqli_num_rows($prosgerstudentrec);
						
    						
    						if($prosgerstudentrec_cnt > 0)
    						{
    							$cnt =1;
    
    							while($row = mysqli_fetch_assoc($prosgerstudentrec)){
    							    
    							    
    								if($cnt++ == 1)
    								{
    									$selected = "selected";
    								}
    								else
    								{
    									$selected = "";
    								}
    								
    								$CampusID = $row['CampusID'];
    
    								$StudentFirstName = $row['StudentFirstName'];
    								$StudentMiddleName = $row['StudentMiddleName'];
    								$StudentLastName = $row['StudentLastName'];
    								$StudentID = $row['StudentID'];
    
    								if($StudentMiddleName > 5)
    								{
    									$StudentMiddleName_shortened_or_not = substr($StudentMiddleName, 0, 1).'.';
    								}
    								else
    								{
    									$StudentMiddleName_shortened_or_not = $StudentMiddleName;
    								}
    
    								echo '<option value="'.$StudentID.'" data-id="'.$CampusID.'" '.$selected.'>'.$StudentLastName.' '.$StudentMiddleName_shortened_or_not.' '.$StudentFirstName.'</option>';
    								
    							}
    							
    						}
    						else
    						{
    
    						}
    						
    						
					?>
				</select>
				<!-- <div class="input-group-text dropdown-caret"
					style="border-radius:0px 10px 10px 0px;border-left:none;background:transparent;border-color:#007ffb;">
					<i class='fa fa-angle-double-down' style="color:#007ffb;"></i>
				</div> -->
			</div>
		</div>

		<div class="header-right">                             
			<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">
					
						<a data-bs-toggle="modal" href="#abba_create_parent_Modal" type="button" class="btn btn-outline-primary btn-sm chiInviteBtn" style="margin-right: 20px; font-size: 13px; margin-top: -5px; border-radius: 10px;">
							Invite Spouse
						</a>
						
						<!-- 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> 
									<!-- <i class="fa fa-angle-down" style="font-size: 13px;" aria-hidden="true"></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">
								<h6 class="text-body mb-0 me-auto">Notification</h6>
								<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-6 bx-envelope-open"></i></a>
								</div>
							</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">
								    <small>View all notifications</small>
								</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($ParentPhoto == '' || $ParentPhoto == '0'){

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

										}else{
										
										echo '<img src="'.$ParentPhoto.'" alt class="w-px-40 h-auto rounded-circle">';

										}
								?>
								
							</div>
							</a>
							<ul class="dropdown-menu dropdown-menu-end">
							<li>
								<a class="dropdown-item" href="<?php echo $defaultUrl; ?>app/parent-profile?id=<?php echo $UserID; ?>&source=1">
								<div class="d-flex">
									<div class="flex-shrink-0 me-5">
									<div class="avatar avatar-online">
									<?php
										if($ParentPhoto == '' || $ParentPhoto == '0'){

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

											}else{
											
											echo '<img src="'.$ParentPhoto.'" alt class="w-px-40 h-auto rounded-circle">';

											}
									?>
									</div>
									</div>
									<div class="flex-grow-1">
									<span class="fw-semibold d-block">
										<?php echo $ParentFirstName;?> <?php echo $ParentLastName;?>
									</span>
									<small class="text-muted">Parent</small>
									</div>
								</div>
								</a>
							</li>
							<li>
								<div class="dropdown-divider"></div>
							</li>
							<li>
								<a class="dropdown-item" href="<?php echo $defaultUrl; ?>app/parent-profile?id=<?php echo $UserID; ?>&source=1">
								<i class="bx bx-user me-2"></i>
								<span class="align-middle">My Profile</span>
								</a>
							</li>
							
				
							<li>
								<a class="dropdown-item" href="../wallet">
								<i class="bx bx-credit-card me-2"></i>
								<span class="align-middle">Wallet</span>
								</a>
							</li>
											<li>
								<div class="dropdown-divider"></div>
							</li>
											<li>
								<a class="dropdown-item" href="../../controller/portal_login/logout.php">
								<i class='bx bx-log-in me-2'></i>
								<span class="align-middle">Logout</span>
								</a>
							</li>
							</ul>
						</li>
						<!--/ User -->
					</ul>
				</div>
			</div>
		</div>
</header>
<!--End Header -->




<?php

 }
 else if($UType == 'student')
 {
 ?>    
          
                
      <!-- Header -->
        <header class="chiheader">

            <div class="menu-icon" style="cursor: pointer;" onclick="openSidebar()">
                <span class="material-icons-sharp">menu</span>
            </div>
          
            
            	<input type="hidden" id="user_type_holder" value="<?php echo $UType;?>">
	          	<input type="hidden" id="user_id" value="<?php echo @$studentID;?>">
	          	<input type="hidden" id="header-campusid" value="<?php echo @$CampusID;?>">

  
            <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> 
									<!-- <i class="fa fa-angle-down" style="font-size: 13px;" aria-hidden="true"></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">
                                    <h6 class="text-body mb-0 me-auto">Notification</h6>
                                    <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-6 bx-envelope-open"></i></a>
                                </div>
                            </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">
                                    <small>View all notifications</small>
                                </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($StudentPhoto == '' || $StudentPhoto == '0'){

										echo '<img src="../../assets/images/Staff-Profile-Images/dummy.png" alt class="w-px-40 h-auto rounded-circle">';
	
										}else{
										
										echo '<img src="'.$StudentPhoto.'" alt class="w-px-40 h-auto rounded-circle">';
	
										}
								?>
								
							</div>
							</a>
							<ul class="dropdown-menu dropdown-menu-end">
							<li>
								<a class="dropdown-item" href="profile-user.html">
								<div class="d-flex">
									<div class="flex-shrink-0 me-5">
									<div class="avatar avatar-online">
									    
        									<?php
        										if($StudentPhoto == '' || $StudentPhoto == '0'){
        
        										    	echo '<img src="../../assets/images/Staff-Profile-Images/dummy.png" alt class="w-px-40 h-auto rounded-circle">';
        		
        											}else{
        											
        										      	echo '<img src="'.$StudentPhoto.'" alt class="w-px-40 h-auto rounded-circle">';
        		
        											}
        									?>
									
									</div>
									</div>
									<div class="flex-grow-1">
									<span class="fw-semibold d-block">
										<?php echo $StudentFirstName;?> <?php echo $StudentLastName;?>
									</span>
									<small class="text-muted">Student</small>
									</div>
								</div>
								</a>
							</li>
							<li>
								<div class="dropdown-divider"></div>
							</li>
							<?
							


							    // Plain text to encrypt
                                $plain_text = 'id=' . $studentID . '&camp=' . $CampusID . '&usertype=' . $UType . '&whoid=1';
                        
                                // Secret key (32 bytes for AES-256, adjust as per the encryption algorithm)
                                $secret_key = "16-character-secret"; // Replace with your secure secret key
                        
                                // Encryption algorithm and mode (AES-256 CBC)
                                $encryption_algo = "AES-256-CBC";
                        
                                // Initialization vector (IV) - random bytes for each encryption
                                $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($encryption_algo));
                        
                                // Perform encryption
                                $encrypted_data = openssl_encrypt($plain_text, $encryption_algo, $secret_key, OPENSSL_RAW_DATA, $iv);
                        
                                // Combine IV and cipher text for storage/transfer
                                $encrypted_message = base64_encode($iv . $encrypted_data);
                        
                                // Create the URL with the encrypted data and encryption algorithm
                                $encoded_message = urlencode($encrypted_message);
                                // $encrypted_url = $main_url."student/profile/?const=" . $encoded_message;
							
							?>
							<li>
								<a class="dropdown-item" href="../profile/?const=<?php echo $encoded_message;?>">
								<i class="bx bx-user me-2"></i>
								<span class="align-middle">My Profile</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 -->  
     
 <?php    
 }
 else
{
?>
          


	         
				<header class="header">

				<div class="menu-icon" style="cursor: pointer;" onclick="openSidebar()">
					<span class="material-icons-sharp">menu</span>
				</div>

				<div class="header-left">
					<div class="input-group">
						<div class="input-group-text"
							style="border-radius:10px 0px 0px 10px;border-right:none;background:transparent;border-color:#007ffb;">
							<i class='fa fa-university sideicon' style="color:#007ffb;"></i>
						</div>
						
						<input type="hidden" id="user_type_holder" value="<?php echo $UType;?>">
						
						<input type="hidden" id="user_id" value="<?php echo @$schoolHeadID;?>">
						<input type="hidden" id="user_id_admin" value="<?php echo @$adminID;?>">
						<input type="hidden" id="user_id_teacher" value="<?php echo $teacherID ;?>">
                
						<input type="hidden" id="institutionid_header" value="<?php echo $GroupOfSchoolID ;?>">
					<select class="form-select dropbtn abba_display_campus" id="autoSizingSelect" style="border-radius:0px 10px 10px 0px;border-left:none;background:transparent;border-color:#007ffb;"">
					
						<option value="NULL" selected disabled>Select Campus</option>
							<?php
							
							
								if($UType == 'schoolhead')
								{
									
									$abba_sql_institution = ("SELECT * FROM `section` INNER JOIN campus ON section.CampusID = campus.CampusID WHERE PrincipalOrDeanOrHeadTeacherUserID = '$schoolHeadID' ORDER BY CampusName ASC LIMIT 1");
									$abba_query_link_institution = mysqli_query($link, $abba_sql_institution);
									$abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution);
									$abba_row_cnt_institution = mysqli_num_rows($abba_query_link_institution);

									if($abba_row_cnt_institution > 0)
									{
										$cnt =1;

										do{
											if($cnt++ == 1)
											{
												$selected = "selected";
											}
											else
											{
												$selected = "";
											}
											$CampusID = $abba_get_details_institution['CampusID'];

											$CampusName = $abba_get_details_institution['CampusName'];

											$abba_institution_id = $abba_get_details_institution['InstitutionID'];
											
											$CampusName_string_length = strlen($CampusName);

											if($CampusName_string_length > 20)
											{
												$CampusName_shortened_or_not = substr($CampusName, 0, 20).'..';
											}
											else
											{
												$CampusName_shortened_or_not = $CampusName;
											}

											echo '<option value="'.$CampusID.'" data-id="'.$abba_institution_id.'" data-name="'.$CampusName.'" '.$selected.'>'.$CampusName_shortened_or_not.'</option>';
											
										}while($abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution));


									}
									else
									{

									}

								}
								else if($UType == 'teacher')
								{
									$abba_sql_institution = ("SELECT DISTINCT(`campus`.`CampusID`),`campus`.`CampusName`,`campus`.`InstitutionID` FROM `courseorsubjectallocation` INNER JOIN `classordepartment`
										ON `courseorsubjectallocation`.`ClassOrDepartmentID` = `classordepartment`.`ClassOrDepartmentID` INNER JOIN `campus` ON
										`campus`.`CampusID` = `courseorsubjectallocation`.`CampusID`
										WHERE `campus`.`InstitutionID`='$GroupOfSchoolID' AND `courseorsubjectallocation`.`CourseOrSubjectTeacherUserID`='$teacherID' ORDER BY `campus`.CampusName ASC");
										$abba_query_link_institution = mysqli_query($link, $abba_sql_institution);
										$abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution);
								    	$abba_row_cnt_institution = mysqli_num_rows($abba_query_link_institution);
									
									if($abba_row_cnt_institution > 0)
									{
										$cnt =1;
				
										do{
											if($cnt++ == 1)
											{
												$selected = "selected";
											}
											else
											{
												$selected = "";
											}
											$CampusID = $abba_get_details_institution['CampusID'];
				
											$CampusName = $abba_get_details_institution['CampusName'];
				
											$abba_institution_id = $abba_get_details_institution['InstitutionID'];
											
											$CampusName_string_length = strlen($CampusName);
				
											if($CampusName_string_length > 20)
											{
												$CampusName_shortened_or_not = substr($CampusName, 0, 20).'..';
											}
											else
											{
												$CampusName_shortened_or_not = $CampusName;
											}
				
											echo '<option value="'.$CampusID.'" data-id="'.$abba_institution_id.'" data-name="'.$CampusName.'" '.$selected.'>'.$CampusName_shortened_or_not.'</option>';
											
										}while($abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution));
										
									}
									else
									{
									    $abba_sql_institution_form = ("SELECT DISTINCT(`campus`.`CampusID`),`campus`.`CampusName`,`campus`.`InstitutionID` FROM `classordepartment` INNER JOIN `campus` ON
										`campus`.`CampusID` = `classordepartment`.`CampusID`
										WHERE `campus`.`InstitutionID`='$GroupOfSchoolID' AND `classordepartment`.`HODOrFormTeacherUserID`='$teacherID' ORDER BY `campus`.CampusName ASC");
										$abba_query_link_institution_form = mysqli_query($link, $abba_sql_institution_form);
										$abba_get_details_institution_form = mysqli_fetch_assoc($abba_query_link_institution_form);
								    	$abba_row_cnt_institution_form = mysqli_num_rows($abba_query_link_institution_form);
									
										if($abba_row_cnt_institution_form > 0)
										{
											$cnt_form =1;
					
											do{
												if($cnt_form++ == 1)
												{
													$selected_form = "selected";
												}
												else
												{
													$selected_form = "";
												}
												$CampusID_form = $abba_get_details_institution_form['CampusID'];
					
												$CampusName_form = $abba_get_details_institution_form['CampusName'];
					
												$abba_institution_id_form = $abba_get_details_institution_form['InstitutionID'];
												
												$CampusName_string_length_form = strlen($CampusName_form);
					
												if($CampusName_string_length_form > 20)
												{
													$CampusName_shortened_or_not_form = substr($CampusName_form, 0, 20).'..';
												}
												else
												{
													$CampusName_shortened_or_not_form = $CampusName_form;
												}
					
												echo '<option value="'.$CampusID_form.'" data-id="'.$abba_institution_id_form.'" data-name="'.$CampusName_form.'" '.$selected_form.'>'.$CampusName_shortened_or_not_form.'</option>';
												
											}while($abba_get_details_institution_form = mysqli_fetch_assoc($abba_query_link_institution_form));
											
										}
										else
										{
											
											echo '<option value="Null">No Campus Found.</option>';
												
										}
									    
									}
									
								}
								else
								{
								
									$abba_sql_institution = ("SELECT * FROM `campus` WHERE `InstitutionID` = '$GroupOfSchoolID' AND FIND_IN_SET('$adminID', `Admin`) > 0  ORDER BY `CampusName` ASC");
									$abba_query_link_institution = mysqli_query($link, $abba_sql_institution);
									$abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution);
									$abba_row_cnt_institution = mysqli_num_rows($abba_query_link_institution);
									
									
									
									

									if($abba_row_cnt_institution > 0)
									{
										$cnt =1;

										do{
										    
										    
											if($cnt++ == 1)
											{
												$selected = "selected";
											}
											else
											{
												$selected = "";
											}
											$CampusID = $abba_get_details_institution['CampusID'];

											$CampusName = $abba_get_details_institution['CampusName'];

											$abba_institution_id = $abba_get_details_institution['InstitutionID'];
											
											$CampusName_string_length = strlen($CampusName);

											if($CampusName_string_length > 20)
											{
												$CampusName_shortened_or_not = substr($CampusName, 0, 20).'..';
											}
											else
											{
												$CampusName_shortened_or_not = $CampusName;
											}

											echo '<option value="'.$CampusID.'" data-id="'.$abba_institution_id.'" data-name="'.$CampusName.'" '.$selected.'>'.$CampusName_shortened_or_not.'</option>';
											
										}while($abba_get_details_institution = mysqli_fetch_assoc($abba_query_link_institution));
										
									}
									else
									{

									}

								}

							?>
						</select>
						<!-- <div class="input-group-text dropdown-caret"
							style="border-radius:0px 10px 10px 0px;border-left:none;background:transparent;border-color:#007ffb;">
							<i class='fa fa-angle-double-down' style="color:#007ffb;"></i>
						</div> -->
					</div>
				</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>
										<!-- <i class="fa fa-angle-down" style="font-size: 13px;" aria-hidden="true"></i> -->
									</span>

									<div class="langdropdown-content">
										<?php

											$sql_language = "SELECT * FROM language";
											$query_language = mysqli_query($link, $sql_language);
											$fetch_language = mysqli_fetch_assoc($query_language);
											$cnt_language = mysqli_num_rows($query_language);

											if ($cnt_language > 0) {

												do {
												    
												    // echo $fetch_language['Language'];
												    
												    if($fetch_language['Language'] == 'English')
												    {
												        
													    echo '<a href="#">' . $fetch_language['Language'] . '</a>';

												    }
												    else
												    {
												        
												    }

												} while ($fetch_language = mysqli_fetch_assoc($query_language));

											} 
											else 
											{
												echo '<option value="english">English</option>';
											}
										?>

									</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">
											<h6 class="text-body mb-0 me-auto">Notification</h6>
											<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-6 bx-envelope-open"></i></a>
										</div>
									</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">
											<small>View all notifications</small>
										</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" id="headerpic">
										<?php
										    echo '<img src="'.$userPicture.'" alt class="w-px-40 h-auto rounded-circle" id="headerPic">';
										?>

									</div>
								</a>
								<ul class="dropdown-menu dropdown-menu-end">
									<li>
										<a class="dropdown-item" href="<?php echo $defaultUrl; ?>/app/staff-profile?itemid=<?php echo $UserID; ?>&InstitutionID=<?php echo $GroupOfSchoolID; ?>&source=1">
											<div class="d-flex">
												<div class="flex-shrink-0 me-3">
													<div class="avatar avatar-online">
														<?php
														echo '<img src="'.$userPicture.'" alt class="w-px-40 h-auto rounded-circle" id="headerPic">';
														?>
													</div>
												</div>
												<div class="flex-grow-1">
													<span class="fw-light" id="firstN">
														<?php echo  $StaffFirstName; ?>
													</span>
													<span class="fw-light" id="surN">
														<?php echo $StaffLastName; ?>
													</span>
													
												
													<br>
													<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="<?php echo $defaultUrl; ?>/app/staff-profile?itemid=<?php echo $UserID ; ?>&InstitutionID=<?php echo $GroupOfSchoolID; ?>&source=1">
											<i class="bx bx-user me-2"></i>
											<span class="align-middle">My Profile</span>
										</a>
									</li>
									<li>
										<a class="dropdown-item"
											href="../wallet">
											<i class="bx bx-credit-card me-2"></i>
											<span class="align-middle">Wallet</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>
				
				
				
				        
				<div class="modal fade" id="ekene_progress_report" tabindex="-1" aria-labelledby="ekene_progress_reporttmodalLabel" aria-hidden="true" >
			     	<div class="modal-dialog modal-xl" style="width:80%;">
					   <div class="modal-content" style="border-radius: 20px;">
							<div class="modal-header">
							
							</div>
							<div class="modal-body">
					
								<!-- <input type="hidden" id=""> -->

								<!-- <div id="publishandunpulishassignment"></div> -->
                                 <div class="row">
								

							  <div class="col-md-12 col-lg-2">
                                <div class="form-group abba_local-forms ekene_select_class">
                                    <label>Class<span style="color:orangered;">*</span> </label>
                                    <select class="form-control" id="emma_display_section_for_display_class">
                                        <option value="NULL">Select class</option>
                                    </select>
                                </div>
                            </div>

							<div class="col-md-12 col-lg-2">
                                <div class="form-group abba_local-forms ekene_select_class">
                                    <label>Subject<span style="color:orangered;">*</span> </label>
                                    <select class="form-control" id="emma_display_section_for_display_subject">
                                        <option value="NULL">Select Subject</option>
                                    </select>
                                </div>
                            </div>

							
							<div class="col-md-12 col-lg-2">
                                <div class="form-group abba_local-forms ekene_select_class">
                                    <label>Term<span style="color:orangered;">*</span> </label>
                                    <select class="form-control" id="emma_display_section_for_display_term">
                                        <option value="NULL">Select Term</option>
                                    </select>
                                </div>
                            </div>

							<div class="col-md-12 col-lg-2">
                               
                            </div>
                          <div class="col-md-12 col-lg-2">
                            <button type="button" class="btn btn-primary btn-sm" id="emma_load_assignment_question" style="width: 100%;">
                                <span style="font-size: 13px;">Load</span>
							</button>
                          </div>
						</div>

							<div class="col-12 mt-3">
								
										<div class="row mt-4">
											<div class="col-12 mt-3" id="display_progress_report">
												<div align="center">
													<img src="../../assets/images/adminImg/filter.png" style="width:15%;opacity:0.7;" />
													<p class="pt-2 fs-6 text-secondary">Please
														filter to proceed.</p>
												</div>
											
											</div>
										</div>
								

							</div>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
								<button type="button" class="btn btn-success" id="submit_topic_ekene">Done</button>
							</div>
						</div>
					</div>
				</div>

				
				
			



<?php

  }
?>




<div class="modal fade modalshow modalfade" id="abba_create_parent_Modal" tabindex="-1"
    aria-labelledby="abba_create_parent_ModalLabel" aria-hidden="true">
    <div class="modal-dialog dialogcontent modal-dialog-scrollable" style="border-top-left-radius: 20px; width: 100%;">
        <div class="modal-content modalcontent" style="background-color:#ffffff; ">

            <div class="modal-header">
                <h5 class="modal-title text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
                        viewBox="0 0 24 24">
                        <path fill="currentColor"
                            d="M19 17v2H7v-2s0-4 6-4s6 4 6 4m-3-9a3 3 0 1 0-3 3a3 3 0 0 0 3-3m3.2 5.06A5.6 5.6 0 0 1 21 17v2h3v-2s0-3.45-4.8-3.94M18 5a2.91 2.91 0 0 0-.89.14a5 5 0 0 1 0 5.72A2.91 2.91 0 0 0 18 11a3 3 0 0 0 0-6M8 10H5V7H3v3H0v2h3v3h2v-3h3Z" />
                    </svg> Invite Parent
                </h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div style="position: fixed; margin-left: -10px; margin-top: -30px;">
                    
                </div>
                <!-- Navbar pills -->
                <div class="row">
                    <div class="col-sm-12">
                        <!-- Nav tabs -->
                        <div class="col-sm-12">
                            <ul class="nav nav-tabs mb-3 customtab" id="abba_ex1" role="tablist">
                                <li class="nav-item" role="presentation">
                                    <a
                                    class="nav-link active"
                                    id="abba_ex1-tab-10"
                                    data-bs-toggle="tab"
                                    href="#abba_ex1-tabs-10"
                                    role="tab"
                                    aria-controls="abba_ex1-tabs-10"
                                    aria-selected="true">Invite Via Whatsapp</a>
                                </li>
                                <!-- <li class="nav-item" role="presentation">
                                    <a
                                    class="nav-link"
                                    id="abba_ex1-tab-20"
                                    data-bs-toggle="tab"
                                    href="#abba_ex1-tabs-20"
                                    role="tab"
                                    aria-controls="abba_ex1-tabs-20"
                                    aria-selected="false">Invite Via Email</a
                                    >
                                </li> -->
                            </ul>
                        
                            
                            <div class="tab-content" id="ex1-content">

                                <div class="tab-pane fade show active" id="abba_ex1-tabs-10" role="tabpanel" aria-labelledby="abba_ex1-tab-10">
                                    <input type="text" id="text-to-copy" value="<?php echo $main_url;?>/spouse-invite?userid=<?php echo $UserID; ?>" readonly style="border:none;width:100%;"><br><br>

                                    <button type="button" class="btn btn-primary btn-sm"><i class="fa fa-file" id="copy-button"> Copy</i></button>

                                    <a href="whatsapp://send?text=https://<?php echo $main_url;?>/spouse-invite?userid=<?php echo $UserID; ?>" id="abba_parent_invite_link" type="button" class="btn btn-success btn-sm" data-action="share/whatsapp/share"><i class="fa fa-whatsapp"> Share via WhatsApp</i></a>
                                   
                                </div>
                                
                                <!-- <div class="tab-pane fade" id="abba_ex1-tabs-20" role="tabpanel" aria-labelledby="abba_ex1-tab-20">
                                    Tab 2 content
                                </div> -->
                            </div>
                            <!-- Tab panes -->
                        </div>
                    </div>
                </div>
                <!-- Navbar pills -->
            </div>
        </div>
    </div>
</div>


<script>

    $('body').on('click','#logout_btn',function(){
        localStorage.clear();
    });
    
    
    
    
</script>
<script src="../../controller/js/teacher/progressreport.js"></script>

