message
This commit is contained in:
154
system/forum/sources/shapeshifter/forum_posts.php
Normal file
154
system/forum/sources/shapeshifter/forum_posts.php
Normal file
@@ -0,0 +1,154 @@
|
||||
<?php
|
||||
|
||||
if(!defined('DATALIFEENGINE'))
|
||||
{
|
||||
die("Hacking attempt!");
|
||||
}
|
||||
|
||||
$username = $db->safesql( htmlspecialchars( urldecode( $_REQUEST['name'] ) ) );
|
||||
if ($username)
|
||||
{
|
||||
$cstart = intval($_REQUEST['cstart']);
|
||||
if ($cstart < 0)
|
||||
$cstart = 0;
|
||||
|
||||
if ($cstart){
|
||||
$cstart = $cstart - 1;
|
||||
$cstart = $cstart * $forum_config['post_inpage'];
|
||||
}
|
||||
|
||||
$i = $cstart;
|
||||
|
||||
$config_inpage = $forum_config['post_inpage'];
|
||||
|
||||
switch ($_REQUEST['code'])
|
||||
{
|
||||
case "search":
|
||||
$search_text = strip_data($_REQUEST['search_text']);
|
||||
if ($search_text)
|
||||
{
|
||||
$_SESSION['search_text_'.$tid] = $search_text;
|
||||
}
|
||||
$search_text = $_SESSION['search_text_'.$tid];
|
||||
if ($search_text)
|
||||
{
|
||||
$search_page = 0;
|
||||
if (intval($_REQUEST['search_page']) == "1")
|
||||
$cstart = 0;
|
||||
|
||||
$search_text_topic = true;
|
||||
$access_forum = "(ff.access_read LIKE '%:".$member_id['user_group']."' OR ff.access_read LIKE '%:".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group']."')";
|
||||
$result_posts = $db->query("SELECT SQL_CALC_FOUND_ROWS forum_posts.*, ff.*, ff.id AS ffid, ff.name AS f_name, ".PREFIX."_forum_topics.*, users.* FROM `".PREFIX."_forum_posts` AS `forum_posts`, `".USERPREFIX."_users` AS `users`, `".PREFIX."_forum_forums` AS `ff`, `".PREFIX."_forum_topics` WHERE users.name = forum_posts.post_author AND forum_posts.post_author = '".$username."' AND tid = topic_id AND forum_posts.hidden = '0' AND (".$access_forum." AND ff.id = forum_id) ".$where." {$where_sort} ORDER BY post_date DESC LIMIT ".$cstart.",".$forum_config['post_inpage']."");
|
||||
$sql_count = "SELECT FOUND_ROWS() as count";
|
||||
$row = $db->super_query($sql_count);
|
||||
$count_all = $row['count'] + 1;
|
||||
|
||||
$a_href_reply = $config['http_home_url']."user/".$username."/posts/";
|
||||
|
||||
$icat = $config['http_home_url']."?do=forum&act=user_posts&name=".$username."&code=search&cstart=";
|
||||
$icat_prov = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
$access_forum = "(ff.access_read LIKE '%:".$member_id['user_group']."' OR ff.access_read LIKE '%:".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group']."')";
|
||||
$result_posts = $db->query("SELECT SQL_CALC_FOUND_ROWS forum_posts.*, ff.*, ff.id AS ffid, ff.name AS f_name, ".PREFIX."_forum_topics.*, users.* FROM `".PREFIX."_forum_posts` AS `forum_posts`, `".USERPREFIX."_users` AS `users`, `".PREFIX."_forum_forums` AS `ff`, `".PREFIX."_forum_topics` WHERE users.name = forum_posts.post_author AND forum_posts.post_author = '".$username."' AND tid = topic_id AND forum_posts.hidden = '0' AND (".$access_forum." AND ff.id = forum_id) ".$where." ORDER BY post_date DESC LIMIT ".$cstart.",".$forum_config['post_inpage']."");
|
||||
$sql_count = "SELECT FOUND_ROWS() as count";
|
||||
$row = $db->super_query($sql_count);
|
||||
$count_all = $row['count'] + 1;
|
||||
$search_page = 1;
|
||||
$search_text_topic = false;
|
||||
|
||||
$icat = $config['http_home_url']."user/".$username."/posts/page";
|
||||
$a_href_reply = $config['http_home_url']."user".$username."/";
|
||||
|
||||
$icat_prov = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($count_all)
|
||||
{
|
||||
require_once SYSTEM_DIR.'/forum/sources/shapeshifter/showallposts.php';
|
||||
require_once SYSTEM_DIR.'/forum/sources/components/navigation.php';
|
||||
}
|
||||
|
||||
if ($post_num_id)
|
||||
{
|
||||
$tpl->load_template($tpl_dir.'topic.tpl');
|
||||
|
||||
$tpl->set('{banner}', stripslashes($forums_array[$forum_id]['banner']));
|
||||
|
||||
$tpl->set('{addpost}', "");
|
||||
$tpl->set('{title}', "Ïîñëåäíèå ïîñòû ïîëüçîâàòåëÿ: ".$username."");
|
||||
$tpl->set('{title_descr}', "Âñåãî íàéäåíî ".$count_all." ïîñòîâ");
|
||||
|
||||
$tpl->set('{navigation}', $tpl->result['navigation']);
|
||||
$tpl->set_block("'\\[options\\](.*?)\\[/options\\]'si","");
|
||||
|
||||
$tpl->set('{topic_subscription}', "");
|
||||
$tpl->set('{say_friend}', "");
|
||||
$tpl->set('{topic_pechat}', "");
|
||||
|
||||
$tpl->set_block("'\\[new_topic\\](.*?)\\[/new_topic\\]'si","");
|
||||
$tpl->set_block("'\\[poll\\](.*?)\\[/poll\\]'si","");
|
||||
$tpl->set_block("'\\[reply\\](.*?)\\[/reply\\]'si","");
|
||||
$tpl->set('{s_reply}', "");
|
||||
|
||||
if ($search_text_topic)
|
||||
{
|
||||
$tpl->set('{search_link}', $config['http_home_url']."user/".$username."/posts/");
|
||||
$tpl->set('{search_num}', $count_all);
|
||||
$tpl->set('[search_link]','');
|
||||
$tpl->set('[/search_link]','');
|
||||
}
|
||||
else
|
||||
$tpl->set_block("'\\[search_link\\](.*?)\\[/search_link\\]'si","");
|
||||
|
||||
if ($forum_config['ses_topic'] and $forum_config['sessions_log'])
|
||||
{
|
||||
forum_sessions($forum_id, $tid);
|
||||
get_forum_online('act_topic', $tid);
|
||||
$tpl->set_block("'\\[online\\](.*?)\\[/online\\]'si","\\1");
|
||||
$tpl->set('{all_count}', $forum_online['all_count']);
|
||||
$tpl->set('{guest_count}', $forum_online['guest_count']);
|
||||
$tpl->set('{member_count}', $forum_online['member_count']);
|
||||
$tpl->set('{member_list}', $forum_online['member_list']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl->set_block("'\\[online\\](.*?)\\[/online\\]'si","");
|
||||
}
|
||||
|
||||
$tpl->set('{forum_name}', link_forum($forum_id, $forum_name));
|
||||
$tpl->set_block("'\\[old-topic\\](.*?)\\[/old-topic\\]'si","");
|
||||
$tpl->set_block("'\\[new-topic\\](.*?)\\[/new-topic\\]'si","");
|
||||
|
||||
$tpl->set('[fast-search]',"<form action=\"\" method=\"post\">");
|
||||
$tpl->set('[/fast-search]',"<input type=\"hidden\" name=\"code\" value=\"search\" /><input type=\"hidden\" name=\"search_page\" value=\"".$search_page."\" /></form>");
|
||||
|
||||
$tpl->set_block("'\\[moderation\\](.*?)\\[/moderation\\]'si","");
|
||||
|
||||
$tpl->set('{posts}', $tpl->result['posts']);
|
||||
|
||||
$tpl->compile('dle_forum');
|
||||
$tpl->clear();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
forum_msg($f_lang['search_result'], $f_lang['search_topic']);
|
||||
}
|
||||
}
|
||||
else
|
||||
forum_msg($f_lang['search_result'], "Âû íå âûáðàëè ïîëüçîâàòåëÿ.");
|
||||
|
||||
$metatags['title'] = 'Âñå ïîñòû ïîëüçîâàòåëÿ » '.$forum_config['forum_title'];
|
||||
|
||||
if ($forum_config['forum_bar'])
|
||||
{
|
||||
$bbr_cid = $c_id;
|
||||
$bbr_top = " » Âñå ïîñòû ïîëüçîâàòåëÿ";
|
||||
}
|
||||
|
||||
?>
|
||||
112
system/forum/sources/shapeshifter/forum_rss.php
Normal file
112
system/forum/sources/shapeshifter/forum_rss.php
Normal file
@@ -0,0 +1,112 @@
|
||||
<?PHP
|
||||
|
||||
define( 'DATALIFEENGINE', true );
|
||||
define( 'ROOT_DIR', '../../../..' );
|
||||
define( 'SYSTEM_DIR', '../../..' );
|
||||
@error_reporting( E_ALL ^ E_NOTICE );
|
||||
@ini_set( 'display_errors', true );
|
||||
@ini_set( 'html_errors', false );
|
||||
@ini_set( 'error_reporting', E_ALL ^ E_NOTICE );
|
||||
|
||||
if (! defined ( 'DATALIFEENGINE' ))
|
||||
die ( "Hacking attempt!" );
|
||||
|
||||
$forum_id = intval ( $_REQUEST ['fid']);
|
||||
|
||||
if ($forum_id != "" AND $forum_id != 0) {
|
||||
|
||||
include SYSTEM_DIR . '/data/config.php';
|
||||
require_once SYSTEM_DIR . '/classes/mysql.php';
|
||||
include_once SYSTEM_DIR . '/data/dbconfig.php';
|
||||
include_once SYSTEM_DIR . '/modules/functions.php';
|
||||
//require_once ENGINE_DIR . '/classes/templates.class.php';
|
||||
include_once ROOT_DIR . '/language/' . $config['langs'] . '/website.lng';
|
||||
|
||||
require_once SYSTEM_DIR . '/modules/sitelogin.php';
|
||||
if( ! $is_logged )
|
||||
{
|
||||
$member_id['user_group'] = 5;
|
||||
}
|
||||
|
||||
$opisanie = "Ôîðóì Files-Sib.NET"; // êîðîòêîå îïèñàíèå ñàéòà
|
||||
$adres_1 = "Files-Sib.NET"; // èìÿ äîìåíà
|
||||
$adres_2 = "http://files-sib.net/"; // àäðåñ âàøåãî ñàéòà
|
||||
$nazvanir_f = "Ôîðóì Files-Sib.NET"; // íàçâàíèå âàøåãî ôîðóìà
|
||||
$url_logo = "http://files-sib.net/templates/default/images/logo.png"; // ññûëêà íà ëîãî âàøåãî ñàéòà
|
||||
$f_info = $db->super_query("SELECT * FROM " . PREFIX . "_forum_forums where id = '$forum_id'");
|
||||
if ($f_info['id'] == $forum_id AND $f_info['id'] != "") // ïðîâåðêà íà ID íàéäåííîãî ôîðóìà
|
||||
{
|
||||
check_xss();
|
||||
$title = htmlspecialchars ( strip_tags ( stripslashes ( $f_info['name'] ) ) );
|
||||
$site = $config['http_home_url'];//3
|
||||
$rss_content = <<<XML
|
||||
<?xml version="1.0" encoding="{$config['charset']}"?>
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<channel>
|
||||
<title>{$nazvanir_f} » {$title}</title>
|
||||
<link>{$site}</link>
|
||||
<language>ru</language>
|
||||
<description>{$config['description']}</description>
|
||||
<copyright>{$opisanie}</copyright>
|
||||
<generator>{$adres_1}</generator>
|
||||
<image>
|
||||
<title>{$opisanie}</title>
|
||||
<url>{$url_logo}</url>
|
||||
<link>{$adres_2}</link>
|
||||
</image>
|
||||
|
||||
XML;
|
||||
|
||||
$access_forum = "(ff.access_read LIKE '%:".$member_id['user_group']."' OR ff.access_read LIKE '%:".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group'].":%' OR ff.access_read LIKE '".$member_id['user_group']."')";
|
||||
$sql_result = $db->query("SELECT * FROM `".PREFIX."_forum_posts` AS `forum_posts`, `".PREFIX."_forum_forums` AS `ff`, `".PREFIX."_forum_topics` WHERE tid = forum_posts.topic_id AND ff.id = '$f_info[id]' AND forum_posts.hidden = '0' AND (".$access_forum." AND ff.id = ".PREFIX."_forum_topics.forum_id) AND ".PREFIX."_forum_topics.hidden = '0' ORDER BY forum_posts.post_date DESC LIMIT 0,30");
|
||||
while($row = $db->get_row($sql_result))
|
||||
{
|
||||
$t_title = htmlspecialchars ( strip_tags ( stripslashes ( $row['title'] ) ) );
|
||||
|
||||
$rss_content .= <<<XML
|
||||
<item>
|
||||
<title>{$t_title}</title>
|
||||
|
||||
XML;
|
||||
$url = $config['http_home_url']."forum/topic_".$row['tid'];
|
||||
$rss_content .= "<link>{$url}</link>\n";
|
||||
$row['post_text'] = preg_replace ( "'\\[hide\\](.*?)\\[/hide\\]'ies", "", $row['post_text'] );
|
||||
$author = "<a {$go_page} href=\"".$config['http_home_url']."user/".urlencode($row['post_author'])."/\">".$row['post_author']."</a>";
|
||||
|
||||
$rss_content2 = <<<HTML
|
||||
{$row['post_text']}<br>
|
||||
<b>Îïóáëèêîâàë:</b> {$author}<hr>
|
||||
HTML;
|
||||
|
||||
$rss_content3 = stripslashes(str_replace("<br />", "<br>", $rss_content2));
|
||||
|
||||
$rss_content .= <<<XML
|
||||
<description>
|
||||
<![CDATA[ {$rss_content3} ]]>
|
||||
</description>
|
||||
<category>undefined</category>
|
||||
<dc:creator>{$row['post_author']}</dc:creator>
|
||||
<pubDate>{$row['post_date']}</pubDate>
|
||||
</item>
|
||||
|
||||
XML;
|
||||
|
||||
}
|
||||
|
||||
$rss_content .= <<<XML
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
XML;
|
||||
header ( 'Content-type: application/xml' );
|
||||
echo $rss_content;
|
||||
|
||||
}
|
||||
else
|
||||
header( "Location: {$config['http_home_url']}" );
|
||||
}
|
||||
else
|
||||
header( "Location: {$config['http_home_url']}" );
|
||||
|
||||
exit ();
|
||||
?>
|
||||
259
system/forum/sources/shapeshifter/showallposts.php
Normal file
259
system/forum/sources/shapeshifter/showallposts.php
Normal file
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
if(!defined('DATALIFEENGINE')){die("Hacking attempt!");}
|
||||
|
||||
if ($cstart) $post_num_id = $cstart;
|
||||
|
||||
while ($row = $db->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'] = "<div class=\"hidden_post\">{$f_lang['h_post']}:<br />".$row['post_text']."</div>";
|
||||
}else{
|
||||
$row['post_text'] = "<div class=\"hidden_post\">{$f_lang['h_post']}</div>";
|
||||
}
|
||||
}
|
||||
|
||||
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}', " Òåìà: <a href=\"".$config['http_home_url']."forum/topic_".$row['tid']."/last#reply\">".$row['title']."</a>, ");
|
||||
|
||||
$tpl->set('{post_id}', "<a href=\"javascript:PostLink($post_num_id);\" name=\"post-{$post_num_id}\">{$post_num_id}</a>");
|
||||
|
||||
if ($row['edit_time']) $tpl->set('{edit-info}', "<br /><span class='edit-info'>{$f_lang['edit_info']} <b>{$row['edit_user']}</b> - ".show_date($row['edit_time'])."</span>");
|
||||
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}', "<a href=\"".$config['http_home_url']."user/".urlencode($row['name'])."/\"><span style=\"color:{$group_span}\">{$row['post_author']}</span></a>");
|
||||
else
|
||||
$tpl->set('{author}', "<a {$go_page} href=\"#\"><span style=\"color:{$group_span}\">{$row['post_author']}</span></a>");
|
||||
}
|
||||
else $tpl->set('{author}', "<a href=\"mailto:".$row['e_mail']."\">{$row['post_author']}</a>");
|
||||
|
||||
$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 = "<span style=\"color:{$group_span}\">".$user_group[$row['user_group']]['group_name']."</span>";
|
||||
}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]',"<a href=\"{$a_forum_url}act=_topic&code=report&tid={$tid}&pid={$post_num_id}\">");
|
||||
$tpl->set('[/report]',"</a>");
|
||||
}
|
||||
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 = "<div class=\"rank\" style=\"display:inline;\">
|
||||
<ul class=\"unit-rank\">
|
||||
<li class=\"current-rank\" style=\"width:{$rating}px;\">{$rating}</li>
|
||||
</ul>
|
||||
</div>";
|
||||
}
|
||||
|
||||
$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: <a onClick=\"return dropdownmenu(this, event, IPMenu('".$row['post_ip']."', '".$lang['ip_info']."', '".$lang['ip_tools']."', '".$lang['ip_ban']."'), '190px')\" onMouseout=\"delayhidemenu()\" href=\"http://www.nic.ru/whois/?ip={$row['post_ip']}\" target=\"_blank\">{$row['post_ip']}</a>");
|
||||
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]',"<a onClick=\"return dropdownmenu(this, event, PostEditMenu('$row[pid]', '$a_forum_url', '$post_num_id'), '170px')\" onMouseout=\"delayhidemenu()\" href=\"#\">");
|
||||
$tpl->set('[/post-edit]',"</a>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl->set_block("'\\[post-edit\\](.*?)\\[/post-edit\\]'si","");
|
||||
}
|
||||
|
||||
// ********************************************************************************
|
||||
// POST DEL
|
||||
// ********************************************************************************
|
||||
|
||||
$tpl->set_block("'\\[post-del\\](.*?)\\[/post-del\\]'si","");
|
||||
|
||||
// ********************************************************************************
|
||||
// POST TEXT
|
||||
// ********************************************************************************
|
||||
$tpl->set('{text}', "<div id='post-id-".$row['pid']."'>".stripslashes($row['post_text'])."</div>");
|
||||
|
||||
// ********************************************************************************
|
||||
// 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","<div class=\"quote\">".$hide_info."</div>");
|
||||
}
|
||||
|
||||
$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 );
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user