+ Censorlist was extended - added replacement parametr
+ Fixed bug with DB Size in check_script.php
+ Deleted a lot of indexes in check_script_data.php
+ Deleted cache index and forum lastpost section in cache_index.php and cache_forum.php
+ Fixed other bugs in warnings
+ Fixed pagination in search.php
+ Replaced DSF logo to uForum logo
+ Moved differend elements in skin
+ Added "WHOIS" option in "Admin/Mod Pool" in view topic
+ Fixed bug in add warnings: couldn't add warn for admin/mod
git-svn-id: https://svn.pioder.pl/uf-svn/uF@29 72ec579a-5ced-4fa4-82f3-afba5d98df2f
DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word' WHERE `w_id`='$wid'",GENERAL,'Could not update censored word.');
$replace=$_POST['replace'];
DataBase::sql_query("UPDATE ".CENSORLIST_TABLE." SET `word`='$word', `replace`='$replace' WHERE `w_id`='$wid'",GENERAL,'Could not update censored word.');
/*$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');
while($result=DataBase::fetch($query))
{
$count_topic[$result['t_id']]=$result['p_id'];
}*/
/*$sql="SELECT ".POSTS_TABLE.".*, ".USERS_TABLE.".* FROM ".POSTS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".USERS_TABLE.".u_id = ".POSTS_TABLE.".u_id WHERE `f_id`='$fid' ORDER BY `ptime`";
$query=DataBase::sql_query($sql,GENERAL,'Could not obtain amout of posts in forum');
$sql="SELECT ".FORUMS_TABLE.".*, COUNT(".POSTS_TABLE.".p_id) as amout, ".POSTS_TABLE.".f_id AS count FROM ".FORUMS_TABLE." LEFT JOIN ".POSTS_TABLE." ON ".FORUMS_TABLE.".f_id= ".POSTS_TABLE.".f_id GROUP BY `f_id` ORDER BY `c_id`, `sort`";
$sql="SELECT ".FORUMS_TABLE.".*
FROM".FORUMS_TABLE."
ORDERBY`c_id`,`sort`";
$query=DataBase::sql_query($sql,CRITICAL,'Could not obtain forum information.');
$query=DataBase::sql_query($sql,CRITICAL,'Could not obtain forum information.');
$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`";
/*$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))
while($result=DataBase::fetch($query))
{
{
@ -44,11 +44,12 @@ $query = DataBase::sql_query($sql,GENERAL, 'Could not obtain amout of posts in f
@ -88,10 +113,26 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
if($_SESSION['uid']>0)
if($_SESSION['uid']>0)
{
{
$time=time()-129600;
$time=time()-129600;
$sql="SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id WHERE lastpost_time>$time ORDER BY `sticky` DESC, `lastpost_time` DESC LIMIT 60;";
$sql="SELECT COUNT(`t_id`) as `cnt` FROM ".TOPICS_TABLE." WHERE lastpost_time>$time";
$count=DataBase::fetch(DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics'));
$count=$count['cnt'];
$count=ceil($count/$limiter);
if($count==0)
{
$count+=1;
}
if(isset($_GET['page'])&&($_GET['page']>$count))
{
message_forum($lng['invalidpage'],'index.php');
}
$sql="SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".TOPICS_TABLE.".posts AS posts
@ -138,9 +179,13 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
{
{
$like_where.=' OR `text` LIKE \'%'.$keyword[$i].'%\'';
$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'));
@ -150,7 +195,13 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
{
{
message_forum($lng['invalidpage'],'index.php');
message_forum($lng['invalidpage'],'index.php');
}
}
$sql="SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".POSTS_TABLE.".* FROM ".TOPICS_TABLE." LEFT JOIN ".USERS_TABLE." ON ".TOPICS_TABLE.".author = ".USERS_TABLE.".u_id LEFT JOIN ".POSTS_TABLE." ON ".POSTS_TABLE.".t_id = ".TOPICS_TABLE.".t_id WHERE $like_where ORDER BY `sticky` DESC, `lastpost_time` DESC $limit;";
$sql="SELECT ".TOPICS_TABLE.".*, ".USERS_TABLE.".*, ".POSTS_TABLE.".*, ".TOPICS_TABLE.".posts AS posts