<?php
chdir($_GET['home']);
include $_GET['functions'];
$links = getFolders($_GET['path'], $_GET['home']);
$files = getFiles($_GET['path'], $_GET['home']);
$path['install'] = $_GET['path'] . '/_installcodecs/installcodecs.htm';

//If the showfolders is set then there will be links of the available folders to click on.
//this is based off the array $links which is a listing of subfolders from $_get['path']
//if ($_GET['showfolders'] == 1)
  if (count($links) > 0)
		buildfolderlinks($links);

//make a table for any files inside the current path.  as long as files is > 0
  if (count($files) > 0)
		buildfilelinks($files, $_GET['path']);
?>
<?php hideshow('File Descriptions'); ?>
<div class='container_files'>
		<b>Installcodecs.exe</b> - Contains the 3 files below.  Automatic installation and configuration of the files below.<br>
    <br>
    <b>Combined-Community-Codec-Pack-2009-09-09.exe</b> - Provides a vast array of video and audio support via FFDShow.<br>
    <br>
		<b>Dscaler5008.exe</b> - A set of MPEG2 filters for directshow.<br>
    <br>
		<b>Moonlight.exe</b> - A useful MPEG2 decoder, demultiplexer, and player.<br>
    <br>
</div>

<?php hideshow('Install CODECs'); ?>
<div class='container_files'>
	<div class='jar'>
		If you are having problems playing video files then you may need to install CODECs to correctly decode and play the videos.  There are two ways to set this up.   <br>
    <br>
    <ol><u>Using Installcodecs</u>:
      <li>Download and run <b>Installcodecs</b>.
      <li>Select a path to extract files to and click <b>Install</b>.</li>
      <li>Select yes or no to the Moonlight popup.</li>
    </ol>
    <br>
    <div><u>Manually Install</u>:<br>
      Begin by downloading these 3 files from above: moonlight, dscaler, and combined-community-codec-pack.  Below is a link to a flash demo that demonstrates how to install and configure the above CODECs. The settings used in this demo are the default settings used for the Keywest Technology players. 
		<a href="<?php echo $path['install']; ?>" target='_blank'><div>Install CODECs Demo</div></a>
	</div>
</div>