Файл: Dvig/txt.php
Строк: 30
<?php
####################
## Автор - USER-X ##
## Copyright 2013 ##
## xcms.mcdir.ru ##
####################
define( 'xcms_pro', 1 ) ;
set_time_limit( 0 ) ;
$path = '../' ;
include_once ( $path . 'core/core.php' ) ;
$title = 'Пишем пост' ;
include_once ( $path . 'core/head.php' ) ;
{
only_reg();
endclean();
$data = array();
header('Content-type: text/plain; charset=utf-8');
$rn = "rn";
$result = null;
$result .= 'Тема : '.destr($topic_info['name']).' ( http://'.DOMAIN.PATH.'topic'.ID.'/ )'.$rn;
if(!empty($topic_info['first_post']))
{
$result .= '----------------'.$rn;
$result .= '#0. '.destr(post_del($db -> one("SELECT `text` FROM `posts_text` WHERE `pid` = '{$topic_info['first_post']}'"))).$rn;
}
$i = 0;
while($post = $db -> fetch("SELECT `p_t`.`text` AS `text`, `u`.`nick` AS `user`, `p`.`id`, `p`.`date`
FROM `posts` AS `p`, `posts_text` AS `p_t`, `users` AS `u`
WHERE `p`.`id` != '{$topic_info['first_post']}' AND `p`.`tid` = '".ID."' AND `p_t`.`pid` = `p`.`id` AND `u`.`id` = `p`.`user_id`
ORDER BY `p`.`date` ASC"))
{
$i ++;
$result .= '----------------'.$rn;
$result .= '#'.$i.'. '.$post['user'].' / '.xdate($post['date']).''.$rn;
$result .= destr(post_del($post['text'])).$rn;
}
loadfile(null, $result, DOMAIN.'_topic_'.ID.'.txt', 'text/plain');
exit;
}
break;
?>