/* show_topic.php */ //$pg_commtitle = ""; //$pg_title = ""; //$pg_description = ""; //$pg_keywords = ""; //$pg_pragma = ""; //$tm_expires = ""; //$ss_logon = ""; //$us_login = ""; $pg_left_col = false; $pg_cent_col = ""; $pg_righ_col_exist = true; $pg_righ_col = false; $pg_dont_show = false; $pg_nav_line = "Россия-3 >> "; $pg_months = array("Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря"); $pg_countrys = array("rus" => "Россия", "ukr" => "Украина", "tur" => "Турция", "mol" => "Молдавия"); $i = 0; $CURRENT_TIMESTAMP=date("YmdHis",mktime()); $pgs_start=intval($_REQUEST['from']); $db_query = "SELECT `topic_id`, `topic_name`, `title`, `kword`, `descr`, `announce_num`, `path_lat`, `path_rus` FROM `r3_topic`" ." WHERE `type` = '0'" ." AND CONCAT(`path_lat`, `topic_name`, '/') = '".$pg_path."'" ." LIMIT 1"; $db_result=mysql_query_ext($db_query); if (!$db_result) return array(false, "
Ошибка доступа к базе: " . mysql_error()."
\n");
if (mysql_num_rows($db_result) == 1) {
list($db_topic_id, $db_topic_name, $db_title, $db_kword, $db_descr, $db_announce_num, $db_path_lat, $db_path_rus) = mysql_fetch_row($db_result);
if ($db_title != "") $pg_title = $db_title;
if ($db_kword != "") $pg_keywords = $db_kword;
if ($db_descr != "") $pg_description = $db_descr;
if ($db_announce_num != "") $pg_announce_num = $db_announce_num;
// цепочка навигации /* AAE Comment:Россия-3 >> Политика >> Россия >> ЮКОС*/
$name_arr = explode("/", $db_path_lat.$db_topic_name);
$title_arr = explode(">>", $db_path_rus.$db_title);
$title_arr = array_reverse ($title_arr);
foreach ($title_arr as $num => $title) {
$title_arr[$num] = "".$title."";
array_pop($name_arr);
}
$title_arr = array_reverse ($title_arr);
$pg_nav_line .= implode(" >> ", $title_arr);
}
// список дочерних рубрик
$db_query = "SELECT `title`, CONCAT(`path_lat`, `topic_name`, '/') FROM `r3_topic`"
." WHERE `type` = '0'"
." AND `parent_id` = '".$db_topic_id."'";
$db_result=mysql_query_ext($db_query);
$pg_tp_list_tmpl = file_get_contents("inc/tmpl_topic_item.html");
if (!$db_result) echo "
Ошибка доступа к базе: " . mysql_error()."
\n";
elseif ($pg_tp_list_tmpl != false && mysql_num_rows($db_result) > 0) {
while (list($pg_tp_name, $pg_tp_path) = mysql_fetch_row($db_result)) {
$pg_tp_item = prepare_toeval($pg_tp_list_tmpl);
eval("\$pg_tp_item = \"$pg_tp_item\";");
$pg_tp_list .= $pg_tp_item;
}
} else {$pg_comm2_on = "";}
$db_query = "SELECT `r3_text`.`text_id`, `r3_text`.`country`, `r3_text`.`date_pub`, `r3_text`.`text_name`, `r3_text`.`title`, `r3_text`.`text`,"
." `r3_text`.`pict1_ext`, `r3_text`.`pict2_ext`, `r3_text`.`pict_alt`, `r3_topic`.`topic_name`, `r3_topic`.`path_lat`,"
." `r3_users`.`user_id`, `r3_users`.`login`, `r3_users`.`type`, `r3_users`.`fio` FROM `r3_topic`"
." LEFT JOIN `r3_text` ON `r3_topic`.`topic_id` = `r3_text`.`topic_id`"
." LEFT JOIN `r3_users` ON `r3_text`.`user_id` = `r3_users`.`user_id`"
." WHERE CONCAT(`r3_topic`.`path_lat`, `r3_topic`.`topic_name`, '/') LIKE '".$pg_path."%'"
." AND `r3_text`.`usr_active` = '1'"
." AND `r3_text`.`type` = '0' "
." ORDER BY `r3_text`.`date_ord` DESC"
." LIMIT $pgs_start,".$pg_announce_num;
//Removed by L,120419
// ." AND `r3_text`.`date_pub` < CURRENT_TIMESTAMP"
$pg_tmpl_1 = file_get_contents("inc/tmpl_start1_show.html");// шаблон share1
$pg_tmpl_20 = file_get_contents("inc/tmpl_start20_show.html");// шаблон share20
$pg_tmpl_21 = file_get_contents("inc/tmpl_start21_show.html");// шаблон share21
$pg_tmpl_22 = file_get_contents("inc/tmpl_start22_show.html");// шаблон share22
$pg_tmpl_lnx = file_get_contents("inc/tmpl_start_lnk_show.html");
if ($pg_tmpl_1 == false || $pg_tmpl_20 == false || $pg_tmpl_21 == false || $pg_tmpl_22 == false || $pg_tmpl_lnx == false) {echo "
Ошибка доступа к файлам шаблона.
\n"; echo "