<?php 
    include ('../controller/session/session-checker.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 http-equiv="X-UA-Compatible" content="IE=edge"/>
	<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 ">	
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
      <!-- SITE TITLE -->
    <title>EduMESS | Result Checker</title>
	<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="../css/website_css/registration.css" rel="stylesheet">	

    <!-- Wnoty Css -->
    <link href="../css/website_css/wnoty/wnoty.css" rel="stylesheet">	

	<link href="../assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">	
    <link rel="stylesheet"  href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> 

    <style>
    #carouselHero .carousel-item img {  
        object-fit: cover;
        object-position: center;
        overflow: hidden;
        height: 100vh;
    }

    #carouselHero .carousel-item:before {
        content: "";
        background-image:
            linear-gradient(
            to bottom,
            transparent, rgba(0,0,0,0.5)
            );
        display: block;
        position: absolute;
        top: 0;
        width: 100vw;
        height: 100vh;
    }
    .caption{
        position: relative;
        margin-top:58%;
        margin-left: 5%;
        color:white;
        font-size: 12px;
    }

    .caption-logo{
        position: relative;
        padding-top:10px;
        margin-right:80%;
        color:white;
        width:40%;
    }

    .caption-logo img{
        width:40%;
        margin-right:35%;
    }
    .caption2{
        display:none;
    }

    #submit{
        width: 100%;
    }

    @media only screen and (min-width: 280px) and (max-width:914px) {

        .caption2{
            display:initial;
            font-size: 12px;
            text-align: center;
        }
        .center{
            width:100%;
        }

        #submit{
        width: 100%;
        } 
        .lang{
            width: 100%;
        }
    }
    </style>
 </head>
  <body style="overflow-x: hidden;">
        <!--======================== HTML CONTENT===================== -->	
        <section id="wrapper" >
         <div class="row" align="center">

            <!-- Carousel Section col-8 -->
            <div class="col-sm-8 col-md-8 col-lg-8 bg-light" id="carousel-hide">
                <div id="carouselHero" class="carousel slide d-none d-sm-block" data-ride="carousel">
                    <div class="carousel-inner">
                        
                        <?php
                            
                            if($LoginBgImage === '' || $LoginBgImage === 0)
                            {
                                
                            }
                            else
                            {
                                echo '<div class="carousel-item active">
                                        <img src="'.$LoginBgImage.'" class="d-block w-100" alt="Image Description">
                                        
                                    </div>';
                            }
                            
                            if($LoginBgImage2 === '' || $LoginBgImage2 === 0)
                            {
                                
                            }
                            else
                            {
                                echo '<div class="carousel-item">
                                        <img src="'.$LoginBgImage2.'" class="d-block w-100" alt="Image Description">
                                        
                                    </div>';
                            }
                            
                            if($LoginBgImage3 === '' || $LoginBgImage3 === 0)
                            {
                                
                            }
                            else
                            {
                                echo '<div class="carousel-item">
                                        <img src="'.$LoginBgImage3.'" class="d-block w-100" alt="Image Description">
                                        
                                    </div>';
                            }
                        ?>
                        
                        <div class="caption-logo">
                            <img class="img-fluid" src="../assets/images/website_images/edumes-blue.png">
                        </div>
                        <div class="caption">
                            <p class="text-left">Version 2.0<br>Copyright © <?php echo date("Y");?> Powered by <a href="edumess.com"> EDUMESS</a>. All rights reserved.</p>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Carousel Section col-8 -->

            <!-- Form Section col-4 -->
            <div class="col-sm-4 col-md-4 col-lg-4 p-5 formy" style="margin-top:-15px;">
                <div class="form-control-sm pull-right">
                        <select class="form-control small" style="font-size:12px;" id="changelanguage">
                        <option value="english" selected>English</option>
                        </select>
                </div>
                <div class="row mt-3">
                    <span align="center"><img class="img-fluid" src="<?php echo $InstitutionLogo;?>" style="width:15%;position:relative;top:10px;"><span><p></p>
                </div>
                <div class="row">
                    <p class="col-sm-12 text-uppercase small" style=""><?php echo $SchoolGeneralName;?></p>
                </div>
                <div class="row mt-2 pull-left">
                    <h4 class="col-4">Result</h4>
                </div>
                <div class="alert">
                </div>
                
                <div class="center ">
            		<input type="text"  
                    autocomplete="off"
                    class="generalinput"
                    id="email"
                    placeholder="Pin">
        			<i class="fa fa-lock icon"></i>
                </div>
                <div class="email-error">
                </div>
               
                <div class="password-error">
                    
                    
                </div>
                
                   

                           <select class="center text-center" id="campus">
                              <option class="medium" value="0" selected>---Select Session--</option>
                              
                                    <?php
                                    
                                    
                                                
                                             $abba_sql_session = ("SELECT * FROM `session` ORDER BY sessionName DESC");
                                             $abba_result_session = mysqli_query($link, $abba_sql_session);
                                             $abba_row_session = mysqli_fetch_assoc($abba_result_session);
                                             $abba_row_cnt_session = mysqli_num_rows($abba_result_session);
                            
                                             if ($abba_row_cnt_session > 0) {
                                                 do {
                                                     if ($abba_row_session['sessionStatus'] == '1') {
                                                         $abba_selected_session = 'selected';
                                                     } else {
                                                         $abba_selected_session = '';
                                                     }
                                                     echo '<option value="' . $abba_row_session['sessionName'] . '" ' . $abba_selected_session . '>' . $abba_row_session['sessionName'] . '</option>';
                            
                                                 } while ($abba_row_session = mysqli_fetch_assoc($abba_result_session));
                                             } else {
                                                 echo '<option value="0">No Records Found</option>';
                                             }

                                    
                                    
                                    ?>
                                    

                            </select>
                            
                            
                            <select class="center text-center" id="campus">
                              <option class="medium" value="0" selected>---Select Term--</option>
                              <?php
                              
                              
                                       $progettermsql = mysqli_query($link, "SELECT * FROM `termorsemester`");

                                       $progettermsql_cnt = mysqli_num_rows($progettermsql);
                                        $progettermsql_cnt_row = mysqli_fetch_assoc($progettermsql);
                     
             
                                                 if($progettermsql_cnt  > 0)  
                                                 {
                                 
                                 
                                                          
                                 
                                                             do{
                                 
                                 
                                                               $TermAliasName =   $progettermsql_cnt_row['TermOrSemesterName'];
                                                               $TermOrSemesterID =   $progettermsql_cnt_row['TermOrSemesterID'];
                                                               $statusnew =   $progettermsql_cnt_row['status'];
                                 
                                 
                                                               if($statusnew == '1')
                                                               {
                                                                   $prosloadstatus = 'selected';
                                                               }else
                                                               {
                                                                 $prosloadstatus = '';
                                                               }
                                 
                                                                  echo '<option '.$prosloadstatus .' value="'.$TermOrSemesterID.'">'.$TermAliasName.'</option>';
                                 
                                                             }while($progettermsql_cnt_row = mysqli_fetch_assoc($progettermsql));
                                                 }else
                                                 {
                                 
                                                     echo '<option value="NULL">No term found!</option>';
                                 
                                                 }
                                                              
                              
                              ?>
                              
                              
                              
                              

                            </select>
                            
                              <select class="center text-center" id="campus">
                                  
                                    <option class="medium" value="0" selected>---Result Type--</option>
                                         
                                      
                                    <option value="NULL" disabled>Select Result Type</option>
                                    <option value="mid-term" >Mid-Term Result</option>
                                    <option value="termly" selected>Termly Result</option>
                                    <option value="cummulative">Cummulative Result</option>
                                
                                         
                                         

                            </select>
                    
                        
                 
                
                <div class="campus-error">
                </div>
                <button type="submit"
                    style="background-color:#007bff; cursor:pointer;"
                    id = "submit" 
                    class="btn btn-block btn-lg text-light center submit">Check Result
                </button>
                <div class="row mt-3 d-flex check">
                    <div class="col-xsm-6 col-sm-6 col-md-6 col-lg-6">
                        
                    </div>
                    <div class="col-xsm-6 col-sm-6 col-md-6 col-lg-6">
                        <a style="color:#2e5ca2;font-size:12px;" href="../sign-in?lang=<?php echo $lang; ?>">Login</a>
                    </div>
                </div>
                <div class="caption2 col-xsm-6 col-sm-6 col-md-6 col-lg-6">
                    <p class="text-left ml-3 mt-1" style="color:black">Version 2.0<br>Copyright © 2023 Powered by EDUMESS. All rights reserved.</p>
                </div>
                <!-- <div class="caption2 d-none d-sm-block">
                    <p class="text-left" style="color:black">Version 2.0 <br>Powered by EDUMESS</p>
                </div> -->
            </div>
            <!-- End Form Section col-4 -->
         </div>    
        </section>
     <!--======================== HTML CONTENT===================== -->	
   
        <!--======================== HTML CONTENT===================== -->	
    
        <!-- EXTERNAL SCRIPTS============================================= -->	
        <script src="../assets/plugins/jquery/jquery.min.js"></script>
        <!-- Bootstrap tether Core JavaScript -->
        <script src="../assets/plugins/bootstrap/js/popper.min.js"></script>
        <script src="../assets/plugins/bootstrap/js/bootstrap.min.js"></script>

		 <!--web ui content -->
		<script src="../js/website_js/registration.js"></script>
         <!--web ui content -->

         <!--owl carousel ui content -->
         <script src="../css/website_css/owl/owl.carousel.min.js"></script>

          <!--Notifier UI -->
          <script src="../css/website_css/wnoty/wnoty.js"></script>

		  <!--registration callback -->
		 <script src="../controller/js/website/registrationcall.js"></script>
		  <!--registration callback -->
        

  </body>
</html>