Файл: style.php
Строк: 24
<?php
/***************************************************************************
* style.php
* -------------------
* Разработка модуля: Anv@r.all 2011 год.
***************************************************************************/
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);
if ( isset($HTTP_GET_VARS['s']) || isset($HTTP_POST_VARS['s']) )
{
$style_id = ( isset($HTTP_POST_VARS['s']) ) ? intval($HTTP_POST_VARS['s']) : intval($HTTP_GET_VARS['s']);
}
else
{
$style_id = '';
}
$profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]);
$user_style = (count(explode("rn", $profiledata['style_text'])) > 1) ? true : false;
if(($userdata['session_logged_in'] && $userdata['style_text']) || $user_style)
{
$row = ($user_style) ? $profiledata : $userdata;
}
else
{
$style_id = ($style_id) ? $style_id : $board_config['default_style'];
$sql = 'SELECT style_text FROM ' . STYLES_CSS . '
WHERE style_id = ' . (int) $style_id;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query style information", "", __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
}
$style_text = $row['style_text'];
header("Content-type: text/css; charset=UTF-8");
echo $style_text;
?>