<?php include("parent/callMe.php"); ?>
<?php  include("sessioncheck.php"); ?>
<?php 
    
   $m->where ("branch_id", $_SESSION['branch']);
   $branchName =  $m->get('edu_branch_config');

  $class_id=$_REQUEST['class_id'];
  $section_id=$_REQUEST['section'];
  $lecture=$_REQUEST['videoLec_id'];
  $branch=$_SESSION['branch'];
  $query="SELECT * FROM eduportal_student_videoLecture where  branch_id='$branch' and class_id='$class_id' and videoLec_id='$lecture'";
  //print_r($query);
  $WorkAssignListings = $m->query($query);
  
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    
    <title>View Student Lecture | EduPortal</title>
    <?php include('RootMe/css_links.php');?>
   
  </head>
  
  <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="" style="background-color: white;padding: 2%;">
   
  <section class="add_sub_agent" id="table_sub_agent">
  <div class="container">

     

    <h3>Lecture Details</h3>
 

<div class="row">
        

  <table id="" class="table table-striped table-bordered" style="width:100%">
 
  <?php
  foreach($WorkAssignListings as $WorkAssignListVal)
      {

  $m->where("class_id", $WorkAssignListVal['class_id']);
  $class=$m->get("edu_class_config");

  $m->where("section_id", $WorkAssignListVal['section_id']);
  $section=$m->get("edu_adm_section_detail");


       ?>
<div class="col-md-4 col-sm-12 col-xs-12">Class/Section: <?php echo $class[0]['Class_Name'];?> / <?php echo $section[0]['section_name'];?></div>

<div class="col-md-3 col-sm-12 col-xs-12">Date: <?php echo date("d-M-Y",strtotime($WorkAssignListVal['lecture_date']));?></div>

<div class="col-md-5 col-sm-12 col-xs-12">
  
  <?php  if($WorkAssignListVal['youtube_link']!=NULL){ ?> 
                   
  <a class="btn btn-success" target="_blank" href="<?php echo $WorkAssignListVal['youtube_link'];?>">

    <i class="fa fa-play"></i> 
   Video Lecture</a>
  <?php  } ?> 
  
  <a class="btn btn-success" href="view_student_diaries.php">

   View Diaries</a>                

</div> 

<div class="col-md-12 col-sm-12 col-xs-12"><h3>Description</h3></div>
<div><?php echo $WorkAssignListVal['diary_details'];?></div>

   <div class="col-md-12 col-sm-12 col-xs-12" style="padding:8px;"  id="">

                          <?php
                   $extention=substr($WorkAssignListVal['image'],-4);        
                    if($extention==".jpg" || $extention==".JPEG") { ?>

                      <a href="<?php echo DOMAIN.AgentDirectory;?>parent_images/<?php echo $WorkAssignListVal['image'];?>" >
                        <img style="height:30%;width:30%;" src="<?php echo DOMAIN.AgentDirectory;?>parent_images/<?php echo $WorkAssignListVal['image'];?>"   />
                      </a>

                    <?php }  else if($extention==".png" || $extention==".PNG") {?>

                     <a href="<?php echo DOMAIN.AgentDirectory;?>parent_images/<?php echo $WorkAssignListVal['image'];?>" >
                        <img style="height:30%;width:30%;" src="<?php echo DOMAIN.AgentDirectory;?>parent_images/<?php echo $WorkAssignListVal['image'];?>"   />
                      </a>
                    <?php  } else if($extention==".pdf" || $extention==".PDF") { ?> 
                    

                    <a class="btn btn-success" target="_blank" href="<?php echo DOMAIN.AgentDirectory;?>parent_images/<?php echo $WorkAssignListVal['image'];?>">Download file</a>
                    <?php } else {echo "No Attachment..."; }?>
                  </div>

<?php } ?>
      </table>
      </div>


    <br><br>

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

           
          </div>
        </div>

            </div>
          </div>
        </div>
        <!-- /page content -->
  

  <!-- jQuery -->
    <script src="js/ajax_functions.js"></script>  
    
  <?php include('RootMe/js_linksscript.php');?>


   
  </body>
</html>
