Файл: themes/andoid/index.php
Строк: 92
<?php
if (!defined('BLOG')) { die('Access Denied!'); }
define('ICONS','/themes/andoid/icons/');
define('EMPTY_LINKS',TRUE);
define('SMILES_ROWS',2);
# Валидный xHTML
function valid_xhtml($str) {
//$str = str_replace(' />', '>', $str);
//$str = str_replace('"/>', '">', $str);
//$str = str_replace('class="downlist2"', 'class="main"', $str);
return $str;
}
/**
* Шапка страницы
* @param string $title
* @param string $desc
* @param string $header
*/
function show_header($title = '', $keys = '', $desc = '', $header = 'Y') {
global $db, $config, $categories;
header('Content-Type: text/html; charset=utf-8');
$title = StripMeta($title);
$keys = !empty($keys) ? $keys : $config['site_keys'];
$desc = !empty($desc) ? $desc : $config['site_desc'];
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru" dir="ltr">
<head>
<title>' . $title . '</title>
<meta name="keywords" content="' . $keys . '" />
<meta name="description" content="' . $desc . '" />
<style type="text/css">' . file_get_contents(dirname(__FILE__) . '/style.css') . '</style>
' . ($config['allow_rss'] == 1 ? '<link rel="alternate" type="application/rss+xml" title="' . $config['rss_title'] . '" href="/rss.xml" />' : '') . '
</head>
<body>
<div class="top"><span class="header">' . $config['site_name'] . '</span>
<span class="imgright">' . date('H') . '<span class="blink">:</span>' . date('i') . '</span></div>
<div class="menu">
<a href="/' . gen_uri('admin') . '"><img src="' . THEMES_DIR . '/images/blog.png" alt="" /><br /> Обо мне</a>
<a href="/rss.xml"><img src="' . THEMES_DIR . '/images/mail.png" alt="" /><br /> Новости</a>
<br />
<a href="/' . gen_uri('category') . '"><img src="' . THEMES_DIR . '/images/users.png" alt="" /><br /> Разделы</a>
<a href="/' . gen_uri('agreement') . '"><img src="' . THEMES_DIR . '/images/servis.png" alt="" /><br /> Соглашение</a>
</div>';
//ob_start('valid_html');
if ($config['show_ads'] == 1 && !defined('IS_ADMINKA')) {
echo '<div class="title_ads">Реклама</div><div class="main">';
$ads = $db->select("SELECT * FROM ?_ads WHERE (`time` - UNIX_TIMESTAMP()) > 0 ORDER BY rand() LIMIT 0," . $config['ads_num']);
if (!empty($ads)) {
foreach( $ads as $ad ) echo '<a href="http://' . $ad['url'] . '" class="dir">' . $ad['name'] . '</a><br />';
}
echo '</div>';
}
if (!empty($_SESSION['core_message'][0][0]) && !empty($_SESSION['core_message'][0][1])) {
echo '<div class="message_' . $_SESSION['core_message'][0][0] . '">' . $_SESSION['core_message'][0][1] . '</div>';
unset($_SESSION['core_message']);
}
if (!empty($header) && $header != 'N') {
switch($header):
case 'C':
echo '<div class="bmenu">' . $title . '<br /></div>';
echo '<div class="c">';
break;
case 'L':
echo '<div class="bmenu">' . $title . '<br /></div>';
echo '<div class="b">';
break;
case 'Y':
echo '<h2>' . $title . '</h2>';
break;
default:
echo '<h2>' . $header . '</h2>';
break;
endswitch;
}
if (defined('IS_INDEX')) {
echo loadTemplate( 'header_index' );
}
else {
echo loadTemplate( 'header' );
}
}
# Ноги
function show_footer() {
global $db, $mts, $config, $count_posts;
if (!defined('IS_ADMINKA')) {
echo '<div class="ban">';
if (defined('IS_INDEX')) {
echo loadTemplate( 'footer_index' );
}
else {
echo loadTemplate( 'footer' );
}
echo '</div>';
}
echo '<div class="copy">Copyright <a href="/">' . $config['site_copy'] . '</a></div>';
//echo '<div class="count">Версия: ' . show_version() . '</div>';
echo '<div class="count">' . ChangeSkin('Диз:') . '</div>';
echo '</body></html>';
//ob_end_flush();
exit;
}
?>