Файл: directory.php
Строк: 30
<?php
/**
* directory
*
* @package Sngine
* @author Zamblek
*/
// fetch kernal
require('kernal.php');
require('libs/functions-directory.php');
// valid inputs
$valid['v'] = array('people', 'news', 'music', 'photos', 'videos', 'discussions', 'questions', 'polls', 'links');
if(isset($_GET['v']) && !in_array($_GET['v'], $valid['v'])) {
header('Location: '.SITE_URL.'/directory/');
}
// page header
if(!isset($_GET['v']) || IsEmpty($_GET['v'])) {
$view = "dir";
PageHeader($translate->__(SITE_TITLE." "."Directory"));
}else {
$view = $_GET['v'];
$dirTitle = $translate->__(SITE_TITLE." ".ucwords($view)." Directory");
$smarty->assign('dirTitle', $dirTitle);
PageHeader($dirTitle);
// get content
$content = getContent($view, $_GET['page']);
$smarty->assign('content', $content);
}
// assign variables
$smarty->assign('view', $view);
// page footer
PageFooter("directory");
?>