Current File : /home/inlingua/www/dwarka/icentex/trainer_resource_trainer/download_documents.php |
<?php
include "header_trainer.php";
?>
<h3>Download Documents</h3>
<b>Documents</b><br />
<?php
// Include the database connection details
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Include the table handler class
require('../dbHandler.class.php');
// Init and connect to database
$dbObject = new dbHandler();
$dbObject->connect();
$sqlQuery = "SELECT recNo,workshop FROM ingl_active_workshops where recNo='".$_REQUEST['kV']."'";
// Select records from table
$selectedRecords = $dbObject->Select($sqlQuery);
$objectData=$dbObject->SelectNext();
$getData = new dbHandler(); $getData->connect();
$workshop = $getData->SelectAndNext("select nameofWorkshop,files,videos from ingl_workshops where recNo='".$objectData['workshop']."'");
$download_docu="select * from ingl_workshop_documents where workshop='".$_REQUEST['kV']."' && instructor='".$_SESSION['id']."'";
$result_docu=mysqli_query($conn,$download_docu);
$count_docu=mysqli_num_rows($result_docu);
if($count_docu>0)
{
echo"<table width='100%'>";
//$files=explode("$~#",$workshop['files']);
//$count=count($files)-1;
while($num_docu=mysqli_fetch_array($result_docu))
{
$queryDo="select * from ingl_workshop_doc where recNo='".$num_docu['document']."'";
$resultDo=mysqli_query($conn,$queryDo);
$numDo=mysqli_fetch_array($resultDo);
$files_show="trainer_documents_download.php?file=".$numDo['documents']."";
if($numDo['documents']!="")
{
?>
<tr >
<td width="40" style="border:#E6E6E6 1px solid;"><a class="hlink" href="<?php echo $files_show;?>" title="<?php echo $numDo['documents']; ?>"> <img class="divimglink" height="40" src="../images/download_8.gif" alt="" border="0"></a></td>
<td style="border:#E6E6E6 1px solid;" valign="top"><b><a href='<?php echo $files_show;?>'><?php echo $numDo['documents']; ?></a></b></td>
</tr>
<tr><td colspan="2"> </td></tr>
<?php
}
}
echo"</table>";
}
?>
<b>Videos</b><br />
<?php
if($workshop['videos']!="")
{
echo"<table width='100%'>";
$videos=explode(",",$workshop['videos']);
//$count=count($files)-1;
$queryVideo="select * from ingl_workshop_videos where workshop='".$_REQUEST['kV']."' && instructor='".$_SESSION['id']."'";
$resultVideo=mysqli_query($conn,$queryVideo);
while($numVideo=mysqli_fetch_array($resultVideo))
{
$queryVo="select * from ingl_video_doc where recNo='".$numVideo['document']."'";
$resultVo=mysqli_query($conn,$queryVo);
$numVo=mysqli_fetch_array($resultVo);
$queryVideo="select * from trainer_resource_video where recNo='".$numVo['documents']."'";
$resultVideo=mysqli_query($conn,$queryVideo);
$numVideo=mysqli_fetch_array($resultVideo);
$files_show1="trainer_documents_download1.php?file=".$numVideo['video_file']."";
?>
<tr >
<td width="40" style="border:#E6E6E6 1px solid;"><a class="hlink" href="<?php echo $files_show1;?>" title="<?php echo $numVideo['video_details']; ?>"> <img class="divimglink" height="40" src="../images/download_8.gif" alt="" border="0"></a></td>
<td style="border:#E6E6E6 1px solid;" valign="top"><b><a href='<?php echo $files_show1;?>'><?php echo $numVideo['video_details']; ?></a></b></td>
</tr>
<tr><td colspan="2"> </td></tr>
<?php
}
echo"</table>";
?>
<br />
<a href="http://download.cnet.com/3001-13632_4-10267151.html?spi=27c07607f081f568c22de547347728af" target="_blank"><b>Download VLC Player to view video files.</b></a>
<?php
}
?>
<?php
include "footer_trainer.php";
?>