+ 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

@@ -30,7 +30,7 @@ SessDelInvalid();
SessRegister();
SessDeleteOld();
$sql = "SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id ORDER BY `ptime`";
$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum');
$query = DataBase::sql_query($sql,GENERAL, 'Could not obtain amout of posts in forum');
while($result = DataBase::fetch($query))
{
$lastpost[$result['t_id']]['tp_id']=$result['tp_id'];
@@ -40,7 +40,7 @@ while($result = DataBase::fetch($query))
$lastpost[$result['t_id']]['user_rank']=$result['rank'];
}
$sql = "SELECT COUNT(*) as `p_id`, `t_id` FROM ".POSTS_TABLE." GROUP BY `t_id`";
$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain amout of posts in forum');
$query = DataBase::sql_query($sql,GENERAL, 'Could not obtain amout of posts in forum');
while($result = DataBase::fetch($query))
{
$count_topic[$result['t_id']]=$result['p_id'];
@@ -105,7 +105,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
if (isset($_GET['u']))
{
$count = DataBase::fetch(DataBase::sql_query("SELECT COUNT(`t_id`) as `t_id`
FROM ".TOPICS_TABLE." WHERE `author`='".intval($_GET['u'])."'",'GENERAL','Could not obtain count amout of topics'));
FROM ".TOPICS_TABLE." WHERE `author`='".intval($_GET['u'])."'",GENERAL,'Could not obtain count amout of topics'));
$count = $count['t_id'];
$count = ceil($count / $limiter);
if ($count==0)
@@ -139,7 +139,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
$like_where .=' OR `text` LIKE \'%'.$keyword[$i].'%\'';
}
$sql = "SELECT COUNT(".TOPICS_TABLE.".t_id) as `count`, ".POSTS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".POSTS_TABLE." ON ".POSTS_TABLE.".t_id = ".TOPICS_TABLE.".t_id WHERE $like_where GROUP BY `t_id`";
$count = DataBase::fetch(DataBase::sql_query($sql,'GENERAL','Could not obtain count amout of topics'));
$count = DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics'));
$count = $count['count'];
$count = ceil($count / $limiter);
if ($count==0)
@@ -178,7 +178,7 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
$skin = array_push_associative($skin,GenerateHeader($window_title,$navigator_title));
include('./skins/'.$default_skin.'/overall_header.tpl');
include('./skins/'.$default_skin.'/forum_body.tpl');
$query = DataBase::sql_query($sql,'GENERAL', 'Could not obtain topics information');
$query = DataBase::sql_query($sql,GENERAL, 'Could not obtain topics information');
$value = DataBase::num_rows($query);
if ($value>0)
{