Файл: core/header.php
Строк: 23
<?php
/*
* @author mides <Mike Osendowski>
* @link http://midwm.org
* @copyright 2011-2014
*/
ob_start('ob_processing');
if (isset($tpl)) {
$unread = DB::run()->queryFetch("select `pmid` from `pm_posts` where `recipientid` = ? and `read` = 0;", array($u['id']));
if ($unread)
{
$totalUnread = DB::run()->querySingle("select count(`id`) from `pm_posts` where `recipientid` = ? and `read` = 0;", array($u['id']));
}
$theme = file_exists(LEVEL.'themes/'.$config['theme'].'/html/header.htm') ? $config['theme'] : 'mobile_default';
require_once LEVEL.'themes/'.$theme.'/html/header.htm';
if ($tpl['file'] != 'header')
{
$theme = file_exists(LEVEL.'themes/'.$config['theme'].'/html/'.$tpl['file'].'.htm') ? $config['theme'] : 'mobile_default';
//if (!file_exists(LEVEL.'themes/'.$config['theme'].'/html/header.htm')) $config['theme'] = 'mobile_default';
require_once LEVEL.'themes/'.$theme.'/html/'.$tpl['file'].'.htm';
}
}