Просмотр файла forum/forum/go.php

Размер файла: 1.28Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
include_once"../template/db.php";



$id = (int)$_GET['id'];
if ($id){
$check = mysql_fetch_array(mysql_query("SELECT * FROM `theme` WHERE `id` = '".$id."'"));
if (trim($check)){
$start = (int)$_POST['start'];
if ($start){
$filek = mysql_result(mysql_query("SELECT COUNT(*) FROM `posts` WHERE `theme` = '".$id."'"),0);
$start2 = floor($filek/$config_forumpost)*$config_forumpost;
$start3 = floor($start-1)*$config_forumpost;
if ($start3 <= $start2){
header ("Location: ".$config_home."/forum/posts/".$id."/".$start3.""); exit;
}else{header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;}
}else{header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;}
}else{header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;}
}else{header ("Location: ".$_SERVER['HTTP_REFERER'].""); exit;}
include_once"../themes/$config_themes/foot.php";
?>