Вход Регистрация
Файл: themes/touch/index.php
Строк: 77
<?php

if (!defined('BLOG')) { die('Access Denied!'); }

define('ICONS','/themes/touch/icons/');

# Валидный 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="nav">' 
. date('H:i') . '</div>';

    
$ex = explode(' ', $config['site_name']);

    echo 
'<div class="logoback"><a href="/index.html"><img src="' . THEMES_DIR . 'images/logo.png" alt="" /> ' . $ex[0] . ' <span>' . $ex[1] . '</span></a></div>';

    
//ob_start('valid_html');

    
if ($config['show_ads'] == 1 && !defined('IS_ADMINKA')) {

        
$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="ads"> <a href="http://' . $ad['url'] . '">' . $ad['name'] . '</a></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="banners">';

        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;
}

?>
Онлайн: 1
Реклама