initial commit
This commit is contained in:
29
production/resources.php
Normal file
29
production/resources.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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();
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user