mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 07:58:56 +02:00
Made index.php use the POST_USERS_URL constant everywhere
git-svn-id: file:///svn/phpbb/trunk@172 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3b5a1b549a
commit
d73080b03f
@ -1,26 +1,26 @@
|
|||||||
<?php
|
<?php
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* index.php
|
* index.php
|
||||||
* -------------------
|
* -------------------
|
||||||
* begin : Saturday, Feb 13, 2001
|
* begin : Saturday, Feb 13, 2001
|
||||||
* copyright : (C) 2001 The phpBB Group
|
* copyright : (C) 2001 The phpBB Group
|
||||||
* email : support@phpbb.com
|
* email : support@phpbb.com
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
include('extension.inc');
|
include('extension.inc');
|
||||||
include('common.'.$phpEx);
|
include('common.'.$phpEx);
|
||||||
|
|
||||||
@ -35,6 +35,7 @@ init_userprefs($userdata);
|
|||||||
//
|
//
|
||||||
// End session management
|
// End session management
|
||||||
//
|
//
|
||||||
|
//nl2br(var_dump($userdata));
|
||||||
|
|
||||||
$total_posts = get_db_stat($db, 'postcount');
|
$total_posts = get_db_stat($db, 'postcount');
|
||||||
$total_users = get_db_stat($db, 'usercount');
|
$total_users = get_db_stat($db, 'usercount');
|
||||||
@ -55,7 +56,7 @@ $sql = "SELECT c.*
|
|||||||
WHERE f.cat_id=c.cat_id
|
WHERE f.cat_id=c.cat_id
|
||||||
GROUP BY c.cat_id, c.cat_title, c.cat_order
|
GROUP BY c.cat_id, c.cat_title, c.cat_order
|
||||||
ORDER BY c.cat_order";
|
ORDER BY c.cat_order";
|
||||||
if(!$q_categories = $db->sql_query($sql))
|
if(!$q_categories = $db->sql_query($sql))
|
||||||
{
|
{
|
||||||
error_die(SQL_QUERY, "Could not query categories list.", __LINE__, __FILE__);
|
error_die(SQL_QUERY, "Could not query categories list.", __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
@ -72,7 +73,7 @@ if($total_categories)
|
|||||||
$limit_forums = " WHERE f.cat_id = $viewcat ";
|
$limit_forums = " WHERE f.cat_id = $viewcat ";
|
||||||
}
|
}
|
||||||
$sql = "SELECT f.*, u.username, u.user_id, p.post_time
|
$sql = "SELECT f.*, u.username, u.user_id, p.post_time
|
||||||
FROM ".FORUMS_TABLE." f
|
FROM ".FORUMS_TABLE." f
|
||||||
LEFT JOIN ".POSTS_TABLE." p ON p.post_id = f.forum_last_post_id
|
LEFT JOIN ".POSTS_TABLE." p ON p.post_id = f.forum_last_post_id
|
||||||
LEFT JOIN ".USERS_TABLE." u ON u.user_id = p.poster_id
|
LEFT JOIN ".USERS_TABLE." u ON u.user_id = p.poster_id
|
||||||
$limit_forums
|
$limit_forums
|
||||||
@ -95,7 +96,7 @@ if($total_categories)
|
|||||||
$total_forums = $db->sql_numrows($q_forums);
|
$total_forums = $db->sql_numrows($q_forums);
|
||||||
$forum_rows = $db->sql_fetchrowset($q_forums);
|
$forum_rows = $db->sql_fetchrowset($q_forums);
|
||||||
$forum_mods_list = $db->sql_fetchrowset($q_forum_mods);
|
$forum_mods_list = $db->sql_fetchrowset($q_forum_mods);
|
||||||
|
|
||||||
for($i = 0; $i < count($forum_mods_list); $i++)
|
for($i = 0; $i < count($forum_mods_list); $i++)
|
||||||
{
|
{
|
||||||
$forum_mods["forum_".$forum_mods_list[$i]["forum_id"]."_name"][] = $forum_mods_list[$i]["username"];
|
$forum_mods["forum_".$forum_mods_list[$i]["forum_id"]."_name"][] = $forum_mods_list[$i]["username"];
|
||||||
@ -111,7 +112,7 @@ if($total_categories)
|
|||||||
"CAT_DESC" => stripslashes($category_rows[$i]["cat_title"])
|
"CAT_DESC" => stripslashes($category_rows[$i]["cat_title"])
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
for($j = 0; $j < $total_forums; $j++)
|
for($j = 0; $j < $total_forums; $j++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -128,7 +129,7 @@ if($total_categories)
|
|||||||
$last_post_userid = $forum_rows[$j]["user_id"];
|
$last_post_userid = $forum_rows[$j]["user_id"];
|
||||||
$last_post_time = date($date_format, $forum_rows[$j]["post_time"]);
|
$last_post_time = date($date_format, $forum_rows[$j]["post_time"]);
|
||||||
$last_post = $last_post_time."<br>by ";
|
$last_post = $last_post_time."<br>by ";
|
||||||
$last_post .= "<a href=\"profile.$phpEx?mode=viewprofile&user_id=".$last_post_userid;
|
$last_post .= "<a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$last_post_userid;
|
||||||
$last_post .= "\">".$last_post_user."</a>";
|
$last_post .= "\">".$last_post_user."</a>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -156,7 +157,7 @@ if($total_categories)
|
|||||||
{
|
{
|
||||||
$moderators_links .= "<br>";
|
$moderators_links .= "<br>";
|
||||||
}
|
}
|
||||||
$moderators_links .= "<a href=\"profile.$phpEx?mode=viewprofile&user_id=".$forum_mods["forum_".$forum_rows[$j]["forum_id"]."_id"][$mods]."\">".$forum_mods["forum_".$forum_rows[$j]["forum_id"]."_name"][$mods]."</a>";
|
$moderators_links .= "<a href=\"profile.$phpEx?mode=viewprofile&".POST_USERS_URL."=".$forum_mods["forum_".$forum_rows[$j]["forum_id"]."_id"][$mods]."\">".$forum_mods["forum_".$forum_rows[$j]["forum_id"]."_name"][$mods]."</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars("catrow.forumrow", array("FOLDER" => $folder_image,
|
$template->assign_block_vars("catrow.forumrow", array("FOLDER" => $folder_image,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user