Файл: ajax/publisher/get.php
Строк: 18
<?php
/**
* get publisher
*
* @package Sngine
* @author Zamblek
*/
// fetch kernal
$depth = '../../';
require($depth.'kernal.php');
// check AJAX Request
if(!IsAJAX()) {
header('Location: '.SITE_URL);
}
// check page parameters
if(!isset($_GET['get']) || !isset($_GET['get'])) {
exit(ReportError('parameters error[1] @/ajax/publisher/get'));
}
// valid inputs
$valid['get'] = array('newsPublisher', 'musicPublisher', 'photoPublisher', 'photoPublisherSingle', 'photoPublisherAlbum', 'videoPublisher', 'videoPublisherSingle', 'videoPublisherAlbum', 'questionPublisher', 'pollPublisher', 'linkPublisher');
if(!in_array($_GET['get'], $valid['get'])) {
exit(ReportError('parameters error[2] @/ajax/publisher/get'));
}
// create new scret key to upload
$_SESSION['secret'] = md5(time()*rand(1, 9999));
// assign variables
$smarty->assign('get', $_GET['get']);
$smarty->assign('secret', $_SESSION['secret']);
// page footer
PageFooter("ajax.publisher.get");
?>