initial commit
This commit is contained in:
43
production/video.php
Normal file
43
production/video.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
include 'php/classes/page.php';
|
||||
$page = new Page();
|
||||
|
||||
# gather video data and which video we want to display
|
||||
$videos_xml_path = $DOCROOT.'/site/data/photosandvideos/videos.xml';
|
||||
$videos = new SimpleXMLElement(file_get_contents($videos_xml_path));
|
||||
$requested_video = null;
|
||||
$video_data = null;
|
||||
if(isset($_GET['which']))
|
||||
{
|
||||
$requested_video = $_GET['which'];
|
||||
# find the data for the requested video
|
||||
foreach($videos->video as $video)
|
||||
{
|
||||
if($video->file == $requested_video)
|
||||
{
|
||||
$video_data = $video;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$page->addError('Video does not exist.');
|
||||
}
|
||||
|
||||
$page->attr('title','Discipling the Nations Video: '.$video->name);
|
||||
$page->content('video.php');
|
||||
|
||||
$page->display('header',false);
|
||||
$page->display('footer',false);
|
||||
$page->display('menu',false);
|
||||
|
||||
$page->useCSSFile('video.css');
|
||||
|
||||
# pass data to template
|
||||
$page->data('video',$video_data);
|
||||
|
||||
$page->process();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user