Files
friendshiptours.org/admin/index.php
2015-11-12 19:58:50 -06:00

38 lines
963 B
PHP

<?php
include '../php/classes/page.php';
include 'functions/func_xml.php';
$page = new Page();
$page->init_user();
# make sure the user is logged in before he has access to the
# admin section
if(!$page->user()->check_role('admin'))
header('Location: login.php?message=1');
$page->attr('title','Administrate FTI');
// to make jquery be loaded first
$page->useJSFile('jquery.min.js');
$page->addJSFile('admin.js');
$page->useCSSFile('admin.css');
$page->content('admin/home.php');
$page->layout('admin_layout.php');
$page->menu('admin/menu.php');
# get news posts
$news = xml_get_from_file($FILES['news']);
$page->data('news',array_reverse($news->xpath('newsitem')));
# get credit cards
$cards = xml_get_from_file($FILES['ccinfo']);
$page->data('creditcards',array_reverse($cards->xpath('creditcard')));
# get passports
$passports = xml_get_from_file($FILES['passportinfo']);
$page->data('passports',$passports->xpath('passport'));
$page->process();
?>