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

29 lines
815 B
PHP

<?php
include 'php/classes/page.php';
include 'functions/func_xml.php';
$page = new Page();
$page->attr('title','Discipling the Nations: Resources');
$page->content('resources.php');
$page->addCSSFile('resources.css');
$page->addJSFile('ssm.js','ssmItems.js','ssmItems_resources.js');
# get the random verse and pass it to the template
$page->data('verse',xml_random_child($FILES['verses']));
# get the resources data from xml files
$xml = array();
$res_files = array('articles','books','links','onleadership','teachingoutlines',
'toolsforministry','toolsforpersonal');
$res_path = $DOCROOT.'/site/data/resources';
foreach($res_files as $key => $value)
{
$xml[$value] = new SimpleXMLElement(file_get_contents($res_path.'/'.$value.'.xml'));
unset($xml[$key]);
}
$page->data('xml',$xml);
$page->process();
?>