+ Changed generating last post and post count in forum and topic.php

+ Deleted not used template file: post_add_body.tpl
+ Replaced MCP images

git-svn-id: https://svn.pioder.pl/uf-svn/uF@21 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
pioder
2009-05-03 21:00:21 +00:00
parent b1f37b6ea5
commit c2ba3eb804
70 changed files with 371 additions and 395 deletions

View File

@@ -16,13 +16,15 @@ class Topic
function LastPostInTopic($topic)
{
global $lng;
global $lastpost;
global $last_post;
global $forum_config;
global $userdata;
$id = $lastpost[$topic]['tp_id'];
$userid = $lastpost[$topic]['u_id'];
$un = $lastpost[$topic]['user_nick'];
$rank = $lastpost[$topic]['user_rank'];
$id = $last_post[0];
$userid = $last_post[1];
$un = $last_post[4];
$rank = $last_post[3];
switch($rank)
{
case '0':
@@ -58,18 +60,18 @@ class Topic
{
$page='';
}
return '<p align="center"><span class="fverysmall"><b>'.GenerateTime($lastpost[$topic]['time']).'</b><br></span> <a href="topic.php?t='.$topic.$page.'#p'.$id.'" class="fverysmall"><b>Post #'.$id.'</b></a><a class="fsmall">: </a><a href="user.php?id='.$userid.'" class="fverysmall">'.$user_color_name.'</a></p>';
return '<p align="center"><span class="fverysmall"><b>'.GenerateTime($last_post[2]).'</b><br></span> <a href="topic.php?t='.$topic.$page.'#p'.$id.'" class="fverysmall"><b>Post #'.$id.'</b></a><a class="fsmall">: </a><a href="user.php?id='.$userid.'" class="fverysmall">'.$user_color_name.'</a></p>';
}
function LastPostImg()
{
global $lastpost;
global $last_post;
global $record;
global $default_skin;
$time = time()-129600;
if ($_SESSION['uid']>0)
{
if ($lastpost[$record['t_id']]['time']>$time)
if ($last_post[2]>$time)
{
return 'folder_new_posts';
}
@@ -115,7 +117,7 @@ class Topic
function TopicInformation($tid, $mode)
{
$sql = "SELECT * FROM ".TOPICS_TABLE." WHERE t_id='$tid';";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain topic information');
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain topic information');
$result = DataBase::fetch($query);
$result = $result[$mode];
return $result;
@@ -124,7 +126,7 @@ class Topic
function PostInformation($pid, $mode)
{
$sql = "SELECT * FROM ".POSTS_TABLE." WHERE p_id='$pid';";
$query = DataBase::sql_query($sql,'GENERAL','Could not obtain topic information');
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain topic information');
$result = DataBase::fetch($query);
$result = $result[$mode];
return $result;