Содержание page.php
Код: Выделить всё
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array('body' => 'page.tpl'));
if($_GET['composition'] == 1){
$titul = 'Состав';
$titul2 = '<td colspan="4" class="bck2">Состав клана</td>';
$fp=array("81", "87", "632", "669", "806", "1053", "2192", "2523", "2627", "6285", "6539", "6554", "6592", "6609", "7038", "8129", "8276", "9895", "11379", "11848", "12567", "13315");
for ($y=0;$y<count($fp);$y++){
$i =trim($fp[$y]);
$file_c = 'http://www.mist-game.ru/info.php?id=';
$file = file_get_contents($file_c.$i);
if (preg_match_all("/<b style=\"font-size:9pt;\">(.*)<\/b>|<span style=\"color:#004658\">(.*)<\/span>|<\/b><\/td><td class=\"td_delim\">(.*)<\/td>/i", $file, $in)){
if ($in[2] [1] == ""){
$in[2] [1] = '<td class="area">Местонахождение: Вне игры</td>';
$in[3] [2] = '<td class="area">'.$in[3] [2].'</td><br>';}
else{
$in[2] [1] = '<td class="area">'.$in[2] [1].'</td>';
$in[3] [2] = '<td class="lvisit">'.date("H:i").' ;» онлайн</td><br>';}}
else {
$body_text = "<H3 align=center>Сервер в отключке</H3>";}
$body_text = '<td class="nick"><img src="templates/fiblack/images/1.gif"><b>'.$in[1] [0].'</b><a href="'."$file_c$i".'" target="_blank"><img src="templates/fiblack/images/i.gif"></a></td>'.$in[2] [1].$in[3] [2].'<br>';
$body_text = iconv('UTF-8','cp1251',$body_text);}}
$template->assign_vars(array(
'TITLE' => $titul,
'TITLE_2' => $titul2,
array('BODY_TEXT' => $body_text)));
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Код: Выделить всё
{BODY_TEXT}
Если создать отдельный скрипт, то echo $body_text выводит как надо.