mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-15 18:42:15 +02:00
Compare commits
7 Commits
release-2.
...
2.0.x
Author | SHA1 | Date | |
---|---|---|---|
|
c73ff606d4 | ||
|
f9cd8acb4a | ||
|
663a961014 | ||
|
dbb942a03f | ||
|
78c4257195 | ||
|
c4b98a443d | ||
|
991f68a85b |
@@ -947,7 +947,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username'])
|
||||
$avatar = '<img src="../' . $board_config['avatar_path'] . '/' . $user_avatar . '" alt="" />';
|
||||
break;
|
||||
case USER_AVATAR_REMOTE:
|
||||
$avatar = '<img src="' . $user_avatar . '" alt="" />';
|
||||
$avatar = (isset($HTTP_GET_VARS['p_sid'])) ? $lang['Priv_Img'] . " $user_avatar" : '<img src="' . $user_avatar . '" alt="" />';
|
||||
break;
|
||||
case USER_AVATAR_GALLERY:
|
||||
$avatar = '<img src="../' . $board_config['avatar_gallery_path'] . '/' . $user_avatar . '" alt="" />';
|
||||
@@ -1143,8 +1143,9 @@ else
|
||||
|
||||
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
|
||||
|
||||
'S_USER_ACTION' => append_sid("admin_users.$phpEx"),
|
||||
'S_USER_SELECT' => $select_list)
|
||||
'S_USER_ACTION' => "admin_users.$phpEx?sid=" . $userdata['session_id'],
|
||||
'S_USER_SELECT' => $select_list,
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="p_sid" value="' . $userdata['priv_session_id'] . '"/>')
|
||||
);
|
||||
$template->pparse('body');
|
||||
|
||||
|
@@ -52,6 +52,13 @@ if ($HTTP_GET_VARS['sid'] != $userdata['session_id'])
|
||||
redirect("index.$phpEx?sid=" . $userdata['session_id']);
|
||||
}
|
||||
|
||||
$p_sid = (isset($HTTP_GET_VARS['p_sid'])) ? $HTTP_GET_VARS['p_sid'] : ((isset($HTTP_POST_VARS['p_sid'])) ? $HTTP_POST_VARS['p_sid'] : '');
|
||||
|
||||
if ($p_sid !== $userdata['priv_session_id'])
|
||||
{
|
||||
redirect("index.$phpEx?sid=" . $userdata['session_id']);
|
||||
}
|
||||
|
||||
if (!$userdata['session_admin'])
|
||||
{
|
||||
redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true));
|
||||
|
@@ -32,6 +32,7 @@ p,ul,td {font-size:10pt;}
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a></li>
|
||||
<ol type="i">
|
||||
<li><a href="#2023">Changes since 2.0.23</a></li>
|
||||
<li><a href="#2022">Changes since 2.0.22</a></li>
|
||||
<li><a href="#2021">Changes since 2.0.21</a></li>
|
||||
<li><a href="#2020">Changes since 2.0.20</a></li>
|
||||
@@ -68,7 +69,13 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<p>This is a non-exhaustive (but still near complete) changelog for phpBB 2.0.x including beta and release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p>
|
||||
|
||||
<a name="2022"></a><h3 class="h3">l.i. Changes since 2.0.22</h3>
|
||||
<a name="2023"></a><h3 class="h3">l.i. Changes since 2.0.23</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Only insert words into search match table not being tagged as common (Bug #2591) - patch provided by tigertech</li>
|
||||
</ul>
|
||||
|
||||
<a name="2022"></a><h3 class="h3">l.ii. Changes since 2.0.22</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly re-assign group moderator on user deletion (Bug #280)</li>
|
||||
@@ -87,7 +94,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>[Fix] Fixing some problems with PHP5 and register_long_arrays off</li>
|
||||
</ul>
|
||||
|
||||
<a name="2021"></a><h3 class="h3">l.ii. Changes since 2.0.21</h3>
|
||||
<a name="2021"></a><h3 class="h3">l.iii. Changes since 2.0.21</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Check for user's existence prior to showing email form</li>
|
||||
@@ -103,7 +110,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>[Sec] Added session checks to various forms - kellanved</li>
|
||||
</ul>
|
||||
|
||||
<a name="2020"></a><h3 class="h3">l.iii. Changes since 2.0.20</h3>
|
||||
<a name="2020"></a><h3 class="h3">l.iv. Changes since 2.0.20</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Changes to random number generator code to explicitly truncate the length of the string</li>
|
||||
@@ -120,7 +127,7 @@ p,ul,td {font-size:10pt;}
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="2019"></a><h3 class="h3">l.iv. Changes since 2.0.19</h3>
|
||||
<a name="2019"></a><h3 class="h3">l.v. Changes since 2.0.19</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Prevent login attempts from incrementing for inactive users</li>
|
||||
@@ -153,7 +160,7 @@ p,ul,td {font-size:10pt;}
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="2018"></a><h3 class="h3">l.v. Changes since 2.0.18</h3>
|
||||
<a name="2018"></a><h3 class="h3">l.vi. Changes since 2.0.18</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] corrected index on session keys table under MS SQL</li>
|
||||
@@ -172,7 +179,7 @@ p,ul,td {font-size:10pt;}
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="2017"></a><h3 class="h3">l.vi. Changes since 2.0.17</h3>
|
||||
<a name="2017"></a><h3 class="h3">l.vii. Changes since 2.0.17</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] incorrect handling of password resets if admin activation is enabled (Bug #88)</li>
|
||||
@@ -220,7 +227,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>[Sec] compare imagetype on avatar uploading to match the file extension from uploaded file</li>
|
||||
</ul>
|
||||
|
||||
<a name="2016"></a><h3 class="h3">l.vii. Changes since 2.0.16</h3>
|
||||
<a name="2016"></a><h3 class="h3">l.viii. Changes since 2.0.16</h3>
|
||||
|
||||
<ul>
|
||||
<li>Added extra checks to the deletion code in privmsg.php - reported by party_fan</li>
|
||||
@@ -236,7 +243,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Correctly set username on posts when deleting a user from the admin panel</li>
|
||||
</ul>
|
||||
|
||||
<a name="2015"></a><h3 class="h3">l.viii. Changes since 2.0.15</h3>
|
||||
<a name="2015"></a><h3 class="h3">l.ix. Changes since 2.0.15</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed critical issue with highlighting - <b>Discovered and fix provided by Ron van Daal</b></li>
|
||||
@@ -248,7 +255,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed bug in admin re-authentication redirect for servers not having index.php as one of their default files set</li>
|
||||
</ul>
|
||||
|
||||
<a name="2014"></a><h3 class="h3">l.ix. Changes since 2.0.14</h3>
|
||||
<a name="2014"></a><h3 class="h3">l.x. Changes since 2.0.14</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed moderator status removal in groupcp.php</li>
|
||||
@@ -270,7 +277,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Empty url/img bbcodes no longer get parsed</li>
|
||||
</ul>
|
||||
|
||||
<a name="2013"></a><h3 class="h3">l.x. Changes since 2.0.13</h3>
|
||||
<a name="2013"></a><h3 class="h3">l.xi. Changes since 2.0.13</h3>
|
||||
|
||||
<ul>
|
||||
<li>Hardened author and keyword search a bit to not allow very server intensive searches</li>
|
||||
@@ -287,7 +294,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed case-sensitivity issues in postgres7.php - <b>R45</b></li>
|
||||
</ul>
|
||||
|
||||
<a name="2012"></a><h3 class="h3">l.xi. Changes since 2.0.12</h3>
|
||||
<a name="2012"></a><h3 class="h3">l.xii. Changes since 2.0.12</h3>
|
||||
|
||||
<ul>
|
||||
<li>Ommitted preg_replace warning in viewtopic due to improper working of preg_quote in PHP - originally reported by matrix_killer, fix submitted by another party</li>
|
||||
@@ -295,7 +302,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Minimum requirements raised to PHP 4.0.3 or above due to fixing vulnerability issues breaking PHP3 compatibility.</li>
|
||||
</ul>
|
||||
|
||||
<a name="2011"></a><h3 class="h3">l.xii. Changes since 2.0.11</h3>
|
||||
<a name="2011"></a><h3 class="h3">l.xiii. Changes since 2.0.11</h3>
|
||||
|
||||
<ul>
|
||||
<li>Added confirm table to admin_db_utilities.php</li>
|
||||
@@ -310,7 +317,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed path disclosure bug in viewtopic.php caused by a PHP 4.3.10 bug - <b>matrix_killer</b></li>
|
||||
</ul>
|
||||
|
||||
<a name="2010"></a><h3 class="h3">l.xiii. Changes since 2.0.10</h3>
|
||||
<a name="2010"></a><h3 class="h3">l.xiv. Changes since 2.0.10</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed vulnerability in highlighting code (<b>very high severity, please update your installation as soon as possible</b>)</li>
|
||||
@@ -321,7 +328,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Added visual confirmation mod to code base</li>
|
||||
</ul>
|
||||
|
||||
<a name="209"></a><h3 class="h3">l.xiv. Changes since 2.0.9</h3>
|
||||
<a name="209"></a><h3 class="h3">l.xv. Changes since 2.0.9</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed deleting of styles in admin_styles.php</li>
|
||||
@@ -334,7 +341,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed visual confirmation code. The image was not created due to a wrong regular expression.</li>
|
||||
</ul>
|
||||
|
||||
<a name="208"></a><h3 class="h3">l.xv. Changes since 2.0.8</h3>
|
||||
<a name="208"></a><h3 class="h3">l.xvi. Changes since 2.0.8</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed one vulnerability in admin_board.php - <b>Xore</b></li>
|
||||
@@ -353,7 +360,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed problem with SID not delivered to next page in groupcp.php</li>
|
||||
</ul>
|
||||
|
||||
<a name="207"></a><h3 class="h3">l.xvi. Changes since 2.0.7</h3>
|
||||
<a name="207"></a><h3 class="h3">l.xvii. Changes since 2.0.7</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed several vulnerabilities in admin pages</li>
|
||||
@@ -365,7 +372,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed sql injection vulnerability in privmsg - 2.0.8a</li>
|
||||
</ul>
|
||||
|
||||
<a name="206"></a><h3 class="h3">1.xvii. Changes since 2.0.6</h3>
|
||||
<a name="206"></a><h3 class="h3">1.xviii. Changes since 2.0.6</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed several vulnerabilities in modcp - <b>Robert Lavierck</b></li>
|
||||
@@ -379,7 +386,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed potential vulnerability in avatar gallery</li>
|
||||
</ul>
|
||||
|
||||
<a name="205"></a><h3 class="h3">1.xviii. Changes since 2.0.5</h3>
|
||||
<a name="205"></a><h3 class="h3">1.xix. Changes since 2.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed various email issues</li>
|
||||
@@ -395,7 +402,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed sql injection with reset date format field in profile - <b>tendor</b></li>
|
||||
</ul>
|
||||
|
||||
<a name="204"></a><h3 class="h3">1.xix. Changes since 2.0.4</h3>
|
||||
<a name="204"></a><h3 class="h3">1.xx. Changes since 2.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>Removed user facing session_id checks</li>
|
||||
@@ -467,7 +474,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Default English support for visual confirmation - translators are encouraged to support this</li>
|
||||
</ul>
|
||||
|
||||
<a name="203"></a><h3 class="h3">1.xx. Changes since 2.0.3</h3>
|
||||
<a name="203"></a><h3 class="h3">1.xxi. Changes since 2.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed cross-browser scripting issue with highlight param</li>
|
||||
@@ -594,7 +601,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed potential SQL vulnerability with marking of private messages - <b>Ulf Harnhammar</b></li>
|
||||
</ul>
|
||||
|
||||
<a name="202"></a><h3 class="h3">1.xxi. Changes since 2.0.2</h3>
|
||||
<a name="202"></a><h3 class="h3">1.xxii. Changes since 2.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed potential cross-site scripting vulnerability with avatars - <b>Showscout</b></li>
|
||||
@@ -603,7 +610,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed (hopefully) issue with MS Access and multiple pages</li>
|
||||
</ul>
|
||||
|
||||
<a name="201"></a><h3 class="h3">1.xxii. Changes since 2.0.1</h3>
|
||||
<a name="201"></a><h3 class="h3">1.xxiii. Changes since 2.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed missing "username" lang variable in user admin template</li>
|
||||
@@ -638,7 +645,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fix emailer to allow sending emails with language-specific character sets</li>
|
||||
</ul>
|
||||
|
||||
<a name="200"></a><h3 class="h3">1.xxiii. Changes since 2.0.0</h3>
|
||||
<a name="200"></a><h3 class="h3">1.xxiv. Changes since 2.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed delete image bug for normal users</li>
|
||||
@@ -695,7 +702,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Added database closure to admin frameset page</li>
|
||||
</ul>
|
||||
|
||||
<a name="final"></a><h3 class="h3">1.xxiv. Changes since RC-4</h3>
|
||||
<a name="final"></a><h3 class="h3">1.xxv. Changes since RC-4</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed improper report of general error when posting messages containing errors</li>
|
||||
@@ -725,7 +732,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fixed various remaining usergroup display issues</li>
|
||||
</ul>
|
||||
|
||||
<a name="rc4"></a><h3 class="h3">1.xxv. Changes since RC-3</h3>
|
||||
<a name="rc4"></a><h3 class="h3">1.xxvi. Changes since RC-3</h3>
|
||||
|
||||
<ul>
|
||||
<li>Addressed serious security issue with included files</li>
|
||||
@@ -756,7 +763,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Fix (hopefully) remaining ICQ overlay issue with view profile in subSilver</li>
|
||||
</ul>
|
||||
|
||||
<a name="rc3"></a><h3 class="h3">1.xxvi. Changes since RC-2</h3>
|
||||
<a name="rc3"></a><h3 class="h3">1.xxvii. Changes since RC-2</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed infamous install parse error</li>
|
||||
@@ -789,7 +796,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Hidden usergroups are now completely hidden from view</li>
|
||||
</ul>
|
||||
|
||||
<a name="rc2"></a><h3 class="h3">1.xxvii. Changes since RC-1</h3>
|
||||
<a name="rc2"></a><h3 class="h3">1.xxviii. Changes since RC-1</h3>
|
||||
|
||||
<ul>
|
||||
<li>Fixed numerous PostgreSQL related issues</li>
|
||||
@@ -809,7 +816,7 @@ p,ul,td {font-size:10pt;}
|
||||
<li>Various other fixes and updates</li>
|
||||
</ul>
|
||||
|
||||
<a name="rc1"></a><h3 class="h3">1.xxviii. Changes since RC-1 (pre)</h3>
|
||||
<a name="rc1"></a><h3 class="h3">1.xxix. Changes since RC-1 (pre)</h3>
|
||||
|
||||
<ul>
|
||||
<li>Upgrade script completed for initial fully functional release</li>
|
||||
|
@@ -92,7 +92,7 @@ function prepare_bbcode_template($bbcode_tpl)
|
||||
|
||||
$bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']);
|
||||
|
||||
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']);
|
||||
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', get_image_tag_replacement($bbcode_tpl));
|
||||
|
||||
// We do URLs in several different ways..
|
||||
$bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
|
||||
@@ -115,6 +115,31 @@ function prepare_bbcode_template($bbcode_tpl)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Disables the img tag for privileged pages. It also implements a compability hack for old templates.
|
||||
*/
|
||||
function get_image_tag_replacement($bbcode_tpl)
|
||||
{
|
||||
global $lang, $HTTP_POST_VARS, $HTTP_GET_VARS;
|
||||
$bb_tmpl = '';
|
||||
if (isset($HTTP_POST_VARS['p_sid']))
|
||||
{
|
||||
if (isset($bbcode_tpl['p_img']))
|
||||
{
|
||||
$bb_tmpl = str_replace('{L_PRIV_IMG}', $lang['Priv_Img'], $bbcode_tpl['p_img']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$bb_tmpl = $lang['Priv_Img'] . ': {URL}';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$bb_tmpl = $bbcode_tpl['img'];
|
||||
}
|
||||
return $bb_tmpl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Does second-pass bbencoding. This should be used before displaying the message in
|
||||
* a thread. Assumes the message is already first-pass encoded, and we are given the
|
||||
@@ -228,9 +253,6 @@ function bbencode_second_pass($text, $uid)
|
||||
|
||||
} // bbencode_second_pass()
|
||||
|
||||
// Need to initialize the random numbers only ONCE
|
||||
mt_srand( (double) microtime() * 1000000);
|
||||
|
||||
function make_bbcode_uid()
|
||||
{
|
||||
// Unique ID for this message..
|
||||
|
@@ -245,7 +245,8 @@ function add_search_words($mode, $post_id, $post_text, $post_title = '')
|
||||
$sql = "INSERT INTO " . SEARCH_MATCH_TABLE . " (post_id, word_id, title_match)
|
||||
SELECT $post_id, word_id, $title_match
|
||||
FROM " . SEARCH_WORD_TABLE . "
|
||||
WHERE word_text IN ($match_sql)";
|
||||
WHERE word_text IN ($match_sql)
|
||||
AND word_common <> 1";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
|
||||
|
@@ -30,7 +30,7 @@ global $do_gzip_compress;
|
||||
//
|
||||
// Show the overall footer.
|
||||
//
|
||||
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
|
||||
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '&p_sid=' . $userdata['priv_session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
|
||||
|
||||
$template->set_filenames(array(
|
||||
'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
|
||||
|
@@ -178,10 +178,11 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
|
||||
{
|
||||
$session_id = md5(dss_rand());
|
||||
$priv_session_id = md5(dss_rand());
|
||||
|
||||
$sql = "INSERT INTO " . SESSIONS_TABLE . "
|
||||
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin)
|
||||
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin)";
|
||||
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin, priv_session_id)
|
||||
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login, $admin, '$priv_session_id')";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
|
||||
@@ -242,6 +243,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
}
|
||||
|
||||
$userdata['session_id'] = $session_id;
|
||||
$userdata['priv_session_id'] = $priv_session_id;
|
||||
$userdata['session_ip'] = $user_ip;
|
||||
$userdata['session_user_id'] = $user_id;
|
||||
$userdata['session_logged_in'] = $login;
|
||||
@@ -266,7 +268,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
|
||||
function session_pagestart($user_ip, $thispage_id)
|
||||
{
|
||||
global $db, $lang, $board_config;
|
||||
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
|
||||
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID, $P_SID;
|
||||
|
||||
$cookiename = $board_config['cookie_name'];
|
||||
$cookiepath = $board_config['cookie_path'];
|
||||
@@ -333,7 +335,7 @@ function session_pagestart($user_ip, $thispage_id)
|
||||
if ($ip_check_s == $ip_check_u)
|
||||
{
|
||||
$SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : '';
|
||||
|
||||
$P_SID = (defined('IN_ADMIN')) ? 'p_sid=' . $userdata['priv_session_id'] : '';
|
||||
//
|
||||
// Only update session DB a minute or so after last update
|
||||
//
|
||||
@@ -565,12 +567,16 @@ function session_reset_keys($user_id, $user_ip)
|
||||
//
|
||||
function append_sid($url, $non_html_amp = false)
|
||||
{
|
||||
global $SID;
|
||||
global $SID, $P_SID;
|
||||
|
||||
if ( !empty($SID) && !preg_match('#sid=#', $url) )
|
||||
{
|
||||
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID;
|
||||
}
|
||||
if ( !empty($P_SID) && !preg_match('#p_sid=#', $url) )
|
||||
{
|
||||
$url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $P_SID;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
@@ -818,7 +818,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
|
||||
$occupation = $userdata['user_occ'];
|
||||
$interests = $userdata['user_interests'];
|
||||
$signature_bbcode_uid = $userdata['user_sig_bbcode_uid'];
|
||||
$signature = ($signature_bbcode_uid != '') ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid(=|\])/si", '\\3', $userdata['user_sig']) : $userdata['user_sig'];
|
||||
$signature = ($signature_bbcode_uid != '') ? preg_replace('/:(([a-z0-9]+:)?)' . preg_quote($signature_bbcode_uid, '/') . '(=|\])/si', '\\3', $userdata['user_sig']) : $userdata['user_sig'];
|
||||
|
||||
$viewemail = $userdata['user_viewemail'];
|
||||
$notifypm = $userdata['user_notify_pm'];
|
||||
|
@@ -193,6 +193,7 @@ CREATE TABLE [phpbb_sessions] (
|
||||
[session_page] [int] NULL ,
|
||||
[session_logged_in] [smallint] NULL,
|
||||
[session_admin] [smallint] NULL
|
||||
[priv_session_id] [char] (32) NOT NULL ,
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@@ -307,6 +307,7 @@ CREATE TABLE phpbb_sessions (
|
||||
session_page int(11) DEFAULT '0' NOT NULL,
|
||||
session_logged_in tinyint(1) DEFAULT '0' NOT NULL,
|
||||
session_admin tinyint(2) DEFAULT '0' NOT NULL,
|
||||
priv_session_id char(32) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (session_id),
|
||||
KEY session_user_id (session_user_id),
|
||||
KEY session_id_ip_user_id (session_id, session_ip, session_user_id)
|
||||
|
@@ -291,6 +291,7 @@ CREATE TABLE phpbb_sessions (
|
||||
session_page int4 DEFAULT '0' NOT NULL,
|
||||
session_logged_in int2 DEFAULT '0' NOT NULL,
|
||||
session_admin int2 DEFAULT '0' NOT NULL,
|
||||
priv_session_id char(32) DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_session_pkey PRIMARY KEY (session_id)
|
||||
);
|
||||
CREATE INDEX session_user_id_phpbb_sessions_index ON phpbb_sessions (session_user_id);
|
||||
|
@@ -59,7 +59,7 @@ include($phpbb_root_path . 'includes/db.'.$phpEx);
|
||||
//
|
||||
//
|
||||
//
|
||||
$updates_to_version = '.0.23';
|
||||
$updates_to_version = '.0.24';
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -671,6 +671,37 @@ switch ($row['config_value'])
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case '.0.22':
|
||||
case '.0.23':
|
||||
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = "ALTER TABLE " . SESSIONS_TABLE . "
|
||||
ADD COLUMN priv_session_id char(32) DEFAULT '' NOT NULL";
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql[] = "ALTER TABLE " . SESSIONS_TABLE . "
|
||||
ADD COLUMN priv_session_id char(32)";
|
||||
$sql[] = "ALTER TABLE " . SESSIONS_TABLE . "
|
||||
ALTER COLUMN priv_session_id SET DEFAULT ''";
|
||||
break;
|
||||
|
||||
case 'mssql-odbc':
|
||||
case 'mssql':
|
||||
$sql[] = "ALTER TABLE " . SESSIONS_TABLE . " ADD
|
||||
priv_session_id char (32) NOT NULL";
|
||||
break;
|
||||
|
||||
case 'msaccess':
|
||||
$sql[] = "ALTER TABLE " . SESSIONS_TABLE . " ADD
|
||||
priv_session_id char (32) NOT NULL";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "<h2>Updating database schema</h2>\n";
|
||||
@@ -1121,6 +1152,13 @@ switch ($row['config_value'])
|
||||
|
||||
break;
|
||||
|
||||
case '.0.21':
|
||||
case '.0.22':
|
||||
case '.0.23':
|
||||
$sql = 'DELETE FROM ' . SESSIONS_TABLE;
|
||||
_sql($sql, $errored, $error_ary);
|
||||
break;
|
||||
|
||||
default:
|
||||
echo " No updates were required</b></p>\n";
|
||||
break;
|
||||
|
@@ -283,6 +283,7 @@ $lang['Delete_post'] = 'Delete this post';
|
||||
$lang['wrote'] = 'wrote'; // proceeds the username and is followed by the quoted text
|
||||
$lang['Quote'] = 'Quote'; // comes before bbcode quote output.
|
||||
$lang['Code'] = 'Code'; // comes before bbcode code output.
|
||||
$lang['Priv_Img'] = 'Image display disabled'; // Explanation for missing images in the ModCP.
|
||||
|
||||
$lang['Edited_time_total'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total
|
||||
$lang['Edited_times_total'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total
|
||||
|
@@ -116,6 +116,15 @@ else
|
||||
{
|
||||
$sid = '';
|
||||
}
|
||||
// privileged session id check
|
||||
if (!empty($HTTP_POST_VARS['p_sid']) || !empty($HTTP_GET_VARS['p_sid']))
|
||||
{
|
||||
$p_sid = (!empty($HTTP_POST_VARS['p_sid'])) ? $HTTP_POST_VARS['p_sid'] : $HTTP_GET_VARS['p_sid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$p_sid = '';
|
||||
}
|
||||
|
||||
//
|
||||
// Obtain relevant data
|
||||
@@ -175,7 +184,7 @@ init_userprefs($userdata);
|
||||
//
|
||||
|
||||
// session id check
|
||||
if ($sid == '' || $sid != $userdata['session_id'])
|
||||
if ($p_sid === '' || $p_sid !== $userdata['priv_session_id'])
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Invalid_session');
|
||||
}
|
||||
@@ -398,12 +407,12 @@ switch( $mode )
|
||||
|
||||
if ( !empty($topic_id) )
|
||||
{
|
||||
$redirect_page = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id");
|
||||
$l_redirect = sprintf($lang['Click_return_forum'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id']);
|
||||
$l_redirect = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
|
||||
@@ -421,7 +430,7 @@ switch( $mode )
|
||||
message_die(GENERAL_MESSAGE, $lang['None_selected']);
|
||||
}
|
||||
|
||||
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="p_sid" value="' . $userdata['priv_session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
|
||||
if ( isset($HTTP_POST_VARS['topic_id_list']) )
|
||||
{
|
||||
@@ -557,16 +566,16 @@ switch( $mode )
|
||||
|
||||
if ( !empty($topic_id) )
|
||||
{
|
||||
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
|
||||
$message .= sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id']);
|
||||
$message .= sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$old_forum_id&p_sid=" . $userdata['priv_session_id']) . '">', '</a>');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
|
||||
@@ -581,7 +590,7 @@ switch( $mode )
|
||||
message_die(GENERAL_MESSAGE, $lang['None_selected']);
|
||||
}
|
||||
|
||||
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
$hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="p_sid" value="' . $userdata['priv_session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />';
|
||||
|
||||
if ( isset($HTTP_POST_VARS['topic_id_list']) )
|
||||
{
|
||||
@@ -650,16 +659,16 @@ switch( $mode )
|
||||
|
||||
if ( !empty($topic_id) )
|
||||
{
|
||||
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
|
||||
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id']);
|
||||
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
|
||||
@@ -695,16 +704,16 @@ switch( $mode )
|
||||
|
||||
if ( !empty($topic_id) )
|
||||
{
|
||||
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id");
|
||||
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
|
||||
$redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id']);
|
||||
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
|
||||
@@ -1019,7 +1028,7 @@ switch( $mode )
|
||||
|
||||
'IP' => $ip_this_post,
|
||||
|
||||
'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=$ip_this_post&sid=" . $userdata['session_id'])
|
||||
'U_LOOKUP_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=$ip_this_post&p_sid=" . $userdata['priv_session_id']))
|
||||
);
|
||||
|
||||
//
|
||||
@@ -1060,7 +1069,7 @@ switch( $mode )
|
||||
'IP' => $ip,
|
||||
'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ),
|
||||
|
||||
'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $row['poster_ip'] . "&sid=" . $userdata['session_id'])
|
||||
'U_LOOKUP_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $row['poster_ip'] . "&p_sid=" . $userdata['priv_session_id']))
|
||||
);
|
||||
|
||||
$i++;
|
||||
@@ -1100,7 +1109,7 @@ switch( $mode )
|
||||
'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ),
|
||||
'L_SEARCH_POSTS' => sprintf($lang['Search_user_posts'], $username),
|
||||
|
||||
'U_PROFILE' => ($id == ANONYMOUS) ? "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $post_id . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'] : append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"),
|
||||
'U_PROFILE' => ($id == ANONYMOUS) ? append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $post_id . "&" . POST_TOPIC_URL . "=" . $topic_id . "&p_sid=" . $userdata['priv_session_id']) : append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"),
|
||||
'U_SEARCHPOSTS' => append_sid("search.$phpEx?search_author=" . (($id == ANONYMOUS) ? 'Anonymous' : urlencode($username)) . "&showresults=topics"))
|
||||
);
|
||||
|
||||
@@ -1133,7 +1142,7 @@ switch( $mode )
|
||||
'L_SELECT' => $lang['Select'],
|
||||
|
||||
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />',
|
||||
'S_HIDDEN_FIELDS' => '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="p_sid" value="' . $userdata['priv_session_id'] . '" /><input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '" />',
|
||||
'S_MODCP_ACTION' => append_sid("modcp.$phpEx"))
|
||||
);
|
||||
|
||||
@@ -1221,7 +1230,7 @@ switch( $mode )
|
||||
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title);
|
||||
}
|
||||
|
||||
$u_view_topic = "modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
|
||||
$u_view_topic = append_sid("modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id&p_sid=" . $userdata['priv_session_id']);
|
||||
$topic_replies = $row['topic_replies'];
|
||||
|
||||
$last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
|
||||
@@ -1241,7 +1250,7 @@ switch( $mode )
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id'], $forum_topics, $board_config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )),
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'])
|
||||
);
|
||||
|
@@ -692,8 +692,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
|
||||
$result_array = serialize($store_search_data);
|
||||
unset($store_search_data);
|
||||
|
||||
mt_srand ((double) microtime() * 1000000);
|
||||
$search_id = mt_rand();
|
||||
$search_id = abs(crc32(dss_rand()));
|
||||
|
||||
$sql = "UPDATE " . SEARCH_TABLE . "
|
||||
SET search_id = $search_id, search_time = $current_time, search_array = '" . str_replace("\'", "''", $result_array) . "'
|
||||
|
@@ -54,6 +54,7 @@
|
||||
<!-- BEGIN size_close --></span><!-- END size_close -->
|
||||
|
||||
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
|
||||
<!-- BEGIN p_img -->{L_PRIV_IMG}:{URL}<!-- END p_img -->
|
||||
|
||||
<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||
|
||||
|
@@ -372,7 +372,7 @@ $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Ru
|
||||
|
||||
if ( $is_auth['auth_mod'] )
|
||||
{
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&p_sid=" . $userdata['priv_session_id']) . '">', '</a>');
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -590,15 +590,15 @@ $topic_mod = '';
|
||||
|
||||
if ( $is_auth['auth_mod'] )
|
||||
{
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&p_sid=" . $userdata['priv_session_id']) . '">', '</a>');
|
||||
|
||||
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a> ';
|
||||
$topic_mod .= '<a href="' . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&p_sid=" . $userdata['priv_session_id']) . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a> ';
|
||||
|
||||
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a> ';
|
||||
$topic_mod .= '<a href="' . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move&p_sid=" . $userdata['priv_session_id']) . '"><img src="' . $images['topic_mod_move'] . '" alt="' . $lang['Move_topic'] . '" title="' . $lang['Move_topic'] . '" border="0" /></a> ';
|
||||
|
||||
$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a> ';
|
||||
$topic_mod .= ( $forum_topic_data['topic_status'] == TOPIC_UNLOCKED ) ? '<a href="' . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock&p_sid=" . $userdata['priv_session_id']) . '"><img src="' . $images['topic_mod_lock'] . '" alt="' . $lang['Lock_topic'] . '" title="' . $lang['Lock_topic'] . '" border="0" /></a> ' : '<a href="' . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock&p_sid=" . $userdata['priv_session_id']) . '"><img src="' . $images['topic_mod_unlock'] . '" alt="' . $lang['Unlock_topic'] . '" title="' . $lang['Unlock_topic'] . '" border="0" /></a> ';
|
||||
|
||||
$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a> ';
|
||||
$topic_mod .= '<a href="' . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split&p_sid=" . $userdata['priv_session_id']) . '"><img src="' . $images['topic_mod_split'] . '" alt="' . $lang['Split_topic'] . '" title="' . $lang['Split_topic'] . '" border="0" /></a> ';
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1008,13 +1008,13 @@ for($i = 0; $i < $total_posts; $i++)
|
||||
|
||||
if ( $is_auth['auth_mod'] )
|
||||
{
|
||||
$temp_url = "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'];
|
||||
$temp_url = "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id . "&p_sid=" . $userdata['priv_session_id'];
|
||||
$ip_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_ip'] . '" alt="' . $lang['View_IP'] . '" title="' . $lang['View_IP'] . '" border="0" /></a>';
|
||||
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
|
||||
|
||||
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
|
||||
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&p_sid=" . $userdata['priv_session_id'];
|
||||
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
|
||||
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
|
||||
$delpost = '<a href="' . append_sid($temp_url) . '">' . $lang['Delete_post'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1023,9 +1023,9 @@ for($i = 0; $i < $total_posts; $i++)
|
||||
|
||||
if ( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id'] )
|
||||
{
|
||||
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&sid=" . $userdata['session_id'];
|
||||
$temp_url = "posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&p_sid=" . $userdata['priv_session_id'];
|
||||
$delpost_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" border="0" /></a>';
|
||||
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
|
||||
$delpost = '<a href="' . append_sid($temp_url) . '">' . $lang['Delete_post'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user