load_template('dlvr_unreg.tpl');
$tpl->compile('dlvr_unreg'); // компиляция. Отображение потом. Ничего в него не ставим так как нечего ставить - тупо форма с дизайном и капчей
$tpl->clear();
}
// ###### отображение блока для незареганных пользователей ###### //
if (clean_url ( $_SERVER['HTTP_HOST'] ) != clean_url ( $config['http_home_url'] )) {
$replace_url = array ();
$replace_url[0] = clean_url ( $config['http_home_url'] );
$replace_url[1] = clean_url ( $_SERVER['HTTP_HOST'] );
} else
$replace_url = false;
$tpl->load_template ( 'main.tpl' );
// ###### отображение изображения в шапке ###### //
$images['main']['url'] = '{THEME}/images/map.jpg';
$images['main']['alt'] = 'Предрейсовые медицинские осмотры в г. Одинцово и Одинцовском районе';
$images['search']['url'] = '{THEME}/images/searching.jpg';
$images['search']['alt'] = 'Поиск по сайту';
$images['sitemap']['url'] = '{THEME}/images/sitemap.jpg';
$images['sitemap']['alt'] = 'Карта сайта';
$images['feedback']['url'] = '{THEME}/images/feedback.jpg';
$images['feedback']['alt'] = 'Контакты';
$ext_images['links']['url'] = '{THEME}/images/links_head.jpg';
$ext_images['links']['alt'] = 'Обмен ссылками';
// ######$ext_images['our_services']['url'] = '{THEME}/images/services.jpg';###### //
// ######$ext_images['our_services']['alt'] = 'Наши услуги';###### //
if (empty($_REQUEST['do'])) {$img = $images['main']['url']; $alt = $images['main']['alt'];}
else if (isset($images[$_REQUEST['do']])) {$img = $images[$_REQUEST['do']]['url']; $alt = $images[$_REQUEST['do']]['alt'];}
else {$img = $images['main']['url']; $alt = $images['main']['alt'];}
if ($_REQUEST['do'] == 'static')
{
if (isset($ext_images[$_REQUEST['page']])) {$img = $ext_images[$_REQUEST['page']]['url']; $alt = $ext_images[$_REQUEST['page']]['alt'];}
else {$img = $images['main']['url']; $alt = $images['main']['alt'];}
}
if (!empty($img))
{
if (!empty($alt)) $alt = ' title="'.$alt.'" alt="'.$alt.'"';else $alt='';
$img_ext = '';
$tpl->set ( '{img_extended}', $img_ext );
}
$tpl->set ( '{calendar}', $tpl->result['calendar'] );
$tpl->set ( '{archives}', $tpl->result['archive'] );
$tpl->set ( '{tags}', $tpl->result['tags_cloud'] );
$tpl->set ( '{vote}', $tpl->result['vote'] );
$tpl->set ( '{topnews}', $topnews );
$tpl->set ( '{login}', $login_panel );
$tpl->set ( '{info}', "" . $tpl->result['info'] . "" );
$tpl->set ( '{speedbar}', $tpl->result['speedbar'] );
$tpl->set('{dlvr_unreg}', $tpl->result['dlvr_unreg']);
if ($config['allow_skin_change'] == "yes") $tpl->set ( '{changeskin}', ChangeSkin ( ROOT_DIR . '/templates', $config['skin'] ) );
if (count ( $banners ) and $config['allow_banner']) {
foreach ( $banners as $name => $value ) {
$tpl->copy_template = str_replace ( "{banner_" . $name . "}", $value, $tpl->copy_template );
}
}
$tpl->set_block ( "'{banner_(.*?)}'si", "" );
if (count ( $informers ) and $config['rss_informer']) {
foreach ( $informers as $name => $value ) {
$tpl->copy_template = str_replace ( "{inform_" . $name . "}", $value, $tpl->copy_template );
}
}
if ($do == "" and ! $subaction and $year) $do = "date";
elseif ($do == "" and $catalog) $do = "catalog";
elseif ($do == "") $do = $subaction;
if ($allow_active_news and $config['allow_change_sort'] and ! $config['ajax']) {
$tpl->set ( '[sort]', "" );
$tpl->set ( '{sort}', news_sort ( $do ) );
$tpl->set ( '[/sort]', "" );
} else {
$tpl->set_block ( "'\\[sort\\](.*?)\\[/sort\\]'si", "" );
}
if (strpos ( $tpl->copy_template, "[aviable=" ) !== false) {
$tpl->copy_template = preg_replace ( "#\\[aviable=(.+?)\\](.*?)\\[/aviable\\]#ies", "check_module('\\1', '\\2', '{$do}')", $tpl->copy_template );
}
if (strpos ( $tpl->copy_template, "[not-aviable=" ) !== false) {
$tpl->copy_template = preg_replace ( "#\\[not-aviable=(.+?)\\](.*?)\\[/not-aviable\\]#ies", "check_module('\\1', '\\2', '{$do}', false)", $tpl->copy_template );
}
if (strpos ( $tpl->copy_template, "[category=" ) !== false) {
$tpl->copy_template = preg_replace ( "#\\[category=(.+?)\\](.*?)\\[/category\\]#ies", "check_category('\\1', '\\2', '{$category_id}')", $tpl->copy_template );
}
if (strpos ( $tpl->copy_template, "[not-category=" ) !== false) {
$tpl->copy_template = preg_replace ( "#\\[not-category=(.+?)\\](.*?)\\[/not-category\\]#ies", "check_category('\\1', '\\2', '{$category_id}', false)", $tpl->copy_template );
}
if (strpos ( $tpl->copy_template, "{custom" ) !== false) {
$tpl->copy_template = preg_replace ( "#\\{custom category=['\"](.+?)['\"] template=['\"](.+?)['\"] aviable=['\"](.+?)['\"] from=['\"](.+?)['\"] limit=['\"](.+?)['\"] cache=['\"](.+?)['\"]\\}#ies", "custom_print('\\1', '\\2', '\\3', '\\4', '\\5', '\\6', '{$do}')", $tpl->copy_template );
}
$config['http_home_url'] = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) );
$config['http_home_url'] = reset ( $config['http_home_url'] );
if (! $user_group[$member_id['user_group']]['allow_admin']) $config['admin_path'] = "";
$ajax .= <<