get_row($result_posts)) { $forum_id = $row['forum_id']; $tid = $row['tid']; $check_read = check_access($forums_array[$forum_id]['access_read']); $check_moderator = check_moderator($forums_array[$forum_id]['access_mod'], $forums_array[$forum_id]['moderators']); $check_write = check_access($forums_array[$forum_id]['access_write']); if ($check_moderator){ $deny_edit_post = moderator_value('edit_post', $forum_id, $m_member); $deny_del_post = moderator_value('delete_post', $forum_id, $m_member); } if ($user_group[$member_id['user_group']]['forum_post_edit']){ $group_post_edit = true; }else{ $group_post_edit = false; } if ($user_group[$member_id['user_group']]['forum_post_del']){ $group_post_del = true; }else{ $group_post_del = false; } $post_num_id++; $i++; if($is_logged) { $tpl->set( '[not-logged]', "" ); $tpl->set( '[/not-logged]', "" ); } else $tpl->set_block( "'\\[not-logged\\](.*?)\\[/not-logged\\]'si", "" ); if (!$row['user_group']) $row['user_group'] = 5; if ($ajax_adds) $post_num_id = "--"; $row['post_text'] = stripslashes( $row['post_text'] ); if ($row['hidden']){ if ($check_moderator){ $row['post_text'] = "
{$f_lang['h_post']}:
".$row['post_text']."
"; }else{ $row['post_text'] = "
{$f_lang['h_post']}
"; } } if ($search_text){$row['post_text'] = hilites($search_text, $row['post_text']);} // ******************************************************************************** // LOAD TEMPLATE // ******************************************************************************** $tpl->load_template($tpl_dir.'post.tpl'); if( strlen( $row['title'] ) > 15 ) $title = substr( $row['title'], 0, 15 ) . " ..."; else $title = $row['title']; $tpl->set( '{topic_url}', " Тема: ".$row['title'].", "); $tpl->set('{post_id}', "{$post_num_id}"); if ($row['edit_time']) $tpl->set('{edit-info}', "
{$f_lang['edit_info']} {$row['edit_user']} - ".show_date($row['edit_time']).""); else $tpl->set('{edit-info}', ""); $go_page = "onClick=\"return dropdownmenu(this, event, FUserMenu('".urlencode($row['name'])."', '".$row['user_id']."', '".$member_id['user_group']."', '$a_forum_url'), '170px')\" onMouseout=\"delayhidemenu()\""; $group_span = $user_group[$row['user_group']]['colour']; if ($row['is_register']) { if ($config['skin'] == "Lite" OR $config['skin'] == "Wap") $tpl->set('{author}', "{$row['post_author']}"); else $tpl->set('{author}', "{$row['post_author']}"); } else $tpl->set('{author}', "{$row['post_author']}"); $grav_url = 'http://gravatar.com/avatar/' . md5( stripslashes( $row['email'] ) ) . "?s=100&r=g&d=" . $config['http_home_url'] . 'templates/' . $config['skin'] . '/images/noavatar.png'; if ($row['foto']) $tpl->set('{foto}', $config['http_home_url']."uploads/fotos/".$row['foto']); else $tpl->set('{foto}', $grav_url); if ($row['icq']) $tpl->set('{icq}', stripslashes($row['icq'])); else $tpl->set('{icq}', '--'); if ($row['land']) $tpl->set('{land}', stripslashes($row['land'])); else $tpl->set('{land}', '--'); if ($row['fullname']) $tpl->set('{fullname}', stripslashes($row['fullname'])); else $tpl->set('{fullname}', '--'); if ($row['is_register']) $tpl->set('{registration}', langdate("j.m.Y", $row['reg_date'])); else $tpl->set('{registration}', '--'); if ($row['is_register'] AND $row['signature']) { $tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si","\\1"); $tpl->set('{signature}', stripslashes($row['signature'])); } else $tpl->set_block("'\\[signature\\](.*?)\\[/signature\\]'si",""); if ($user_group[$row['user_group']]['colour']){ $group_span = $user_group[$row['user_group']]['colour']; $group_name = "".$user_group[$row['user_group']]['group_name'].""; }else{ $group_name = $user_group[$row['user_group']]['group_name']; } if ($row['banned']) { $group_name = "BANNED"; } $tpl->set('{group-name}', $group_name); $tpl->set('{post-num}', intval($row['forum_post'])); $tpl->set('{news-num}', intval($row['news_num'])); $tpl->set('{comm-num}', intval($row['comm_num'])); // ******************************************************************************** // POST SELECTED // ******************************************************************************** $tpl->set('{selected}', ""); // ******************************************************************************** // POST DATE // ******************************************************************************** $row['post_date'] = strtotime($row['post_date']); $tpl->set('{post-date}', show_date($row['post_date'])); if (!$forum_config['mod_report'] and $is_logged) { $tpl->set('[report]',""); $tpl->set('[/report]',""); } else { $tpl->set_block("'\\[report\\](.*?)\\[/report\\]'si",""); } // ******************************************************************************** // FAST // ******************************************************************************** $tpl->set_block("'\\[fast\\](.*?)\\[/fast\\]'si",""); // ******************************************************************************** // RANK // ******************************************************************************** if ($forum_config['mod_rank'] and $rank_array != 'empty') { if (!$row['forum_post']) $row['forum_post'] = 0; foreach ($rank_array as $value) { if ($row['forum_post'] >= $value['posts']) { $rank_title = $value['title']; $rank_num = $value['pips']; } } if ($row['forum_rank']) $rank_title = $row['forum_rank']; if ($row['forum_pips']) $rank_num = $row['forum_pips']; $rating = $rank_num * 17; $rank_image = "
"; } $tpl->set('{rank-title}', $rank_title); $tpl->set('{rank-image}', $rank_image); // ******************************************************************************** // REPUTATION // ******************************************************************************** @include (SYSTEM_DIR.'/modules/reputation.php'); if ($check_moderator) $tpl->set('{ip}', "IP: {$row['post_ip']}"); else $tpl->set('{ip}', ''); if ($num_post_tid > 0) $del_post = true; else $del_post = false; // ******************************************************************************** // POST EDIT // ******************************************************************************** if (($member_id['name'] == $row['post_author']) AND $group_post_edit OR $deny_edit_post) { $tpl->set('[post-edit]',""); $tpl->set('[/post-edit]',""); } else { $tpl->set_block("'\\[post-edit\\](.*?)\\[/post-edit\\]'si",""); } // ******************************************************************************** // POST DEL // ******************************************************************************** $tpl->set_block("'\\[post-del\\](.*?)\\[/post-del\\]'si",""); // ******************************************************************************** // POST TEXT // ******************************************************************************** $tpl->set('{text}', "
".stripslashes($row['post_text'])."
"); // ******************************************************************************** // HIDE // ******************************************************************************** if ($member_id['forum_post'] >= $forum_config['post_hide']) { $tpl->set_block("'\[hide\](.*?)\[/hide\]'si","\\1"); } else { $hide_info = "Внимание! У вас нет прав, для просмотра скрытого текста. Необходимо $forum_config[post_hide] сообщений."; $tpl->set_block("'\\[hide\\](.*?)\\[/hide\\]'si","
".$hide_info."
"); } $tpl->compile('posts'); if (stristr ($tpl->result['posts'], "[attachment=")) { $tid = $row['tid']; require_once SYSTEM_DIR.'/forum/sources/components/attachment.php'; } $tpl->clear(); } $ban_short = array (); unset( $ban_short ); ?>