+ Replaced old functions to listing dirs in admin_script.php and admin_users.php
+ Fixed update server address + Replaced URL in footer + Deleted admin styles page + Fixed a few bugs in polish language files git-svn-id: https://svn.pioder.pl/uf-svn/uF@35 72ec579a-5ced-4fa4-82f3-afba5d98df2f
This commit is contained in:
@@ -20,6 +20,7 @@ include('./../includes/classes/class_user.php');
|
||||
include('./../common.php');
|
||||
include('./../includes/admin/class_main.php');
|
||||
include('./../includes/classes/class_forum.php');
|
||||
include('./../includes/misc_functions.php');
|
||||
include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
|
||||
SessDelInvalid();
|
||||
SessRegister();
|
||||
@@ -29,67 +30,6 @@ if (User::UserInformation($_SESSION['uid'],'rank')!=2)
|
||||
admin_message_forum($lng['yournotadmin'],'../index.php');
|
||||
}
|
||||
|
||||
function AddSkins()
|
||||
{
|
||||
global $forum_config;
|
||||
$all='';
|
||||
$query = DataBase::sql_query("SELECT `name`, `s_id` FROM `".SKINS_TABLE."`",GENERAL,'Could not obtain skins information');
|
||||
while($t = DataBase::fetch($query))
|
||||
{
|
||||
|
||||
if ($t['s_id']==$forum_config['defaultskin'])
|
||||
{
|
||||
$all .= '<option value="'.$t['s_id'].'" selected="selected">'.$t['name'].'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$all .= '<option value="'.$t['s_id'].'">'.$t['name'].'</option>';
|
||||
}
|
||||
}
|
||||
return $all;
|
||||
unset($t, $all);
|
||||
}
|
||||
function AddPages2($page)//for admin script, not used in limit!
|
||||
{
|
||||
$content = '';
|
||||
for ($i=1;$i<=50;$i++)
|
||||
{
|
||||
if ($i==$page)
|
||||
{
|
||||
$content .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$content .= '<option value="'.$i.'">'.$i.'</option>';
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
unset($content);
|
||||
}
|
||||
function AddLangs()
|
||||
{
|
||||
global $forum_config;
|
||||
$result='';
|
||||
$rep=opendir('./../lngs');
|
||||
while ($file = readdir($rep))
|
||||
{
|
||||
if($file != '..' && $file !='.' && $file !='')
|
||||
{
|
||||
if (is_dir('./../lngs/'.$file)){
|
||||
if ($file==$forum_config['defaultlang'])
|
||||
{
|
||||
$result .='<option value="'.$file.'" selected="selected">'.$file.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$result .='<option value="'.$file.'">'.$file.'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
unset($rep, $file, $result);
|
||||
}
|
||||
$errors = true;
|
||||
if (isset($_POST['forum_path']))
|
||||
{
|
||||
@@ -334,10 +274,10 @@ $skin = array(
|
||||
'forum_disabled'=>$forum_config['disable_forum'],
|
||||
'L.default_skin'=>$lng['default_skin'],
|
||||
'L2.default_skin'=>$lng['select_skin'],
|
||||
'OPTIONS.default_skin'=>ListDir('skins', $forum_config['default_skin']),
|
||||
'OPTIONS.default_skin'=>ListDir('../skins', $forum_config['defaultskin']),
|
||||
'L.default_lang'=>$lng['default_lang'],
|
||||
'L2.default_lang'=>$lng['select_lang'],
|
||||
'OPTIONS.default_lang'=>ListDir('lngs', $forum_config['default_lang']),
|
||||
'OPTIONS.default_lang'=>ListDir('../lngs', $forum_config['defaultlang']),
|
||||
'L.meta_keywords'=>$lng['meta_keywords'],
|
||||
'meta_keywords'=>$forum_config['meta_keywords'],
|
||||
'L.meta_description'=>$lng['meta_description'],
|
||||
|
||||
@@ -19,6 +19,7 @@ include('./../includes/sessions.php');
|
||||
include('./../includes/classes/class_user.php');
|
||||
include('./../common.php');
|
||||
include('./../includes/admin/class_main.php');
|
||||
include('./../includes/misc_functions.php');
|
||||
include('./../includes/classes/class_topic.php');
|
||||
include('./../includes/classes/class_posting.php');
|
||||
include('./../includes/classes/secure.php');
|
||||
@@ -220,11 +221,11 @@ switch($_GET['mode'])
|
||||
'lovpr'=>$lng['general_settings'],
|
||||
'L.select_value'=>$lng['select_value'],
|
||||
'L.limit_users'=>$lng['limit_users'],
|
||||
'OPTIONS.limit_users'=>Admin_Over::ListPages($userinfo['limit_users']),
|
||||
'OPTIONS.limit_users'=>ListPages($userinfo['limit_users']),
|
||||
'L.posts_in_topic'=>$lng['limit_posts'],
|
||||
'OPTIONS.limit_tpid'=>Admin_Over::ListPages($userinfo['limit_tpid']),
|
||||
'OPTIONS.limit_tpid'=>ListPages($userinfo['limit_tpid']),
|
||||
'L.topics_in_forum'=>$lng['limit_topics'],
|
||||
'OPTIONS.limit_ftid'=>Admin_Over::ListPages($userinfo['limit_ftid']),
|
||||
'OPTIONS.limit_ftid'=>ListPages($userinfo['limit_ftid']),
|
||||
'lupr'=>$lng['profile_settings'],
|
||||
'lspr'=>$lng['signature_settings'],
|
||||
'ladmpr'=>$lng['admin_settings'],
|
||||
@@ -233,10 +234,10 @@ switch($_GET['mode'])
|
||||
'lposts'=>$lng['posts'],
|
||||
'posts'=>$userinfo['posts'],
|
||||
'ldefault_lang'=>$lng['default_lang'],
|
||||
'default_lang'=>Admin_Over::ListDir('lngs', $userinfo['default_lang']),
|
||||
'default_lang'=>ListDir('../lngs', $userinfo['lang']),
|
||||
'l2default_lang'=>$lng['select_lang'],
|
||||
'ldefault_skin'=>$lng['default_skin2'],
|
||||
'default_skin'=>Admin_Over::ListDir('skins', $userinfo['default_skin']),
|
||||
'default_skin'=>ListDir('../skins', $userinfo['skin']),
|
||||
'l2default_skin'=>$lng['select_skin'],
|
||||
'lapr'=>$lng['avatar_settings'],
|
||||
'lsubmit'=>$lng['save'],
|
||||
@@ -441,7 +442,7 @@ switch($_GET['mode'])
|
||||
include('./template/user_item_add_body.tpl');
|
||||
}
|
||||
$skin = array(
|
||||
'option_pages'=>Admin_Over::ListPages($page, $count),
|
||||
'option_pages'=>ListPages($page, $count),
|
||||
'lwith'=>$lng['with'],
|
||||
'lpage'=>$lng['page'],
|
||||
'lpages'=>$count
|
||||
|
||||
@@ -33,27 +33,27 @@ if (User::UserInformation($_SESSION['uid'],'rank')!=2)
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
$version = '';
|
||||
if ($open = @fsockopen('pioder.gim2przemysl.int.pl', 80, $errno, $errstr, 10))
|
||||
if ($open = fsockopen('pioder.ath.cx', 80, $errno, $errstr, 10))
|
||||
{
|
||||
@fputs($open, "GET /updates.php?app=dsf HTTP/1.1\r\n");
|
||||
@fputs($open, "HOST: pioder.gim2przemysl.int.pl\r\n");
|
||||
@fputs($open, "Connection: close\r\n\r\n");
|
||||
fputs($open, "GET /updates.php?app=uf HTTP/1.1\r\n");
|
||||
fputs($open, "HOST: pioder.ath.cx\r\n");
|
||||
fputs($open, "Connection: close\r\n\r\n");
|
||||
$get_info = false;
|
||||
while (!@feof($open))
|
||||
while (!feof($open))
|
||||
{
|
||||
if ($get_info)
|
||||
{
|
||||
$version .= @fread($open, 1024);
|
||||
$version .= fread($open, 1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (@fgets($open, 1024) == "\r\n")
|
||||
if (fgets($open, 1024) == "\r\n")
|
||||
{
|
||||
$get_info = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@fclose($open);
|
||||
fclose($open);
|
||||
if ($version==VERSION)
|
||||
{
|
||||
$result = $lng['noupdates'];
|
||||
|
||||
112
admin/styles.php
112
admin/styles.php
@@ -1,112 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package uForum
|
||||
* @file admin/styles.php
|
||||
* @version $Id$
|
||||
* @copyright 2009(c) PioDer <pioder@wp.pl>
|
||||
* @link http://pioder.gim2przemysl.int.pl/
|
||||
* @license GNU GPL v3
|
||||
**/
|
||||
define('IN_uF', true);
|
||||
//include files
|
||||
include('./../config.php');
|
||||
include('./../includes/constants.php');
|
||||
include('./../includes/db.php');
|
||||
include('./../includes/errors.php');
|
||||
include('./../includes/classes/class_pms.php');
|
||||
//connect to database
|
||||
DataBase::db_connect();
|
||||
include('./../includes/sessions.php');
|
||||
include('./../includes/classes/class_user.php');
|
||||
include('./../common.php');
|
||||
include('./../includes/admin/class_main.php');
|
||||
include('./../includes/classes/class_forum.php');
|
||||
include('./../includes/admin/class_forum.php');
|
||||
include('./../includes/classes/secure.php');
|
||||
include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
|
||||
SessDelInvalid();
|
||||
SessRegister();
|
||||
SessDeleteOld();
|
||||
|
||||
if (User::UserInformation($_SESSION['uid'],'rank')!=2)
|
||||
{
|
||||
admin_message_forum($lng['yournotadmin'],'../index.php');
|
||||
}
|
||||
if (!isset($_GET['mode']))
|
||||
{
|
||||
header('Location: styles.php?mode=view');
|
||||
}
|
||||
switch($_GET['mode'])
|
||||
{
|
||||
case 'delete':
|
||||
{
|
||||
$sid = intval($_GET['id']);
|
||||
if ($sid!=$forum_config['defaultskin'])
|
||||
{
|
||||
$sql = "DELETE FROM ".SKINS_TABLE." WHERE `s_id`='$sid'";
|
||||
DataBase::sql_query($sql,GENERAL,'Could not delete skin');
|
||||
$sql = "UPDATE ".USERS_TABLE." SET `skin`='".$forum_config['defaultskin']."' WHERE `skin`='$sid'";
|
||||
DataBase::sql_query($sql,GENERAL,'Could not update user');
|
||||
admin_message_forum($lng['skins_deleted'],'styles.php?mode=view');
|
||||
}
|
||||
else
|
||||
{
|
||||
admin_message_forum($lng['styles_info_1'],'styles.php?mode=view');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'view':
|
||||
{
|
||||
if (isset($_POST['skin']))
|
||||
{
|
||||
if(strlen(trim($_POST['skin']))>3)
|
||||
{
|
||||
if (is_dir('./../skins/'.$_POST['skin']))
|
||||
{
|
||||
$last = DataBase::new_id(SKINS_TABLE);
|
||||
DataBase::sql_query("INSERT INTO ".SKINS_TABLE." VALUES ('$last','".strip_tags($_POST['skin'])."')",GENERAL,'Could not add skin');
|
||||
$_POST['skin']='';
|
||||
admin_message_forum($lng['skins_added'],'styles.php?mode=view');
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST['skin']='';
|
||||
admin_message_forum($lng['invalid_skin'],'styles.php?mode=view');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST['skin']='';
|
||||
}
|
||||
$skin = array(
|
||||
'L.main_beam'=>$lng['admin_styles'],
|
||||
'L.install'=>$lng['install'],
|
||||
'L.new_skin'=>$lng['new_skin'],
|
||||
'L.delete'=>$lng['delete'],
|
||||
'L.actual_skins'=>$lng['actual_skins']
|
||||
);
|
||||
Admin_Over::GenerateHeader();
|
||||
include('./template/skins_beam_body.tpl');
|
||||
$sql = "SELECT * FROM ".SKINS_TABLE;
|
||||
$query = DataBase::sql_query($sql,GENERAL,'Could not obtain skins information');
|
||||
while ($item = DataBase::fetch($query))
|
||||
{
|
||||
$skin=array(
|
||||
'L.delete' => $lng['delete'],
|
||||
'skin_name' => $item['name'],
|
||||
's_id' => $item['s_id']
|
||||
);
|
||||
include('./template/skins_item_add.tpl');
|
||||
}
|
||||
echo '</table>';
|
||||
include('./template/overall_footer.tpl');
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
header('Location: styles.php?mode=view');
|
||||
break;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -15,7 +15,7 @@
|
||||
<br>
|
||||
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
|
||||
<table align="center" class="message" width="<?= TABLES_WIDTH; ?>">
|
||||
<tr><td class="fitem" align="center"><font face="Verdana" style="font-size: 16pt; font-weight: bold">DSF v <? echo VERSION; ?></font></td></tr>
|
||||
<tr><td class="fitem" align="center"><font face="Verdana" style="font-size: 16pt; font-weight: bold">µForum v <? echo VERSION; ?></font></td></tr>
|
||||
<tr>
|
||||
<td valign="center" align="center" class="message">
|
||||
<? echo $skin['msg']; ?>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<a href="check_script.php" target="main" class="beam"><?= $skin['scriptstat']; ?></a> •
|
||||
<a href="admin_script.php" target="main" class="beam"><?= $skin['scriptoptions']; ?></a> •
|
||||
<a href="mass_email.php" target="main" class="beam"><?= $skin['mass_email']; ?></a> •
|
||||
<a href="styles.php" target="main" class="beam"><?= $skin['admin_styles']; ?></a> •
|
||||
<a href="admin_forums.php" target="main" class="beam"><?= $skin['admin_forums']; ?></a>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<center>
|
||||
<div align="center" style="width: <?= (TABLES_WIDTH+40); ?>px; background-color: #F1F3FE">
|
||||
<div align="center" style="width: <?= TABLES_WIDTH; ?>px;">
|
||||
<br>
|
||||
<div align="left" style="width: <?= TABLES_WIDTH; ?>px">
|
||||
<span class="pa_sect"><?= $skin['L.main_beam']; ?></span>
|
||||
<form action="styles.php?mode=view" method="POST">
|
||||
<span class="fstandard"><b><?= $skin['L.new_skin']; ?>:</b></span> <input type="text" name="skin" maxlength="25" value="<?= $_POST['skin']; ?>">
|
||||
<input type="submit" class="fbutton" value="<?= $skin['L.install']; ?>">
|
||||
</form>
|
||||
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-width: 0px">
|
||||
<tr>
|
||||
<td width="17" style="background-image: url('template/images/td_beam_left.gif')"></td>
|
||||
<td class="beam" style="background-image: url('template/images/td_beam_top.gif')">
|
||||
<p align="center"><?= $skin['L.actual_skins']; ?>
|
||||
</td>
|
||||
<td width="17" style="background-image: url('template/images/td_beam_right.gif')"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="maintable" width="<?= TABLES_WIDTH; ?>" style="border-top: 0px">
|
||||
@@ -1,10 +0,0 @@
|
||||
<tr>
|
||||
<td width="708" height="7" class="fitem" align="center">
|
||||
<span class="fstandard"><?= $skin['skin_name']; ?></span>
|
||||
</td>
|
||||
<td width="40" height="7" class="fitem" align="center">
|
||||
<a href="styles.php?mode=delete&id=<?= $skin['s_id']; ?>" class="fstandard">
|
||||
<font color="brown"><b><?= $skin['L.delete'];?></b></font>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -13,47 +13,7 @@ if ( !defined('IN_uF') )
|
||||
}
|
||||
class Admin_Over
|
||||
{
|
||||
function ListPages($page, $count = 50)//for edit profile, not used in limit!
|
||||
{
|
||||
$content = '';
|
||||
for ($i=1;$i<=$count;$i++)
|
||||
{
|
||||
if ($i==$page)
|
||||
{
|
||||
$content .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$content .= '<option value="'.$i.'">'.$i.'</option>';
|
||||
}
|
||||
}
|
||||
return $content;
|
||||
unset($content);
|
||||
}
|
||||
|
||||
function ListDir($dir, $selection)
|
||||
{
|
||||
$result='';
|
||||
$rep=opendir('./../'.$dir);
|
||||
while ($file = readdir($rep))
|
||||
{
|
||||
if($file != '..' && $file !='.' && $file !='' && $file[0] != '.')
|
||||
{
|
||||
if (is_dir('./../'.$dir.'/'.$file)){
|
||||
if ($file==$selection)
|
||||
{
|
||||
$result .='<option value="'.$file.'" selected="selected">'.$file.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$result .='<option value="'.$file.'">'.$file.'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
unset($rep, $file, $result);
|
||||
}
|
||||
|
||||
function DefaultLang()
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ define('TOPICS_TABLE',DB_PREFIX.'topics');
|
||||
define('WARNINGS_TABLE',DB_PREFIX.'warns');
|
||||
|
||||
//footer forum text
|
||||
define('FOOTER_TEXT','<span class="copyright" >Powered by <b>µForum</b></span><span class="copyright"> © 2007-2009 </span><a href="http://pioder.gim2przemysl.int.pl/" class="copyright" target="_blank"><b>PioDer</b></a>');
|
||||
define('FOOTER_TEXT','<span class="copyright" >Powered by <b>µForum</b></span><span class="copyright"> © 2007-2009 </span><a href="http://pioder.ath.cx/" class="copyright" target="_blank"><b>PioDer</b></a>');
|
||||
//hash for password
|
||||
define('PASSWD_HASH','bJVhVFCthvhVhKBU6GUbhUBU6VI7BiU6fV7G76Kbug6FU67VsaVYat5FJUHssaYVY5fV5GUHI76uKYTjYKKTatastYKYTYKg6ds7IRdsagI565JTrJ4NFGagGKLULygaTJHgfYDRZagGHJ65KL7iryikuuyriMYIYYUyugFTDeRnLKJNuyTDTRsERy78IJOhHCTDYjomLKBJDF5THNNBjyFCDYekjnKBUYgIHnUIbyuG6UyHNKJjnKHVut6FBYlH987g6GIUBbg76V5NNLUBH76BKLBi76FVtjN76Gi77ggYVCx3 R4SGhfGLHIH64XFGBUNLJOgfvc4Y3ScvmljmOBVc4klJKNIuBGVY6 MbvhGCRGgJLjKFHrYYJnKJGFHTfJJjnLK');
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ $lng['posts']='Liczba postów';
|
||||
$lng['scriptversion']='Wersja skryptu';
|
||||
$lng['updates']='Aktualizacje';
|
||||
$lng['noupdates']='<span class="fstandard"><b><font color="green">Twoje forum jest aktualne.</font></b></span>';
|
||||
$lng['updatenow']='<a href="http://dsf.gim2przemysl.int.pl/index.php?mode=download" class="fstandard" target="_blank"><b><font color="red">Skrypt jest nieaktualny, zaaktualizuj najszybciej!</font></b></a>';
|
||||
$lng['updatenow']='<a href="http://pioder.ath.cx/download.html" class="fstandard" target="_blank"><b><font color="red">Skrypt jest nieaktualny, zaaktualizuj najszybciej!</font></b></a>';
|
||||
//
|
||||
//on check script.......----------------------------------------
|
||||
//
|
||||
@@ -169,7 +169,7 @@ $lng['t_forum_path']='Jeżeli forum działa poprawnie nie zmieniaj tej ścieżki
|
||||
$lng['forum_name']='Nazwa forum';
|
||||
$lng['forum_disabled']='Forum wyłączone';
|
||||
$lng['t_forum_disabled']='Aby wyłączyć forum podaj powód, w innym przypadku pozostaw pole puste!';
|
||||
$lng['default_skin']='Domyślny styl forum (<a href="styles.php" target="main" class="fstandard"><b>Zarządzaj</b></a>)';
|
||||
$lng['default_skin']='Domyślny styl forum';
|
||||
$lng['default_skin2']='Styl forum';
|
||||
$lng['select_skin']='Wybierz styl';
|
||||
$lng['default_lang']='Domyślny język';
|
||||
@@ -179,7 +179,7 @@ $lng['meta_keywords']='Słowa kluczowe';
|
||||
$lng['meta_description']='Opis';
|
||||
$lng['other']='Inne';
|
||||
$lng['show_time_generation']='Pokazuj czas generowania strony';
|
||||
$lng['enable_censorlist']='Cenzura słów włączączona';
|
||||
$lng['enable_censorlist']='Cenzura słów włączona';
|
||||
$lng['enable_confirms']='Potwierdzenia czynności(Kasacja, przenoszenie, itp.)';
|
||||
$lng['select_value']='Wybierz wartość';
|
||||
$lng['limit_users']='Użytkowników na stronę';
|
||||
|
||||
@@ -40,7 +40,7 @@ $lng['statistics']='Statystyki';
|
||||
$lng['showlastposts']='Pokaż ostatnie posty';
|
||||
$lng['forum_counter']='Forum odwiedzono <b>%x%</b> razy.';
|
||||
$lng['total_posts']='Nasi użytkownicy napisali <b>%x%</b> postów';
|
||||
$lng['reg_users']='Na forum jest zarejestrowanych <b>%x%</b> użytkowników';
|
||||
$lng['reg_users']='Zarejestrowanych <b>%x%</b> profili użytkowników';
|
||||
$lng['users_groups']='Grupy użytkowników: <a href="groups.php?mode=view&id=admins" class="fstandard"><font color='.$forum_config['color_admin'].'><b>Administrator</b></font></a> • <a href="groups.php?mode=view&id=mods" class="fstandard"><font color='.$forum_config['color_mod'].'><b>Moderator</b></font></a> • Użytkownik';
|
||||
$lng['youareloggedas']='Jesteś zalogowany jako';
|
||||
$lng['youarenotlogd']='Nie jesteś zalogowany';
|
||||
|
||||
18
search.php
18
search.php
@@ -29,22 +29,7 @@ $default_skin = ViewSkinName();
|
||||
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');
|
||||
while($result = DataBase::fetch($query))
|
||||
{
|
||||
$lastpost[$result['t_id']]['tp_id']=$result['tp_id'];
|
||||
$lastpost[$result['t_id']]['u_id']=$result['u_id'];
|
||||
$lastpost[$result['t_id']]['time']=$result['ptime'];
|
||||
$lastpost[$result['t_id']]['user_nick']=$result['nick'];
|
||||
$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');
|
||||
while($result = DataBase::fetch($query))
|
||||
{
|
||||
$count_topic[$result['t_id']]=$result['p_id'];
|
||||
}*/
|
||||
|
||||
if (!isset($_GET['content']))
|
||||
{
|
||||
header('Location: search.php?content=posts');
|
||||
@@ -183,7 +168,6 @@ if ((isset($_POST['keywords'])) || ($_GET['content']=='lastposts') || ($_GET['co
|
||||
FROM ".TOPICS_TABLE."
|
||||
LEFT JOIN ".POSTS_TABLE." ON ".POSTS_TABLE.".t_id = ".TOPICS_TABLE.".t_id
|
||||
WHERE $like_where GROUP BY `t_id`";
|
||||
echo $sql;
|
||||
$count = DataBase::sql_query($sql,GENERAL,'Could not obtain count amout of topics');
|
||||
$count = DataBase::num_rows($count);//$count['count'];
|
||||
$count = ceil($count / $limiter);
|
||||
|
||||
Reference in New Issue
Block a user