Файл: search.php
Строк: 23
<?php
/**
* search engine
*
* @package Sngine
* @author Zamblek
*/
// fetch kernal
require('kernal.php');
// page header
PageHeader(SITE_TITLE." ".$translate->__("Search"));
// query
$query = urlencode($_GET['q']);
// content
if(IsEmpty($_GET['app']) || $_GET['app'] == "news") {
$app = 'news';
}elseif ($_GET['app'] == "people") {
$app = 'people';
}elseif ($_GET['app'] == "music") {
$app = 'music';
}elseif ($_GET['app'] == "photos") {
$app = 'photos';
}elseif ($_GET['app'] == "videos") {
$app = 'videos';
}elseif ($_GET['app'] == "discussions") {
$app = 'discussions';
}elseif ($_GET['app'] == "questions") {
$app = 'questions';
}elseif ($_GET['app'] == "polls") {
$app = 'polls';
}elseif ($_GET['app'] == "links") {
$app = 'links';
}elseif ($_GET['app'] == "web") {
$app = 'web';
}else {
header('Location: '.SITE_URL.'/search.php?q='.$query);
}
// assign variables
$smarty->assign('query', $query);
$smarty->assign('app', $app);
// page footer
PageFooter("search");
?>