Файл: forum/postorder.php
Строк: 24
<?php
# Script by seg0ro http://mobilarts.ru
# Not for sale!!!
defined('_IN_JOHNCMS') or die('Error: restricted access');
$textl .= ' | Сортировка сообщений';
require_once ('../incfiles/head.php');
if (!$topic){
echo functions::display_error('Отсутствыет идентификатор темы!<br /><a href="index.php">Форум</a>');
require_once('../incfiles/end.php');
exit;
}
$tree = array('<a href="index.php">Форум</a>', '<a href="index.php?topic='.$topic.'&page='.$page.'">'.functions::checkout($topicRes['topicname']).'</a>', 'Сортировка сообщений');
echo '<div class="phdr">'.functions::display_menu($tree).'</div>';
if ((!isset($_GET['asc']) && !isset($_GET['desc'])) || (isset($_GET['asc']) && isset($_GET['desc'])))
$error = 'Неверные данные!<br /><a href="index.php">Форум</a>';
if (!$error){
if (isset($_GET['desc'])){
$_SESSION['uppost'] = 1;
}elseif(isset($_GET['asc'])){
$_SESSION['uppost'] = 0;
}
header ('Refresh:1; URL=index.php?topic='.$topic);
echo '<div class="gmenu">Сортировка сохранена!<br /><a href="index.php?topic='.$topic.'">Далее</a></div>';
}else{
echo functions::display_error($error);
}