Files
d-t-n.org/production/photosandvideos.php
2017-03-02 21:36:05 -06:00

28 lines
755 B
PHP

<?php
include 'php/classes/page.php';
include 'functions/func_xml.php';
$page = new Page();
$page->attr('title','Discipling the Nations: Photos and Videos');
$page->content('photosandvideos.php');
$page->addCSSFile('photosandvideos.css');
$page->addJSFile('ssm.js','ssmItems.js','ssmItems_photosandvideos.js');
# get the random verse and pass it to the template
$page->data('verse',xml_random_child($FILES['verses']));
# get the photos and video data from xml files
$xml = array();
$files = array('albums','videos');
$path = $DOCROOT.'/site/data/photosandvideos';
foreach($files as $key => $value)
{
$xml[$value] = new SimpleXMLElement(file_get_contents($path.'/'.$value.'.xml'));
unset($xml[$key]);
}
$page->data('xml',$xml);
$page->process();
?>