<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>


<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title> Demo Video | EduPortal</title>
    <?php include('RootMe/css_links.php');?>
   
<style>

.tdStyle{border-bottom:1px solid lightgray;}
.thStyle{background-color:#00AFEF;color:white;}

</style>
  </head>

  <script type="text/javascript">
  function getmodulevideos(modules)
{
 
  
   if(modules=="")
      alert("Please select any Modules to view Videos");
  else
     var ajx;  // The variable that makes Ajax possible!
  
  if(window.XMLHttpRequest)
  ajx=new XMLHttpRequest();
  ajx.onreadystatechange = function()
  {

    if(ajx.readyState == 4)
    {
          //alert(ajx.responseText); 
         document.getElementById("show_att").innerHTML= ajx.responseText;
    }
  }
  ajx.open("GET", "get_guidline_videos.php?modules="+modules);
  ajx.send(); 

}
</script>
  
  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
     
            <?php include('RootMe/sidebar.php');?>

              <?php include('RootMe/header.php');?>
     
        <!-- page content -->
          <div class="right_col" role="main">
          <div class="row" style="background-color: white;">

  
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

 <div class="" style="margin-top:10px;">
      
      <div class="clearfix"></div>
    </div>
    <br>
     
     <div style="margin-left:40px;">
    <h1 class="videohead"><b>Here are some guideline videos to use this Software</b></h1> 
    </div>
<div class="col-md-12">


    <div class="col-md-6 col-xs-12"> 


        <div class="pull-left" style="width:100%; height: 40px;">
                  
             <select style="font-size: 18px;" name="module" id="module" onChange="getmodulevideos(this.value)" class="form-control"  required >

                              <option value="">Select Module To View </option>
                        

                        <?php 
                        $m->orderBy("order_no", "asc");
                        $modules = $m->get("eduportal_modules_detail");
                        foreach($modules as $module)
                        { ?>

                           <option  value="<?php echo $module['modules_id']; ?>"><?php echo $module['modules_name']; ?></option>


                                <?php
                        } ?>

              </select>
          
        </div>
   

   </div>

   <br><br><br><br>
<div class="col-md-12" id="show_att">
<?php 
    
    $demoVideo=$m->get("eduportal_guideline_videos");
   
    foreach ($demoVideo as $video) { ?>


      <div class="col-md-6"> 
      <div class="thumbnail">
        <a href="watch_video.php?videourl=<?php echo $video['video_link'];?>" target="_blank">
          <img src="https://apps.eduportal-pk.com/EduPortal/AdminCP/Production/thumbnail/<?php echo $video['thumbnail'];?>" alt="Image" style="width:100%">
          <div class="caption" style="margin-top: -29px;">
            
          </div>
        </a>
      </div>
    </div>
      

 <?php   }

?>

</div>

  
</div>


  </div>
  <div class="clearfix"></div>
</section>      
    

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
     
  <?php include('RootMe/js_linksscript.php');?>


   

<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
 <!-- jQuery -->
    <script src="js/ajax_functions.js"></script> 
  </body>
</html>
