Changeset 157

User picture

Author: Mighty Gorgon

(2009/12/26 10:41) About 2 years ago

MODCP class created by KasLimon (plus some fixes by Mighty Gorgon)
Some BBCodes core functions moved into BBCode class and some minor functions moved to an external file

Bugs fixed:
* Recoded card.php to fix some bugs when banning / unbanning a user
* Fixed some bugs while moderating topics (thanks to KasLimon which pointed out some of them)
* Fixed a bug for attachments not showing up in PM
* Fixed some small bugs in templates files

Thanks also tu TuningBEB2009 for some bugs reporting

Affected files

Updated ip/trunk/adm/admin_bbcodes.php Download diff

156157
21
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
21
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
22
require('pagestart.' . PHP_EXT);
22
require('pagestart.' . PHP_EXT);
23
23
24
include(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
24
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
25
25
26
define('THIS_PAGE', 'admin_bbcodes.' . PHP_EXT);
26
define('THIS_PAGE', 'admin_bbcodes.' . PHP_EXT);
27
27

Updated ip/trunk/bin.php Download diff

156157
22
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
22
include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
23
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
23
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
24
24
25
include(IP_ROOT_PATH . 'includes/class_mcp.' . PHP_EXT);
26
$mcp_topic = new class_mcp_topic();
27
25
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
28
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
26
$class_topics = new class_topics();
29
$class_topics = new class_topics();
27
30
...
...
110
{
113
{
111
	if (($config['bin_forum'] == 0) || (empty($_POST['topic_id_list']) && empty($topic_id)))
114
	if (($config['bin_forum'] == 0) || (empty($_POST['topic_id_list']) && empty($topic_id)))
112
	{
115
	{
113
		$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $forum_id . '&' . POST_TOPIC_URL . '=' . $topic_id . '&sid=' . $userdata['session_id'];
116
		$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&sid=' . $userdata['session_id'];
114
		$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_url . '">', '</a>');
117
		$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_url . '">', '</a>');
115
		$message = $message . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '='
. $forum_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>');
118
		$message = $message . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '='
. $forum_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>');
116
119
...
...
120
	}
123
	}
121
	else
124
	else
122
	{
125
	{
123
		// Define bin forum
126
		$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
124
		$new_forum_id = intval($config['bin_forum']);
125
		$old_forum_id = $forum_id;
126
127
127
		if ($new_forum_id != $old_forum_id)
128
		if($mcp_topic->topic_recycle($topics, $forum_id))
128
		{
129
		{
129
			$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
130
131
			$topic_list = '';
132
			for($i = 0; $i < sizeof($topics); $i++)
133
			{
134
				$topic_list .= (($topic_list != '') ? ', ' : '') . intval($topics[$i]);
135
			}
136
137
			$sql = "SELECT *
138
				FROM " . TOPICS_TABLE . "
139
				WHERE topic_id IN ($topic_list)
140
					AND forum_id = $old_forum_id
141
					AND topic_status <> " . TOPIC_MOVED;
142
			$result = $db->sql_query($sql);
143
			$row = $db->sql_fetchrowset($result);
144
			$db->sql_freeresult($result);
145
146
			$db->sql_transaction('begin');
147
148
			for($i = 0; $i < sizeof($row); $i++)
149
			{
150
				$topic_id = $row[$i]['topic_id'];
151
152
				if (isset($_POST['move_leave_shadow']))
153
				{
154
					// Insert topic in the old forum that indicates that the forum has moved.
155
					$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
156
						VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
157
					$result = $db->sql_query($sql);
158
				}
159
160
				$sql = "UPDATE " . TOPICS_TABLE . "
161
					SET forum_id = " . $new_forum_id . "
162
					WHERE topic_id = " . $topic_id;
163
				$result = $db->sql_query($sql);
164
165
				$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = " . $topic_id;
166
				$result = $db->sql_query($sql);
167
168
//<!-- BEGIN Unread Post Information to Database Mod -->
169
				$sql = "UPDATE " . UPI2DB_LAST_POSTS_TABLE . "
170
					SET forum_id = " . $new_forum_id . "
171
					WHERE topic_id = " . $topic_id;
172
				$result = $db->sql_query($sql);
173
174
				$sql = "UPDATE " . UPI2DB_UNREAD_POSTS_TABLE . "
175
					SET forum_id = " . $new_forum_id . "
176
					WHERE topic_id = " . $topic_id;
177
				$result = $db->sql_query($sql);
178
//<!-- BEGIN Unread Post Information to Database Mod -->
179
180
				$sql = "UPDATE " . POSTS_TABLE . "
181
					SET forum_id = " . $new_forum_id . "
182
					WHERE topic_id = " . $topic_id;
183
				$result = $db->sql_query($sql);
184
			}
185
186
			$db->sql_transaction('commit');
187
188
			// Sync the forum indexes
189
			empty_cache_folders(POSTS_CACHE_FOLDER);
190
			empty_cache_folders(FORUMS_CACHE_FOLDER);
191
			sync('forum', $new_forum_id);
192
			sync('forum', $old_forum_id);
193
194
			$message = $lang['Topics_Moved_bin'];
130
			$message = $lang['Topics_Moved_bin'];
195
		}
131
		}
196
		else
132
		else
...
...
201
		$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' .
$userdata['session_id'];
137
		$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' .
$userdata['session_id'];
202
		$message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . $redirect_url . '">', '</a>');
138
		$message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . $redirect_url . '">', '</a>');
203
139
204
		$message = $message . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $old_forum_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>');
140
		$message = $message . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '='
. $forum_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>');
205
141
206
		meta_refresh(3, $redirect_url);
142
		meta_refresh(3, $redirect_url);
207
143

Updated ip/trunk/card.php Download diff

156157
84
$is_auth = array();
84
$is_auth = array();
85
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
85
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
86
86
87
$no_error = true;
88
$already_banned = false;
89
87
if ($mode == 'report_reset')
90
if ($mode == 'report_reset')
88
{
91
{
89
	if (! $is_auth['auth_mod'])
92
	if (! $is_auth['auth_mod'])
93
	{
90
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
94
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
95
	}
91
96
92
	$sql = 'SELECT p.post_subject, f.forum_name FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f WHERE p.post_id="' . $post_id . '" AND p.forum_id = f.forum_id';
97
	$sql = "SELECT p.post_subject, f.forum_name FROM " . POSTS_TABLE . " p, " . FORUMS_TABLE . " f WHERE p.post_id = '" . $post_id . "' AND p.forum_id = f.forum_id";
93
	$result = $db->sql_query($sql);
98
	$result = $db->sql_query($sql);
94
	$subject = $db->sql_fetchrow($result);
99
	$subject = $db->sql_fetchrow($result);
95
	$post_subject = $subject['post_subject'];
100
	$post_subject = $subject['post_subject'];
...
...
99
	$result = $db->sql_query($sql);
104
	$result = $db->sql_query($sql);
100
	message_die(GENERAL_MESSAGE, $lang['Post_reset'].'<br /><br />'.
105
	message_die(GENERAL_MESSAGE, $lang['Post_reset'].'<br /><br />'.
101
	sprintf($lang['Click_return_viewtopic'], '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . $topic_id_append . POST_POST_URL . '='
. $post_id . '#p' . $post_id). '">', '</a>'));
106
	sprintf($lang['Click_return_viewtopic'], '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . $topic_id_append . POST_POST_URL . '='
. $post_id . '#p' . $post_id). '">', '</a>'));
102
103
}
107
}
104
elseif ($mode == 'report')
108
elseif ($mode == 'report')
105
{
109
{
...
...
110
114
111
	$sql = 'SELECT f.forum_name, p.topic_id FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f WHERE p.post_id = "' . $post_id . '" AND  p.forum_id =
f.forum_id';
115
	$sql = 'SELECT f.forum_name, p.topic_id FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f WHERE p.post_id = "' . $post_id . '" AND  p.forum_id =
f.forum_id';
112
	$result = $db->sql_query($sql);
116
	$result = $db->sql_query($sql);
113
114
	$post_details = $db->sql_fetchrow($result);
117
	$post_details = $db->sql_fetchrow($result);
115
	$forum_name = $post_details['forum_name'];
118
	$forum_name = $post_details['forum_name'];
116
	$topic_id = $post_details['topic_id'];
119
	$topic_id = $post_details['topic_id'];
120
117
	$sql = 'SELECT p.post_subject FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t WHERE t.topic_id = "' . $topic_id . '" AND p.post_id =
t.topic_first_post_id';
121
	$sql = 'SELECT p.post_subject FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t WHERE t.topic_id = "' . $topic_id . '" AND p.post_id =
t.topic_first_post_id';
118
	$result = $db->sql_query($sql);
122
	$result = $db->sql_query($sql);
119
	$post_details = $db->sql_fetchrow($result);
123
	$post_details = $db->sql_fetchrow($result);
...
...
122
	$sql = 'SELECT p.topic_id FROM ' . POSTS_TABLE . ' p WHERE p.post_subject = "(' . $post_id . ')' . $post_subject . '"';
126
	$sql = 'SELECT p.topic_id FROM ' . POSTS_TABLE . ' p WHERE p.post_subject = "(' . $post_id . ')' . $post_subject . '"';
123
	$result = $db->sql_query($sql);
127
	$result = $db->sql_query($sql);
124
	$post_details = $db->sql_fetchrow($result);
128
	$post_details = $db->sql_fetchrow($result);
125
	$allready_reported= ($blue_card) ? $post_details['topic_id'] : '';
129
	$allready_reported = ($blue_card) ? $post_details['topic_id'] : '';
126
130
127
	$blue_card++;
131
	$blue_card++;
128
	$sql = 'UPDATE ' . POSTS_TABLE . ' SET post_bluecard = "' . $blue_card . '" WHERE post_id = "' . $post_id . '"';
132
	$sql = 'UPDATE ' . POSTS_TABLE . ' SET post_bluecard = "' . $blue_card . '" WHERE post_id = "' . $post_id . '"';
...
...
213
}
217
}
214
elseif ($mode == 'unban')
218
elseif ($mode == 'unban')
215
{
219
{
216
	$no_error_ban = false;
217
	if (! $is_auth['auth_greencard'])
220
	if (! $is_auth['auth_greencard'])
218
	{
221
	{
219
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
222
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
...
...
234
	$message = $lang['Ban_update_green'] . '<br /><br />' . sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.' . PHP_EXT .
'?mode=post&u=' . $poster_id) . '">', '</a>');
237
	$message = $lang['Ban_update_green'] . '<br /><br />' . sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.' . PHP_EXT .
'?mode=post&u=' . $poster_id) . '">', '</a>');
235
	$e_temp = 'ban_reactivated';
238
	$e_temp = 'ban_reactivated';
236
	//$e_subj = $lang['Ban_reactivate'];
239
	//$e_subj = $lang['Ban_reactivate'];
237
	$no_error_ban = true;
238
}
240
}
239
elseif ($mode == 'ban')
241
elseif ($mode == 'ban')
240
{
242
{
241
	$no_error_ban = false;
242
	if (!$is_auth['auth_ban'])
243
	if (!$is_auth['auth_ban'])
243
	{
244
	{
244
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
245
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
...
...
265
		$result = $db->sql_query($sql);
266
		$result = $db->sql_query($sql);
266
		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in="0" WHERE session_user_id="' . $poster_id . '"';
267
		$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in="0" WHERE session_user_id="' . $poster_id . '"';
267
		$result = $db->sql_query($sql);
268
		$result = $db->sql_query($sql);
268
		$no_error_ban = true;
269
		$message = $lang['Ban_update_red'];
269
		$message = $lang['Ban_update_red'];
270
		$e_temp = 'ban_block';
270
		$e_temp = 'ban_block';
271
		//$e_subj = $lang['Card_banned'];
271
		//$e_subj = $lang['Card_banned'];
272
	}
272
	}
273
	else
273
	else
274
	{
274
	{
275
		$no_error_ban = true;
276
		$message = $lang['user_already_banned'];
275
		$message = $lang['user_already_banned'];
277
	}
276
	}
278
}
277
}
...
...
282
	{
281
	{
283
		message_die(GENERAL_ERROR, "Protect user account mod not installed, this is required for this operation");
282
		message_die(GENERAL_ERROR, "Protect user account mod not installed, this is required for this operation");
284
	}
283
	}
285
	$no_error_ban = false;
286
	if (! $is_auth['auth_ban'])
284
	if (! $is_auth['auth_ban'])
287
	{
285
	{
288
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
286
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
289
	}
287
	}
290
	// look up the user
288
	// look up the user
291
	$sql = 'SELECT user_active, user_level FROM ' . USERS_TABLE . ' WHERE user_id="' . $poster_id . '"';
289
	$sql = "SELECT user_active, user_level FROM " . USERS_TABLE . " WHERE user_id = '" . $poster_id . "'";
292
	$result = $db->sql_query($sql);
290
	$result = $db->sql_query($sql);
293
	$the_user = $db->sql_fetchrow($result);
291
	$the_user = $db->sql_fetchrow($result);
294
	if (($the_user['user_level'] == ADMIN) || ($the_user['user_level'] == JUNIOR_ADMIN))
292
	if (($the_user['user_level'] == ADMIN) || ($the_user['user_level'] == JUNIOR_ADMIN))
...
...
296
		message_die(GENERAL_ERROR, $lang['Block_no_admin']);
294
		message_die(GENERAL_ERROR, $lang['Block_no_admin']);
297
	}
295
	}
298
	// update the user table with new status
296
	// update the user table with new status
299
	$sql = 'UPDATE ' . USERS_TABLE . ' SET user_block_by="' . $user_ip . '", user_blocktime="' . (time() + $config['RY_block_time'] * 60).'" WHERE user_id="' . $poster_id . '"';
297
	$sql = "UPDATE " . USERS_TABLE . " SET user_block_by = '" . $user_ip . "', user_blocktime = '" . (time() + $config['RY_block_time'] * 60) . "' WHERE user_id = '" . $poster_id . "'";
300
	$result = $db->sql_query($sql);
298
	$result = $db->sql_query($sql);
301
299
302
	$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in="0", session_user_id=".ANONYMOUS." WHERE session_user_id="' . $poster_id . '"';
300
	$sql = "UPDATE " . SESSIONS_TABLE . " SET session_logged_in = '0', session_user_id = '" . ANONYMOUS . "' WHERE session_user_id = '" . $poster_id . "'";
303
	$result = $db->sql_query($sql);
301
	$result = $db->sql_query($sql);
304
302
305
	$no_error_ban = true;
306
	$block_time = make_time_text ($config['RY_block_time']);
303
	$block_time = make_time_text ($config['RY_block_time']);
307
	$message = sprintf($lang['Block_update'],$block_time) . '<br /><br />' . sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.'
. PHP_EXT . '?mode=post&amp;' . POST_USERS_URL . '=' . $poster_id) . '">', '</a>');
304
	$message = sprintf($lang['Block_update'],$block_time) . '<br /><br />' . sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.'
. PHP_EXT . '?mode=post&amp;' . POST_USERS_URL . '=' . $poster_id) . '">', '</a>');
308
	$e_temp = 'card_block';
305
	$e_temp = 'card_block';
...
...
310
}
307
}
311
elseif ($mode == 'warn')
308
elseif ($mode == 'warn')
312
{
309
{
313
	$no_error_ban = false;
314
	if (!$is_auth['auth_ban'])
310
	if (!$is_auth['auth_ban'])
315
	{
311
	{
316
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
312
		message_die(GENERAL_ERROR, $lang['Not_Authorized']);
...
...
341
			// update the user table with new status
337
			// update the user table with new status
342
			$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in = "0" WHERE session_user_id = "' . $poster_id . '"';
338
			$sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_logged_in = "0" WHERE session_user_id = "' . $poster_id . '"';
343
			$result = $db->sql_query($sql);
339
			$result = $db->sql_query($sql);
344
			$no_error_ban = true;
345
			$message = $lang['Ban_update_red'];
340
			$message = $lang['Ban_update_red'];
346
			$e_temp = 'ban_block';
341
			$e_temp = 'ban_block';
347
			// $e_subj = $lang['Ban_blocked'];
342
			// $e_subj = $lang['Ban_blocked'];
348
		}
343
		}
349
		else
344
		else
350
		{
345
		{
351
			$no_error_ban = true;
346
			$already_banned = true;
352
			$message = $lang['user_already_banned'];
353
		}
347
		}
354
	}
348
	}
355
	else
349
	else
356
	{
350
	{
357
		// the user shall not be baned this time, update the counter
351
		// the user shall not be baned this time, update the counter
358
		$message = sprintf($lang['Ban_update_yellow'], ($the_user['user_warnings'] + 1), $config['max_user_bancard']) . '<br /><br />' .
sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.' . PHP_EXT . '?mode=post&u=' . $poster_id) . '">', '</a>');
352
		$message = sprintf($lang['Ban_update_yellow'], ($the_user['user_warnings'] + 1), $config['max_user_bancard']) . '<br /><br />' .
sprintf($lang['Send_PM_user'], '<a href="' . append_sid('privmsg.' . PHP_EXT . '?mode=post&u=' . $poster_id) . '">', '</a>');
359
		$no_error_ban = true;
360
		$e_temp = 'ban_warning';
353
		$e_temp = 'ban_warning';
361
		// $e_subj = $lang['Ban_warning'];
354
		// $e_subj = $lang['Ban_warning'];
362
	}
355
	}
363
}
356
}
357
else
358
{
359
	$no_error = false;
360
}
364
361
365
if ($no_error_ban)
362
if ($no_error)
366
{
363
{
367
	$sql = 'SELECT username, user_warnings, user_email, user_lang FROM ' . USERS_TABLE . ' WHERE user_id="' . $poster_id . '"';
364
	$sql = 'SELECT username, user_warnings, user_email, user_lang FROM ' . USERS_TABLE . ' WHERE user_id = "' . $poster_id . '"';
368
	$result = $db->sql_query($sql);
365
	$result = $db->sql_query($sql);
369
	$warning_data = $db->sql_fetchrow($result);
366
	$warning_data = $db->sql_fetchrow($result);
370
	if (!empty($warning_data['user_email']))
367
	if (!empty($warning_data['user_email']))
...
...
406
		$message .= '<br /><br />' . $lang['user_no_email'];
403
		$message .= '<br /><br />' . $lang['user_no_email'];
407
	}
404
	}
408
}
405
}
406
elseif ($already_banned)
407
{
408
	$message = $lang['user_already_banned'];
409
}
409
else
410
else
410
{
411
{
411
	$message = 'Error in card.php file';
412
	$message = 'Error in card.php file';
...
...
415
$db->clear_cache('ban_', USERS_CACHE_FOLDER);
416
$db->clear_cache('ban_', USERS_CACHE_FOLDER);
416
417
417
$message .= ($post_id != '-1') ? '<br /><br />' . sprintf($lang['Click_return_viewtopic'], '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?'
. $forum_id_append . $topic_id_append . POST_POST_URL . '=' . $post_id . '#p' . $post_id) . '">', '</a>') : '<br /><br />' .
sprintf($lang['Click_return_index'], '<a href="' . append_sid(CMS_PAGE_FORUM). '">', '</a>');
418
$message .= ($post_id != '-1') ? '<br /><br />' . sprintf($lang['Click_return_viewtopic'], '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?'
. $forum_id_append . $topic_id_append . POST_POST_URL . '=' . $post_id . '#p' . $post_id) . '">', '</a>') : '<br /><br />' .
sprintf($lang['Click_return_index'], '<a href="' . append_sid(CMS_PAGE_FORUM). '">', '</a>');
419
418
message_die(GENERAL_MESSAGE, $message);
420
message_die(GENERAL_MESSAGE, $message);
419
421
420
?>
422
?>

Updated ip/trunk/includes/attach_mod/displaying.php Download diff

156157
295
295
296
	$image = 'templates/subSilver/images/icon_mini_message.gif';
296
	$image = 'templates/subSilver/images/icon_mini_message.gif';
297
297
298
	if ( (intval($attach_config['disable_mod'])) || (!( ($is_auth['auth_download']) && ($is_auth['auth_view']))) )
298
	if ((intval($attach_config['disable_mod'])) || (!(($is_auth['auth_download']) && ($is_auth['auth_view']))))
299
	{
299
	{
300
		return ('');
300
		return ('');
301
	}
301
	}
...
...
319
	{
319
	{
320
		$switch_attachment = $forum_row['topic_attachment'];
320
		$switch_attachment = $forum_row['topic_attachment'];
321
	}
321
	}
322
	if ( !empty($article) && ($switch_attachment == '') )
322
	if (!empty($article) && ($switch_attachment == ''))
323
	{
323
	{
324
		$switch_attachment = $article['topic_attachment'];
324
		$switch_attachment = $article['topic_attachment'];
325
	}
325
	}
326
326
327
	if ( sizeof($article) == 0 )
327
	if (sizeof($article) == 0)
328
	{
328
	{
329
		if ( (intval($switch_attachment) == 0) || intval($attach_config['disable_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])) )
329
		if ((intval($switch_attachment) == 0) || intval($attach_config['disable_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])))
330
		{
330
		{
331
			return;
331
			return;
332
		}
332
		}
...
...
334
334
335
	$post_id_array = array();
335
	$post_id_array = array();
336
336
337
	if ( sizeof($article) == 0 )
337
	if (sizeof($article) == 0)
338
	{
338
	{
339
		for ($i = 0; $i < $total_posts; $i++)
339
		for ($i = 0; $i < $total_posts; $i++)
340
		{
340
		{
...
...
810
		}
810
		}
811
811
812
		$filesize = $attachments['_' . $post_id][$i]['filesize'];
812
		$filesize = $attachments['_' . $post_id][$i]['filesize'];
813
		$size_lang = ($filesize >= 1048576) ? $lang['MB'] : ( ($filesize >= 1024) ? $lang['KB'] : $lang['Bytes'] );
813
		$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);
814
814
815
		if ($filesize >= 1048576)
815
		if ($filesize >= 1048576)
816
		{
816
		{
...
...
931
				}
931
				}
932
				$max_image_width = intval($config['liw_max_width']);
932
				$max_image_width = intval($config['liw_max_width']);
933
933
934
				$server_protocol = ( $config['cookie_secure'] ) ? 'https://' : 'http://';
934
				$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';
935
				$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($config['server_name']));
935
				$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($config['server_name']));
936
				$server_port = ( $config['server_port'] <> 80 ) ? ':' . trim($config['server_port']) : '';
936
				$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';
937
				$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($config['script_path']));
937
				$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($config['script_path']));
938
				$script_name = ( $script_name == '' ) ? $script_name : '/' . $script_name;
938
				$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
939
939
940
				if (($max_image_width != 0) && ($config['liw_attach_enabled'] == 1) && !isset($username_from))
940
				if (($max_image_width != 0) && ($config['liw_attach_enabled'] == 1) && !isset($username_from))
941
				{
941
				{
...
...
945
					}
945
					}
946
					list($image_width, $image_height) = liw_get_dimensions($server_protocol . $server_name . $server_port . $script_name . '/' . $img_source, $post_id);
946
					list($image_width, $image_height) = liw_get_dimensions($server_protocol . $server_name . $server_port . $script_name . '/' . $img_source, $post_id);
947
947
948
					if ($image_width && ($image_width > $max_image_width) || empty($image_width) || empty($image_height) )
948
					if ($image_width && ($image_width > $max_image_width) || empty($image_width) || empty($image_height))
949
					{
949
					{
950
						$img_code = generate_liw_img_popup($img_source, $image_width, $image_height, $max_image_width);
950
						$img_code = generate_liw_img_popup($img_source, $image_width, $image_height, $max_image_width);
951
					}
951
					}
...
...
1077
1077
1078
			if ($link)
1078
			if ($link)
1079
			{
1079
			{
1080
				$target_blank = 'target="_blank"'; //( (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT) ) ? 'target="_blank"' : '';
1080
				$target_blank = 'target="_blank"'; //((intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT)) ? 'target="_blank"' : '';
1081
1081
1082
				// display attachment
1082
				// display attachment
1083
				$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($userdata['user_level'] == ADMIN)) ? ('<a href="'
. append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '">' .
sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' .
$post_id][$i]['download_count']);
1083
				$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($userdata['user_level'] == ADMIN)) ? ('<a href="'
. append_sid(IP_ROOT_PATH . 'attachments.' . PHP_EXT . '?attach_id=' . $attachments['_' . $post_id][$i]['attach_id']) . '">' .
sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '</a>') : sprintf($lang['Download_number'], $attachments['_' .
$post_id][$i]['download_count']);

Updated ip/trunk/includes/bbcode.php Download diff

156157
261
		'stream'			=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
261
		'stream'			=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
262
		'emff'				=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
262
		'emff'				=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
263
		'mp3'					=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
263
		'mp3'					=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
264
		'vimeo'				=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
264
		'youtube'			=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
265
		'youtube'			=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
265
		'googlevideo'	=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
266
		'googlevideo'	=> array('nested' => true, 'inurl' => true, 'allow_empty' => false),
266
267
...
...
2072
		// Added by Tom XS2 Build 054
2073
		// Added by Tom XS2 Build 054
2073
		if ($config['switch_bbcb_active_content'] == 1)
2074
		if ($config['switch_bbcb_active_content'] == 1)
2074
		{
2075
		{
2075
			// FLASH, SWF, FLV, VIDEO, REAL, QUICK, STREAM, EMFF, YOUTUBE, GOOGLEVIDEO
2076
			// FLASH, SWF, FLV, VIDEO, REAL, QUICK, STREAM, EMFF, VIMEO, YOUTUBE, GOOGLEVIDEO
2076
			if(($tag === 'flash') || ($tag === 'swf') || ($tag === 'flv') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag
=== 'emff') || ($tag === 'mp3') || ($tag === 'youtube') || ($tag === 'googlevideo'))
2077
			if(($tag === 'flash') || ($tag === 'swf') || ($tag === 'flv') || ($tag === 'video') || ($tag === 'ram') || ($tag === 'quick') || ($tag === 'stream') || ($tag === 'emff') || ($tag === 'mp3') || ($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo'))
2077
			{
2078
			{
2078
				if($this->is_sig && !$config['allow_all_bbcode'])
2079
				if($this->is_sig && !$config['allow_all_bbcode'])
2079
				{
2080
				{
...
...
2087
				$width_array = array('320', '425', '400', '480', '540', '640');
2088
				$width_array = array('320', '425', '400', '480', '540', '640');
2088
				$height_array = array('240', '350', '300', '360', '420', '480', '385');
2089
				$height_array = array('240', '350', '300', '360', '420', '480', '385');
2089
2090
2090
				$default_width = ((($tag === 'youtube') || ($tag === 'googlevideo')) ? '425' : '320');
2091
				// 4/3 YouTube width and height: 425x350
2092
				// 16/9 YouTube width and height: 640x385
2093
				$default_width = ((($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo')) ? '640' : '320');
2091
				$width = (isset($item['params']['width']) ? intval($item['params']['width']) : $default_width);
2094
				$width = (isset($item['params']['width']) ? intval($item['params']['width']) : $default_width);
2092
				$width = ((($width > 10) && ($width < 641)) ? $width : $default_width);
2095
				$width = ((($width > 10) && ($width < 641)) ? $width : $default_width);
2093
2096
2094
				$default_width = ((($tag === 'youtube') || ($tag === 'googlevideo')) ? '350' : '240');
2097
				$default_width = ((($tag === 'vimeo') || ($tag === 'youtube') || ($tag === 'googlevideo')) ? '385' : '240');
2095
				$height = (isset($item['params']['height']) ? intval($item['params']['height']) : $default_height);
2098
				$height = (isset($item['params']['height']) ? intval($item['params']['height']) : $default_height);
2096
				$height = ((($height > 10) && ($height < 481)) ? $height : $default_height);
2099
				$height = ((($height > 10) && ($height < 481)) ? $height : $default_height);
2097
2100
...
...
2123
				{
2126
				{
2124
					$html = '<object data="emff_player.swf" type="application/x-shockwave-flash" width="200" height="55"
align="top" ><param name="FlashVars" value="src=' . $content . '" /><param name="movie"
value="emff_player.swf" /><param name="quality" value="high" /><param name="bgcolor"
value="#f8f8f8" /></object>';
2127
					$html = '<object data="emff_player.swf" type="application/x-shockwave-flash" width="200" height="55"
align="top" ><param name="FlashVars" value="src=' . $content . '" /><param name="movie"
value="emff_player.swf" /><param name="quality" value="high" /><param name="bgcolor"
value="#f8f8f8" /></object>';
2125
				}
2128
				}
2129
				elseif ($tag === 'vimeo')
2130
				{
2131
					$width = in_array($width, $width_array) ? $width : '640';
2132
					$height = in_array($height, $height_array) ? $height : '385';
2133
					$html = '<object type="application/x-shockwave-flash" width="' . $width . '" height="' . $height . '"
data="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '"><param name="quality" value="best" /><param
name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie"
value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '" /></object><br /><a
href="http://www.vimeo.com/moogaloop.swf?clip_id=' . $content . '" target="_blank">Link</a><br />';
2134
				}
2126
				elseif ($tag === 'youtube')
2135
				elseif ($tag === 'youtube')
2127
				{
2136
				{
2128
					$color_append = '';
2137
					$color_append = '';
...
...
2132
						$color_append .= ($color_2 ? ('&amp;color2=0x' . str_replace('#', '', $color_2)) : '');
2141
						$color_append .= ($color_2 ? ('&amp;color2=0x' . str_replace('#', '', $color_2)) : '');
2133
					}
2142
					}
2134
2143
2135
					$width = in_array($width, $width_array) ? $width : '425';
2144
					$width = in_array($width, $width_array) ? $width : '640';
2136
					$height = in_array($height, $height_array) ? $height : '350';
2145
					$height = in_array($height, $height_array) ? $height : '385';
2137
					$html = '<object width="' . $width . '" height="' . $height . '"><param name="movie"
value="http://www.youtube.com/v/' . $content . $color_append . '" /><embed src="http://www.youtube.com/v/' . $content . $color_append .
'" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height .
'"></embed></object><br /><a href="http://youtube.com/watch?v=' . $content . $color_append . '"
target="_blank">Link</a><br />';
2146
					$html = '<object width="' . $width . '" height="' . $height . '"><param name="movie"
value="http://www.youtube.com/v/' . $content . $color_append . '" /><embed src="http://www.youtube.com/v/' . $content . $color_append .
'" type="application/x-shockwave-flash" width="' . $width . '" height="' . $height .
'"></embed></object><br /><a href="http://youtube.com/watch?v=' . $content . $color_append . '"
target="_blank">Link</a><br />';
2138
				}
2147
				}
2139
				elseif ($tag === 'googlevideo')
2148
				elseif ($tag === 'googlevideo')
2140
				{
2149
				{
2141
					$width = in_array($width, $width_array) ? $width : '425';
2150
					$width = in_array($width, $width_array) ? $width : '640';
2142
					$height = in_array($height, $height_array) ? $height : '350';
2151
					$height = in_array($height, $height_array) ? $height : '385';
2143
					$html = '<object width="' . $width . '" height="' . $height . '"><param name="movie"
value="http://video.google.com/googleplayer.swf?docId=' . $content . '"></param><embed style="width:' . $width . 'px; height:' .
$height . 'px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash"
src="http://video.google.com/googleplayer.swf?docId=' . $content . '" allowScriptAccess="sameDomain" quality="best"
bgcolor="#f8f8f8" scale="noScale" salign="TL" FlashVars="playerMode=embedded"></embed></object><br
/><a href="http://video.google.com/videoplay?docid=' . $content . '" target="_blank">Link</a><br />';
2152
					$html = '<object width="' . $width . '" height="' . $height . '"><param name="movie"
value="http://video.google.com/googleplayer.swf?docId=' . $content . '"></param><embed style="width:' . $width . 'px; height:' .
$height . 'px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash"
src="http://video.google.com/googleplayer.swf?docId=' . $content . '" allowScriptAccess="sameDomain" quality="best"
bgcolor="#f8f8f8" scale="noScale" salign="TL" FlashVars="playerMode=embedded"></embed></object><br
/><a href="http://video.google.com/videoplay?docid=' . $content . '" target="_blank">Link</a><br />';
2144
				}
2153
				}
2145
				return array(
2154
				return array(

Updated ip/trunk/includes/class_files.php Download diff

156157
938
938
939
		return $result;
939
		return $result;
940
	}
940
	}
941
942
	/**
943
	* Recursive CHMOD re-set for files that cannot be handled via FTP because of different owner
944
	*/
945
	function rchmod($parent, $dmod, $fmod)
946
	{
947
		if (@is_dir($parent))
948
		{
949
			$old = @umask(0000);
950
			@chmod($parent, $dmod);
951
			@umask($old);
952
			if ($handle = @opendir($parent))
953
			{
954
				while (($file = @readdir($handle)) !== false)
955
				{
956
					if (($file === '.') || ($file === '..'))
957
					{
958
						continue;
959
					}
960
					elseif (@is_dir($parent . '/' . $file))
961
					{
962
						$this->rchmod($parent . '/' . $file, $dmod, $fmod);
963
					}
964
					else
965
					{
966
						$old = @umask(0000);
967
						@chmod($parent . '/' . $file, $fmod);
968
						@umask($old);
969
					}
970
				}
971
				@closedir($handle);
972
			}
973
		}
974
		else
975
		{
976
			$old = @umask(0000);
977
			@chmod($parent, $fmod);
978
			@umask($old);
979
		}
980
	}
941
}
981
}
942
982
943
?>
983
?>

Added ip/trunk/includes/class_mcp.php

Show contents

Updated ip/trunk/includes/functions_bbcode.php Download diff

156157
34
34
35
	if (!class_exists('bbcode'))
35
	if (!class_exists('bbcode'))
36
	{
36
	{
37
		include(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
37
		include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
38
	}
38
	}
39
39
40
	if (empty($bbcode))
40
	if (empty($bbcode))

Updated ip/trunk/mail_digests.php Download diff

156157
81
81
82
if (empty($bbcode) || !class_exists('bbcode'))
82
if (empty($bbcode) || !class_exists('bbcode'))
83
{
83
{
84
	include(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
84
	include_once(IP_ROOT_PATH . 'includes/bbcode.' . PHP_EXT);
85
}
85
}
86
86
87
@set_time_limit(0);
87
@set_time_limit(0);

Updated ip/trunk/modcp.php Download diff

156157
27
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
27
include_once(IP_ROOT_PATH . 'includes/functions_admin.' . PHP_EXT);
28
include_once(IP_ROOT_PATH . 'includes/functions_post.' . PHP_EXT);
28
include_once(IP_ROOT_PATH . 'includes/functions_post.' . PHP_EXT);
29
29
30
include(IP_ROOT_PATH . 'includes/class_mcp.' . PHP_EXT);
31
$mcp_topic = new class_mcp_topic();
32
30
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
33
@include_once(IP_ROOT_PATH . 'includes/class_topics.' . PHP_EXT);
31
$class_topics = new class_topics();
34
$class_topics = new class_topics();
32
35
...
...
241
	redirect(append_sid($redirect, true));
244
	redirect(append_sid($redirect, true));
242
}
245
}
243
246
244
if(!function_exists('find_names'))
245
{
246
	function find_names($id)
247
	{
248
		global $db;
249
250
		$sql = "SELECT forum_name FROM " . FORUMS_TABLE . " WHERE forum_id = $id";
251
		$result = $db->sql_query($sql);
252
		$row = $db->sql_fetchrow($result);
253
		return $row['forum_name'];
254
	}
255
}
256
257
if (!($mode == 'quick_title_edit'))
247
if (!($mode == 'quick_title_edit'))
258
{
248
{
259
	$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
249
	$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
...
...
301
291
302
		if($confirm)
292
		if($confirm)
303
		{
293
		{
304
			include(IP_ROOT_PATH . 'includes/functions_search.' . PHP_EXT);
305
306
			$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
294
			$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
307
			$topic_id_sql = '';
295
			$mcp_topic->topic_delete($topics, $forum_id);
308
			for($i = 0; $i < sizeof($topics); $i++)
309
			{
310
				$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($topics[$i]);
311
			}
312
296
313
			$sql = "SELECT topic_id FROM " . TOPICS_TABLE . " WHERE topic_id IN ($topic_id_sql) AND forum_id = $forum_id";
314
			$result = $db->sql_query($sql);
315
316
			$topic_id_sql = '';
317
			while($row = $db->sql_fetchrow($result))
318
			{
319
				$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']);
320
			}
321
			if ($topic_id_sql == '')
322
			{
323
				message_die(GENERAL_MESSAGE, $lang['None_selected']);
324
			}
325
			$db->sql_freeresult($result);
326
327
			$sql = "SELECT poster_id, COUNT(post_id) AS posts FROM " . POSTS_TABLE . "
328
				WHERE topic_id IN ($topic_id_sql) GROUP BY poster_id";
329
			$result = $db->sql_query($sql);
330
331
			$count_sql = array();
332
			while($row = $db->sql_fetchrow($result))
333
			{
334
				$count_sql[] = "UPDATE " . USERS_TABLE . " SET user_posts = user_posts - " . $row['posts'] . " WHERE user_id = " . $row['poster_id'];
335
			}
336
			$db->sql_freeresult($result);
337
338
			if(sizeof($count_sql))
339
			{
340
				for($i = 0; $i < sizeof($count_sql); $i++)
341
				{
342
					$db->sql_query($count_sql[$i]);
343
				}
344
			}
345
346
			$sql = "SELECT post_id FROM " . POSTS_TABLE . " WHERE topic_id IN ($topic_id_sql)";
347
			$result = $db->sql_query($sql);
348
349
			$post_id_sql = '';
350
			while($row = $db->sql_fetchrow($result))
351
			{
352
				$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);
353
			}
354
			$db->sql_freeresult($result);
355
356
			$sql = "SELECT vote_id FROM " . VOTE_DESC_TABLE . " WHERE topic_id IN ($topic_id_sql)";
357
			$result = $db->sql_query($sql);
358
359
			$vote_id_sql = '';
360
			while($row = $db->sql_fetchrow($result))
361
			{
362
				$vote_id_sql .= (($vote_id_sql != '') ? ', ' : '') . $row['vote_id'];
363
			}
364
			$db->sql_freeresult($result);
365
366
			$sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id IN ($topic_id_sql) OR topic_moved_id IN ($topic_id_sql)";
367
			$db->sql_transaction('begin');
368
			$db->sql_query($sql);
369
370
			$sql = "DELETE FROM " . THANKS_TABLE . "
371
					WHERE topic_id IN ($topic_id_sql)";
372
			$db->sql_query($sql);
373
374
			$sql = "DELETE FROM " . BOOKMARK_TABLE . "
375
				WHERE topic_id IN ($topic_id_sql)";
376
			$db->sql_query($sql);
377
378
			// Event Registration - BEGIN
379
			$sql = "DELETE FROM " . REGISTRATION_TABLE . " WHERE topic_id IN ($topic_id_sql)";
380
			$db->sql_query($sql);
381
382
			$sql = "DELETE FROM " . REGISTRATION_DESC_TABLE . " WHERE topic_id IN ($topic_id_sql)";
383
			$db->sql_query($sql);
384
			// Event Registration - END
385
386
			if($post_id_sql != '')
387
			{
388
				$sql = "DELETE FROM " . POSTS_TABLE . " WHERE post_id IN ($post_id_sql)";
389
				$db->sql_query($sql);
390
391
				remove_search_post($post_id_sql);
392
			}
393
394
			if($vote_id_sql != '')
395
			{
396
				$sql = "DELETE FROM " . VOTE_DESC_TABLE . " WHERE vote_id IN ($vote_id_sql)";
397
				$db->sql_query($sql);
398
399
				$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id IN ($vote_id_sql)";
400
				$db->sql_query($sql);
401
402
				$sql = "DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id IN ($vote_id_sql)";
403
				$db->sql_query($sql);
404
			}
405
406
			$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id IN ($topic_id_sql)";
407
			$db->sql_query($sql);
408
			$db->sql_transaction('commit');
409
410
			if(!empty($topic_id))
297
			if(!empty($topic_id))
411
			{
298
			{
412
				$redirect_page = CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'];
299
				$redirect_page = CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'];
...
...
421
			$redirect_url = $redirect_page;
308
			$redirect_url = $redirect_page;
422
			meta_refresh(3, $redirect_url);
309
			meta_refresh(3, $redirect_url);
423
310
424
			empty_cache_folders(POSTS_CACHE_FOLDER);
425
			empty_cache_folders(FORUMS_CACHE_FOLDER);
426
			sync('forum', $forum_id);
427
428
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_removed'] : $lang['Topics_Removed']) . '<br /><br />' .
$l_redirect);
311
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_removed'] : $lang['Topics_Removed']) . '<br /><br />' .
$l_redirect);
429
		}
312
		}
430
		else
313
		else
...
...
472
		if($confirm)
355
		if($confirm)
473
		{
356
		{
474
			$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
357
			$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
475
			$topic_id_sql = '';
358
			$mcp_topic->topic_poll_delete($topics);
476
			for($i = 0; $i < sizeof($topics); $i++)
477
			{
478
				$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($topics[$i]);
479
			}
480
359
481
			$sql = "UPDATE " . TOPICS_TABLE . " SET topic_vote = '0' WHERE topic_id IN ($topic_id_sql)";
482
			$result = $db->sql_query($sql);
483
484
			$sql = "SELECT vote_id FROM " . VOTE_DESC_TABLE . " WHERE topic_id IN ($topic_id_sql)";
485
			$result = $db->sql_query($sql);
486
487
			$vote_id_sql = '';
488
			while($row = $db->sql_fetchrow($result))
489
			{
490
				$vote_id_sql .= (($vote_id_sql != '') ? ', ' : '') . $row['vote_id'];
491
			}
492
			$db->sql_freeresult($result);
493
494
			if($vote_id_sql != '')
495
			{
496
				$sql = "DELETE FROM " . VOTE_DESC_TABLE . " WHERE vote_id IN ($vote_id_sql)";
497
				$db->sql_query($sql);
498
499
				$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id IN ($vote_id_sql)";
500
				$db->sql_query($sql);
501
502
				$sql = "DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id IN ($vote_id_sql)";
503
				$db->sql_query($sql);
504
			}
505
506
			$redirect_page = 'modcp.' . PHP_EXT . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'];
360
			$redirect_page = 'modcp.' . PHP_EXT . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'];
507
			$l_redirect = sprintf($lang['Click_return_modcp'], '<a href="'. $redirect_page .'">', '</a>') .'<br /><br />'.
sprintf($lang['Click_return_forum'], '<a href="'. CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' .
$userdata['session_id'] .'">', '</a>');
361
			$l_redirect = sprintf($lang['Click_return_modcp'], '<a href="'. $redirect_page .'">', '</a>') .'<br /><br />'.
sprintf($lang['Click_return_forum'], '<a href="'. CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' .
$userdata['session_id'] .'">', '</a>');
508
362
509
			$redirect_url = $redirect_page;
363
			$redirect_url = $redirect_page;
510
			meta_refresh(3, $redirect_url);
364
			meta_refresh(3, $redirect_url);
511
365
512
			empty_cache_folders(POSTS_CACHE_FOLDER);
513
514
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_poll_removed'] : $lang['Mod_CP_polls_removed']) .'<br /><br />'.
$l_redirect);
366
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_poll_removed'] : $lang['Mod_CP_polls_removed']) .'<br /><br />'.
$l_redirect);
515
		}
367
		}
516
		else
368
		else
...
...
552
404
553
		if($confirm)
405
		if($confirm)
554
		{
406
		{
555
			$new_forum_id = intval($_POST['new_forum']);
407
			$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
556
			$fid = $_POST['new_forum'];
408
			$new_forum_id = $_POST['new_forum'];
557
			if ($fid == 'Root')
409
			if ($mcp_topic->topic_move($topics, $forum_id, $new_forum_id, isset($_POST['move_leave_shadow'])))
558
			{
410
			{
559
				$type = POST_CAT_URL;
411
				$message = ((sizeof($topics) == '1') ? sprintf($lang['Mod_CP_topic_moved'], $mcp_topic->find_names($forum_id), $mcp_topic->find_names($new_forum_id)) : sprintf($lang['Mod_CP_topics_moved'], $mcp_topic->find_names($forum_id), $mcp_topic->find_names($new_forum_id))) .'<br /><br />';
560
				$new_forum_id = 0;
561
			}
412
			}
562
			else
413
			else
563
			{
414
			{
564
				$type = substr($fid, 0, 1);
565
				$new_forum_id = ($type == POST_FORUM_URL) ? intval(substr($fid, 1)) : 0;
566
			}
567
			if ($new_forum_id <= 0)
568
			{
569
				message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);
570
			}
571
			$old_forum_id = $forum_id;
572
			if($new_forum_id != $old_forum_id)
573
			{
574
				$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
575
				$topic_list = '';
576
				for($i = 0; $i < sizeof($topics); $i++)
577
				{
578
					$topic_list .= (($topic_list != '') ? ', ' : '') . intval($topics[$i]);
579
				}
580
581
				$sql = "SELECT * FROM " . TOPICS_TABLE . "
582
					WHERE topic_id IN ($topic_list) AND forum_id = $old_forum_id AND topic_status <> " . TOPIC_MOVED;
583
				$result = $db->sql_query($sql);
584
				$row = $db->sql_fetchrowset($result);
585
				$db->sql_freeresult($result);
586
587
				$db->sql_transaction('begin');
588
589
				for($i = 0; $i < sizeof($row); $i++)
590
				{
591
					$topic_id = $row[$i]['topic_id'];
592
					if(isset($_POST['move_leave_shadow']))
593
					{
594
						$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
595
							VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
596
						$db->sql_query($sql);
597
					}
598
599
					$sql = "UPDATE " . TOPICS_TABLE . " SET forum_id = $new_forum_id WHERE topic_id = $topic_id";
600
					$db->sql_query($sql);
601
602
					$sql = "UPDATE " . POSTS_TABLE . " SET forum_id = $new_forum_id WHERE topic_id = $topic_id";
603
					$db->sql_query($sql);
604
				}
605
606
				$db->sql_transaction('commit');
607
608
				empty_cache_folders(POSTS_CACHE_FOLDER);
609
				empty_cache_folders(FORUMS_CACHE_FOLDER);
610
				sync_topic_details(0, 0, true, false);
611
				sync('forum', $new_forum_id);
612
				sync('forum', $old_forum_id);
613
				$message = ((sizeof($topics) == '1') ? sprintf($lang['Mod_CP_topic_moved'], find_names($old_forum_id), find_names($new_forum_id)) : sprintf($lang['Mod_CP_topics_moved'], find_names($old_forum_id), find_names($new_forum_id))) .'<br /><br />';
614
			}
615
			else
616
			{
617
				$message = $lang['No_Topics_Moved'] .'<br /><br />';
415
				$message = $lang['No_Topics_Moved'] .'<br /><br />';
618
			}
416
			}
619
417
...
...
683
		}
481
		}
684
482
685
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
483
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
686
		$topic_id_sql = '';
484
		$mcp_topic->topic_lock_unlock($topics, $mode, $forum_id);
687
		for($i = 0; $i < sizeof($topics); $i++)
688
		{
689
			$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($topics[$i]);
690
		}
691
485
692
		$sql = "UPDATE " . TOPICS_TABLE . " SET topic_status = " . (($mode == 'lock') ? TOPIC_LOCKED : TOPIC_UNLOCKED) . "
693
			WHERE topic_id IN ($topic_id_sql) AND forum_id = $forum_id AND topic_moved_id = 0";
694
		$result = $db->sql_query($sql);
695
696
		if(!empty($topic_id))
486
		if(!empty($topic_id))
697
		{
487
		{
698
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
488
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
...
...
707
		$redirect_url = $redirect_page;
497
		$redirect_url = $redirect_page;
708
		meta_refresh(3, $redirect_url);
498
		meta_refresh(3, $redirect_url);
709
499
710
		empty_cache_folders(POSTS_CACHE_FOLDER);
711
712
		if($mode == 'lock')
500
		if($mode == 'lock')
713
		{
501
		{
714
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_locked'] : $lang['Topics_Locked']) .'<br /><br />'. $message .
'<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id .
'&amp;sid=' . $userdata['session_id'] . '">', '</a>'));
502
			message_die(GENERAL_MESSAGE, ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_locked'] : $lang['Topics_Locked']) .'<br /><br />'. $message .
'<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id .
'&amp;sid=' . $userdata['session_id'] . '">', '</a>'));
...
...
723
	case 'announce':
511
	case 'announce':
724
	case 'super_announce':
512
	case 'super_announce':
725
	case 'normalize':
513
	case 'normalize':
726
		if($mode == 'sticky' && !$is_auth['auth_sticky'])
727
		{
728
			$message = sprintf($lang['Sorry_auth_sticky'], $is_auth['auth_sticky_type']);
729
			message_die(GENERAL_MESSAGE, $message);
730
		}
731
		if($mode == 'announce' && !$is_auth['auth_announce'])
732
		{
733
			$message = sprintf($lang['Sorry_auth_announce'], $is_auth['auth_announce_type']);
734
			message_die(GENERAL_MESSAGE, $message);
735
		}
736
		if($mode == 'super_announce' && !$is_auth['auth_globalannounce'])
737
		{
738
			$message = sprintf($lang['Sorry_auth_announce'], $is_auth['auth_announce_type']);
739
			message_die(GENERAL_MESSAGE, $message);
740
		}
741
		if(empty($_POST['topic_id_list']) && empty($topic_id))
514
		if(empty($_POST['topic_id_list']) && empty($topic_id))
742
		{
515
		{
743
			message_die(GENERAL_MESSAGE, $lang['None_selected']);
516
			message_die(GENERAL_MESSAGE, $lang['None_selected']);
744
		}
517
		}
745
518
746
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
519
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
747
		$topic_id_sql = '';
520
		$mcp_topic->topic_switch_status($topics, $mode);
748
		for($i = 0; $i < sizeof($topics); $i++)
749
		{
750
			$topic_id_sql .= (($topic_id_sql != "") ? ', ' : '') . $topics[$i];
751
		}
752
521
753
		if($mode == 'sticky')
754
		{
755
			$topic_type = POST_STICKY;
756
		}
757
		elseif($mode == 'announce')
758
		{
759
			$topic_type = POST_ANNOUNCE;
760
		}
761
		elseif($mode == 'super_announce')
762
		{
763
			$topic_type = POST_GLOBAL_ANNOUNCE;
764
		}
765
		elseif($mode == 'normalize')
766
		{
767
			$topic_type = POST_NORMAL;
768
		}
769
		$sql = "UPDATE " . TOPICS_TABLE . " SET topic_type = " . $topic_type . " WHERE topic_id IN ($topic_id_sql) AND topic_moved_id = 0";
770
		$result = $db->sql_query($sql);
771
772
		if(!empty($topic_id))
522
		if(!empty($topic_id))
773
		{
523
		{
774
			$redirect_page = append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id);
524
			$redirect_page = append_sid(CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id);
...
...
797
				$message = ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_normalized'] : $lang['Mod_CP_topics_normalized']) .'<br /><br />'. $message; break;
547
				$message = ((sizeof($topics) == '1') ? $lang['Mod_CP_topic_normalized'] : $lang['Mod_CP_topics_normalized']) .'<br /><br />'. $message; break;
798
		}
548
		}
799
549
800
		empty_cache_folders(POSTS_CACHE_FOLDER);
801
802
		message_die(GENERAL_MESSAGE, $message);
550
		message_die(GENERAL_MESSAGE, $message);
803
		break;
551
		break;
552
804
	case 'merge':
553
	case 'merge':
805
		$meta_content['page_title'] = $lang['Mod_CP'] . ' (' . $lang['Merge_topic'] . ')';
554
		$meta_content['page_title'] = $lang['Mod_CP'] . ' (' . $lang['Merge_topic'] . ')';
806
555
...
...
817
			}
566
			}
818
567
819
			$new_topic_id = $_POST['new_topic'];
568
			$new_topic_id = $_POST['new_topic'];
820
			$topic_id_list = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
569
			$topics = (isset($_POST['topic_id_list']) ? $_POST['topic_id_list'] : array($topic_id));
821
570
822
			$db->sql_transaction('begin');
571
			if(sizeof($topics) > 0)
823
824
			for ($i = 0; $i < sizeof($topic_id_list); $i++)
825
			{
572
			{
826
				$old_topic_id = $topic_id_list[$i];
573
				$mcp_topic->topic_merge($topics, $new_topic_id, $forum_id);
574
				$message = $lang['Topics_Merged'] . '<br /><br />';
575
			}
576
			else
577
			{
578
				$message = $lang['No_Topics_Merged'] . '<br /><br />';
579
			}
827
580
828
				if ($new_topic_id != $old_topic_id)
829
				{
830
					$sql = "UPDATE " . POSTS_TABLE . "
831
						SET topic_id = '" . $new_topic_id . "'
832
						WHERE topic_id = '" . $topic_id_list[$i] . "'";
833
					$result = $db->sql_query($sql);
834
835
//<!-- BEGIN Unread Post Information to Database Mod -->
836
					if($userdata['upi2db_access'])
837
					{
838
						/*
839
						$sql = "DELETE FROM " . UPI2DB_UNREAD_POSTS_TABLE . "
840
							WHERE topic_id IN ($topic_id_sql)";
841
						*/
842
						$sql = "DELETE FROM " . UPI2DB_UNREAD_POSTS_TABLE . "
843
							WHERE topic_id IN ($topic_id_list[$i])";
844
						$db->sql_query($sql);
845
846
						/*
847
						$sql = "DELETE FROM " . UPI2DB_LAST_POSTS_TABLE . "
848
							WHERE topic_id IN ($topic_id_sql)";
849
						*/
850
						$sql = "DELETE FROM " . UPI2DB_LAST_POSTS_TABLE . " WHERE topic_id IN ($topic_id_list[$i])";
851
						$db->sql_query($sql);
852
					}
853
//<!-- END Unread Post Information to Database Mod -->
854
855
					$sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $topic_id_list[$i]";
856
					$result = $db->sql_query($sql);
857
858
					$sql = "DELETE FROM  " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id_list[$i]";
859
					$result = $db->sql_query($sql);
860
861
					// Sync the forum indexes
862
					empty_cache_folders(POSTS_CACHE_FOLDER);
863
					empty_cache_folders(FORUMS_CACHE_FOLDER);
864
					sync('forum', $forum_id);
865
					sync('topic', $new_topic_id);
866
867
					$message = $lang['Topics_Merged'] . '<br /><br />';
868
				}
869
				else
870
				{
871
					$message = $lang['No_Topics_Merged'] . '<br /><br />';
872
				}
873
874
			} // end for
875
876
			$db->sql_transaction('commit');
877
878
			if (!empty($topic_id))
581
			if (!empty($topic_id))
879
			{
582
			{
880
				$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $new_topic_id . '&amp;sid=' . $userdata['session_id'];
583
				$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $new_topic_id . '&amp;sid=' . $userdata['session_id'];
...
...
941
			page_footer(true, '', true);
644
			page_footer(true, '', true);
942
		}
645
		}
943
		break;
646
		break;
647
944
	case 'split':
648
	case 'split':
945
		$meta_content['page_title'] = $lang['Mod_CP'] . ' (' . $lang['Split'] . ')';
649
		$meta_content['page_title'] = $lang['Mod_CP'] . ' (' . $lang['Split'] . ')';
946
650
947
		$post_id_sql = '';
651
		if((isset($_POST['split_type_all']) || isset($_POST['split_type_beyond'])) && isset($_POST['post_id_list']))
948
		if(isset($_POST['split_type_all']) || isset($_POST['split_type_beyond']))
949
		{
652
		{
950
			$posts = $_POST['post_id_list'];
653
			$posts = $_POST['post_id_list'];
951
			for($i = 0; $i < sizeof($posts); $i++)
654
			$fid = $_POST['new_forum_id'];
655
			$topic_id = $_POST[POST_TOPIC_URL];
656
			$split_beyond = (isset($_POST['split_type_beyond'])) ? true : false;
657
			$topic_subject = trim(htmlspecialchars($_POST['subject']));
658
			if(empty($topic_subject))
952
			{
659
			{
953
				$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($posts[$i]);
660
			message_die(GENERAL_MESSAGE, $lang['Empty_subject']);
954
			}
661
			}
955
		}
956
662
957
		if($post_id_sql != '')
663
			$new_topic_id = $mcp_topic->topic_split($posts, $forum_id, $fid, $topic_id, $split_beyond, $topic_subject);
958
		{
664
			$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
959
			$sql = "SELECT post_id FROM " . POSTS_TABLE . " WHERE post_id IN ($post_id_sql) AND forum_id = $forum_id";
665
			meta_refresh(3, $redirect_url);
960
			$result = $db->sql_query($sql);
961
666
962
			$post_id_sql = '';
667
			$message = $lang['Topic_split'] . '<br /><br />' . sprintf($lang['Mod_CP_click_return_topic'], '<a href="' . $redirect_url . '">', '</a>', '<a href="' . CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $new_topic_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>').'<br /><br />'. sprintf($lang['Click_return_modcp'], '<a href="modcp.' . PHP_EXT . '?' . POST_FORUM_URL . '=' . $forum_id . '&sid=' . $userdata['session_id'] .'">', '</a>').'<br /><br />'. sprintf($lang['Click_return_forum'], '<a href="'. CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'] .'">', '</a>');
963
			while($row = $db->sql_fetchrow($result))
964
			{
965
				$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);
966
			}
967
			if ($post_id_sql == '')
968
			{
969
				message_die(GENERAL_MESSAGE, $lang['None_selected']);
970
			}
971
			$db->sql_freeresult($result);
972
668
973
			$sql = "SELECT post_id, poster_id, topic_id, post_time FROM " . POSTS_TABLE . "
669
			message_die(GENERAL_MESSAGE, $message);
974
				WHERE post_id IN ($post_id_sql) ORDER BY post_time ASC";
975
			$result = $db->sql_query($sql);
976
977
			if($row = $db->sql_fetchrow($result))
978
			{
979
				$first_poster = $row['poster_id'];
980
				$topic_id = $row['topic_id'];
981
				$post_time = $row['post_time'];
982
983
				$user_id_sql = '';
984
				$post_id_sql = '';
985
				do
986
				{
987
					$user_id_sql .= (($user_id_sql != '') ? ', ' : '') . intval($row['poster_id']);
988
					$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);;
989
				}
990
				while ($row = $db->sql_fetchrow($result));
991
992
				$post_subject = trim(htmlspecialchars($_POST['subject']));
993
				if(empty($post_subject))
994
				{
995
					message_die(GENERAL_MESSAGE, $lang['Empty_subject']);
996
				}
997
998
				$fid = $_POST['new_forum_id'];
999
				if ($fid == 'Root')
1000
				{
1001
					$type = POST_CAT_URL;
1002
					$new_forum_id = 0;
1003
				}
1004
				else
1005
				{
1006
					$type = substr($fid, 0, 1);
1007
					$new_forum_id = ($type == POST_FORUM_URL) ? intval(substr($fid, 1)) : 0;
1008
				}
1009
1010
				if ($new_forum_id <= 0)
1011
				{
1012
					message_die(GENERAL_MESSAGE, $lang['Forum_not_exist']);
1013
				}
1014
1015
				$topic_time = time();
1016
1017
				$sql  = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
1018
					VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
1019
				$db->sql_transaction('begin');
1020
				$db->sql_query($sql);
1021
				$new_topic_id = $db->sql_nextid();
1022
1023
				$sql = "UPDATE " . TOPICS_WATCH_TABLE . " SET topic_id = $new_topic_id
1024
					WHERE topic_id = $topic_id AND user_id IN ($user_id_sql)";
1025
				$db->sql_query($sql);
1026
1027
				$sql_where = (!empty($_POST['split_type_beyond'])) ? " post_time >= $post_time AND topic_id = $topic_id" : "post_id IN ($post_id_sql)";
1028
				$sql = "UPDATE " . POSTS_TABLE . " SET topic_id = $new_topic_id, forum_id = $new_forum_id WHERE $sql_where";
1029
				$db->sql_query($sql);
1030
				$db->sql_transaction('commit');
1031
1032
//<!-- BEGIN Unread Post Information to Database Mod -->
1033
				$sql_where_upi = (!empty($_POST['split_type_beyond'])) ? " topic_id = $topic_id" : "post_id IN ($post_id_sql)";
1034
1035
				$sql = "UPDATE " . UPI2DB_LAST_POSTS_TABLE . "
1036
					SET topic_id = $new_topic_id, forum_id = $new_forum_id
1037
					WHERE $sql_where_upi";
1038
				$db->sql_query($sql);
1039
1040
				$sql = "UPDATE " . UPI2DB_UNREAD_POSTS_TABLE . "
1041
					SET topic_id = $new_topic_id, forum_id = $new_forum_id
1042
					WHERE $sql_where_upi";
1043
				$db->sql_query($sql);
1044
//<!-- END Unread Post Information to Database Mod -->
1045
1046
				empty_cache_folders(POSTS_CACHE_FOLDER);
1047
				empty_cache_folders(FORUMS_CACHE_FOLDER);
1048
				sync('topic', $new_topic_id);
1049
				sync('topic', $topic_id);
1050
				sync('forum', $new_forum_id);
1051
				sync('forum', $forum_id);
1052
1053
				$redirect_url = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
1054
				meta_refresh(3, $redirect_url);
1055
1056
				$message = $lang['Topic_split'] . '<br /><br />' . sprintf($lang['Mod_CP_click_return_topic'], '<a href="' . $redirect_url . '">', '</a>', '<a href="' . CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $new_topic_id . '&amp;sid=' . $userdata['session_id'] . '">', '</a>').'<br /><br />'. sprintf($lang['Click_return_modcp'], '<a href="modcp.' . PHP_EXT . '?' . POST_FORUM_URL . '=' . $forum_id . '&sid=' . $userdata['session_id'] .'">', '</a>').'<br /><br />'. sprintf($lang['Click_return_forum'], '<a href="'. CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $forum_id . '&amp;sid=' . $userdata['session_id'] .'">', '</a>');
1057
1058
				message_die(GENERAL_MESSAGE, $message);
1059
			}
1060
		}
670
		}
1061
		else
671
		else
1062
		{
672
		{
...
...
1231
		}
841
		}
1232
		$template->pparse('viewip');
842
		$template->pparse('viewip');
1233
		break;
843
		break;
844
1234
	case 'recycle':
845
	case 'recycle':
1235
		$meta_content['page_title'] = $lang['Mod_CP'];
846
		$meta_content['page_title'] = $lang['Mod_CP'];
1236
847
...
...
1249
			}
860
			}
1250
			elseif (isset($_POST['topic_id_list']))
861
			elseif (isset($_POST['topic_id_list']))
1251
			{
862
			{
1252
				// Define bin forum
863
				$topics = (isset($_POST['topic_id_list'])) ? $_POST['topic_id_list'] : array($topic_id);
1253
				$new_forum_id = intval($config['bin_forum']);
1254
				$old_forum_id = $forum_id;
1255
864
1256
				if ($new_forum_id != $old_forum_id)
865
				if($mcp_topic->topic_recycle($topics, $forum_id))
1257
				{
866
				{
1258
					$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
1259
1260
					$topic_list = '';
1261
					for($i = 0; $i < sizeof($topics); $i++)
1262
					{
1263
						$topic_list .= (($topic_list != '') ? ', ' : '') . intval($topics[$i]);
1264
					}
1265
1266
					$sql = "SELECT *
1267
						FROM " . TOPICS_TABLE . "
1268
						WHERE topic_id IN (" . $topic_list . ")
1269
							AND forum_id = $old_forum_id
1270
							AND topic_status <> " . TOPIC_MOVED;
1271
					$result = $db->sql_query($sql);
1272
					$row = $db->sql_fetchrowset($result);
1273
					$db->sql_freeresult($result);
1274
1275
					$db->sql_transaction('begin');
1276
1277
					for($i = 0; $i < sizeof($row); $i++)
1278
					{
1279
						$topic_id = $row[$i]['topic_id'];
1280
1281
						if (isset($_POST['move_leave_shadow']))
1282
						{
1283
							// Insert topic in the old forum that indicates that the forum has moved.
1284
							$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
1285
								VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
1286
							$db->sql_query($sql);
1287
						}
1288
1289
						$sql = "UPDATE " . TOPICS_TABLE . "
1290
							SET forum_id = " . $new_forum_id . "
1291
							WHERE topic_id = " . $topic_id;
1292
						$db->sql_query($sql);
1293
1294
						$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = " . $topic_id;
1295
						$db->sql_query($sql);
1296
1297
//<!-- BEGIN Unread Post Information to Database Mod -->
1298
						$sql = "UPDATE " . UPI2DB_LAST_POSTS_TABLE . "
1299
							SET forum_id = " . $new_forum_id . "
1300
							WHERE topic_id = " . $topic_id;
1301
						$db->sql_query($sql);
1302
1303
						$sql = "UPDATE " . UPI2DB_UNREAD_POSTS_TABLE . "
1304
							SET forum_id = " . $new_forum_id . "
1305
							WHERE topic_id = " . $topic_id;
1306
						$db->sql_query($sql);
1307
//<!-- END Unread Post Information to Database Mod -->
1308
1309
						$sql = "UPDATE " . POSTS_TABLE . "
1310
							SET forum_id = " . $new_forum_id . "
1311
							WHERE topic_id = " . $topic_id;
1312
						$db->sql_query($sql);
1313
					}
1314
1315
					$db->sql_transaction('commit');
1316
1317
					// Sync the forum indexes
1318
					empty_cache_folders(POSTS_CACHE_FOLDER);
1319
					empty_cache_folders(FORUMS_CACHE_FOLDER);
1320
					sync('forum', $new_forum_id);
1321
					sync('forum', $old_forum_id);
1322
1323
					$message = $lang['Topics_Moved_bin'];
867
					$message = $lang['Topics_Moved_bin'];
1324
				}
868
				}
1325
				else
869
				else
...
...
1347
			message_die(GENERAL_MESSAGE, $lang['None_selected']);
891
			message_die(GENERAL_MESSAGE, $lang['None_selected']);
1348
		}
892
		}
1349
893
1350
		$addon = str_replace('%mod%', addslashes($userdata['username']), $qt_row['title_info'] . ' ');
1351
		$dateqt = ($qt_row['date_format'] == '') ? create_date($config['default_dateformat'], time(), $config['board_timezone']) : create_date($qt_row['date_format'], time(), $config['board_timezone']);
1352
		$addon = str_replace('%date%', $dateqt, $addon);
1353
1354
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
894
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
895
		$mcp_topic->topic_quick_title_edit($topics, $qt_row);
1355
896
1356
		$topic_id_sql = '';
1357
		for($i = 0; $i < sizeof($topics); $i++)
1358
		{
1359
			$topic_id_sql .= (($topic_id_sql != "") ? ', ' : '') . $topics[$i];
1360
		}
1361
1362
		$sql = "UPDATE " . TOPICS_TABLE . "
1363
			SET title_compl_infos = '" . addslashes($addon) . "'
1364
			WHERE topic_id IN ($topic_id_sql)
1365
				AND topic_moved_id = 0";
1366
		$result = $db->sql_query($sql);
1367
1368
		if (!empty($topic_id))
897
		if (!empty($topic_id))
1369
		{
898
		{
1370
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
899
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
...
...
1381
		$redirect_url = $redirect_page;
910
		$redirect_url = $redirect_page;
1382
		meta_refresh(3, $redirect_url);
911
		meta_refresh(3, $redirect_url);
1383
912
1384
		empty_cache_folders(POSTS_CACHE_FOLDER);
1385
1386
		message_die(GENERAL_MESSAGE, $lang['Topics_Title_Edited'] . '<br /><br />' . $message);
913
		message_die(GENERAL_MESSAGE, $lang['Topics_Title_Edited'] . '<br /><br />' . $message);
1387
		break;
914
		break;
1388
915
...
...
1398
		}
925
		}
1399
926
1400
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
927
		$topics = (isset($_POST['topic_id_list'])) ?  $_POST['topic_id_list'] : array($topic_id);
928
		$mcp_topic->topic_news_category_edit($topics, $news_category);
1401
929
1402
		$topic_id_sql = '';
1403
		for($i = 0; $i < sizeof($topics); $i++)
1404
		{
1405
			$topic_id_sql .= (($topic_id_sql != "") ? ', ' : '') . $topics[$i];
1406
		}
1407
1408
		$sql = "UPDATE " . TOPICS_TABLE . "
1409
			SET news_id = '" . $news_category . "'
1410
			WHERE topic_id IN ($topic_id_sql)
1411
				AND topic_moved_id = 0";
1412
		$result = $db->sql_query($sql);
1413
1414
		if (!empty($topic_id))
930
		if (!empty($topic_id))
1415
		{
931
		{
1416
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
932
			$redirect_page = CMS_PAGE_VIEWTOPIC . '?' . POST_TOPIC_URL . '=' . $topic_id . '&amp;sid=' . $userdata['session_id'];
...
...
1427
		$redirect_url = $redirect_page;
943
		$redirect_url = $redirect_page;
1428
		meta_refresh(3, $redirect_url);
944
		meta_refresh(3, $redirect_url);
1429
945
1430
		empty_cache_folders(POSTS_CACHE_FOLDER);
1431
1432
		message_die(GENERAL_MESSAGE, $lang['Category_Updated'] . '<br /><br />' . $message);
946
		message_die(GENERAL_MESSAGE, $lang['Category_Updated'] . '<br /><br />' . $message);
1433
		break;
947
		break;
1434
948
...
...
1477
		$template->assign_vars(array(
991
		$template->assign_vars(array(
1478
			'TOPIC_TYPES' => $topic_types,
992
			'TOPIC_TYPES' => $topic_types,
1479
			'TOPIC_COUNT' => ($forum_topics == '1') ? sprintf($lang['Mod_CP_topic_count'], $forum_topics) : sprintf($lang['Mod_CP_topics_count'], $forum_topics),
993
			'TOPIC_COUNT' => ($forum_topics == '1') ? sprintf($lang['Mod_CP_topic_count'], $forum_topics) : sprintf($lang['Mod_CP_topics_count'], $forum_topics),
1480
			'FORUM_NAME' => find_names($forum_id),
994
			'FORUM_NAME' => $mcp_topic->find_names($forum_id),
1481
			'SELECT_TITLE' => $select_title,
995
			'SELECT_TITLE' => $select_title,
1482
			'SELECT_NEWS_CATS' => $select_news_cats,
996
			'SELECT_NEWS_CATS' => $select_news_cats,
1483
997
...
...
1555
1069
1556
		$sql = "SELECT t.*, u.username, u.user_id, u.user_active, u.user_color, p.post_time, p.post_id, p.post_username, p.enable_smilies, u2.username AS
topic_starter, u2.user_id AS topic_starter_id, u2.user_active AS topic_starter_active, u2.user_color AS topic_starter_color, p2.post_id, p2.post_username AS
topic_starter_guest
1070
		$sql = "SELECT t.*, u.username, u.user_id, u.user_active, u.user_color, p.post_time, p.post_id, p.post_username, p.enable_smilies, u2.username AS
topic_starter, u2.user_id AS topic_starter_id, u2.user_active AS topic_starter_active, u2.user_color AS topic_starter_color, p2.post_id, p2.post_username AS
topic_starter_guest
1557
			FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " .
POSTS_TABLE . " p2
1071
			FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2, " .
POSTS_TABLE . " p2
1558
			WHERE t.forum_id = $forum_id
1072
			WHERE t.forum_id = " . $forum_id . "
1559
				AND p.poster_id = u.user_id
1073
				AND p.poster_id = u.user_id
1560
				AND t.topic_poster = u2.user_id
1074
				AND t.topic_poster = u2.user_id
1561
				AND p.post_id = t.topic_last_post_id
1075
				AND p.post_id = t.topic_last_post_id
1562
				AND p2.post_id = t.topic_first_post_id $where_type
1076
				AND p2.post_id = t.topic_first_post_id " . $where_type . "
1563
			ORDER BY t.topic_type DESC, p.post_time DESC LIMIT $start, " . $config['topics_per_page'];
1077
			ORDER BY t.topic_type DESC, p.post_time DESC LIMIT " . $start . ", " . $config['topics_per_page'];
1564
		$result = $db->sql_query($sql);
1078
		$result = $db->sql_query($sql);
1565
1079
1566
		$total_topics = 0;
1080
		$total_topics = 0;
...
...
1607
1121
1608
			$topic_link = $class_topics->build_topic_icon_link($forum_id, $topic_rowset[$i]['topic_id'], $topic_rowset[$i]['topic_type'],
$topic_rowset[$i]['topic_reg'], $topic_rowset[$i]['topic_replies'], $topic_rowset[$i]['news_id'], $topic_rowset[$i]['topic_vote'],
$topic_rowset[$i]['topic_status'], $topic_rowset[$i]['topic_moved_id'], $topic_rowset[$i]['post_time'], $user_replied, $replies, $is_unread);
1122
			$topic_link = $class_topics->build_topic_icon_link($forum_id, $topic_rowset[$i]['topic_id'], $topic_rowset[$i]['topic_type'],
$topic_rowset[$i]['topic_reg'], $topic_rowset[$i]['topic_replies'], $topic_rowset[$i]['news_id'], $topic_rowset[$i]['topic_vote'],
$topic_rowset[$i]['topic_status'], $topic_rowset[$i]['topic_moved_id'], $topic_rowset[$i]['post_time'], $user_replied, $replies, $is_unread);
1609
1123
1610
			$topic_id = $topic_link['topic_id'];
1124
			if (!$topic_rowset[$i]['topic_status'] == TOPIC_MOVED)
1125
			{
1126
				$topic_id = $topic_link['topic_id'];
1127
			}
1611
			$topic_id_append = $topic_link['topic_id_append'];
1128
			$topic_id_append = $topic_link['topic_id_append'];
1612
1129
1613
			if(($replies + 1) > $config['posts_per_page'])
1130
			if(($replies + 1) > $config['posts_per_page'])

Updated ip/trunk/privmsg.php Download diff

156157
596
	$user_id_from = $privmsg['user_id_1'];
596
	$user_id_from = $privmsg['user_id_1'];
597
	$username_to = colorize_username($privmsg['user_id_2'], $privmsg['username_2'], $privmsg['user_color_2'], $privmsg['user_active_2']);
597
	$username_to = colorize_username($privmsg['user_id_2'], $privmsg['username_2'], $privmsg['user_color_2'], $privmsg['user_active_2']);
598
	$user_id_to = $privmsg['user_id_2'];
598
	$user_id_to = $privmsg['user_id_2'];
599
600
	// Needed for attachments... do not remove!
601
	$template_to_parse = 'privmsgs_read_body.tpl';
602
	$template->set_filenames(array('body' => $template_to_parse));
599
	init_display_pm_attachments($privmsg['privmsgs_attachment']);
603
	init_display_pm_attachments($privmsg['privmsgs_attachment']);
600
604
601
	$post_date = create_date_ip($config['default_dateformat'], $privmsg['privmsgs_date'], $config['board_timezone']);
605
	$post_date = create_date_ip($config['default_dateformat'], $privmsg['privmsgs_date'], $config['board_timezone']);
...
...
786
		)
790
		)
787
	);
791
	);
788
792
789
	full_page_generation('privmsgs_read_body.tpl', $lang['Read_pm'], '', '');
793
	full_page_generation($template_to_parse, $lang['Read_pm'], '', '');
790
}
794
}
791
elseif (($delete && $mark_list) || $delete_all)
795
elseif (($delete && $mark_list) || $delete_all)
792
{
796
{

Updated ip/trunk/templates/default/blocks/news_block.tpl Download diff

156157
76
		</tr>
76
		</tr>
77
		<tr>
77
		<tr>
78
			<td class="cat" colspan="2">
78
			<td class="cat" colspan="2">
79
				<table class="empty-table" width="100%" cellspacing="0" cellpadding="0" border="0">
79
				<span style="float: right; text-align: right; padding-right: 5px; padding-top: 5px;"><!-- IF not S_BOT --><a href="{articles.U_POST_COMMENT}"><img src="{NEWS_REPLY_IMG}" alt="{L_REPLY_NEWS}" title="{L_REPLY_NEWS}" /></a>&nbsp;<a href="{articles.U_PRINT_TOPIC}" target="_blank"><img src="{NEWS_PRINT_IMG}" alt="{L_PRINT_NEWS}" title="{L_PRINT_NEWS}" /></a>&nbsp;<a href="{articles.U_EMAIL_TOPIC}"><img src="{NEWS_EMAIL_IMG}" alt="{L_EMAIL_NEWS}" title="{L_EMAIL_NEWS}" /></a><!-- ELSE -->&nbsp;<!-- ENDIF --></span>
80
				<tr>
80
				<div class="gensmall" style="text-align: left; padding-left: 5px; padding-top: 5px;">{L_NEWS_SUMMARY}&nbsp;<!-- IF S_ADMIN --><a href="{articles.U_VIEWS}"><!-- ENDIF --><b>{articles.COUNT_VIEWS}</b>&nbsp;{L_NEWS_VIEWS}<!-- IF S_ADMIN --></a><!-- ENDIF -->&nbsp;{L_NEWS_AND}&nbsp;<!-- IF not S_BOT --><a href="{INDEX_FILE}?{PORTAL_PAGE_ID}topic_id={articles.ID}" rel="nofollow" title="{articles.L_TITLE}"><!-- ENDIF --><b>{articles.COUNT_COMMENTS}</b>&nbsp;{L_NEWS_COMMENTS}<!-- IF not S_BOT --></a><!-- ENDIF --></div>
81
					<td align="left" class="content-padding">
82
						<span class="gensmall">{L_NEWS_SUMMARY}&nbsp;<!-- IF S_ADMIN --><a href="{articles.U_VIEWS}"><!-- ENDIF --><b>{articles.COUNT_VIEWS}</b>&nbsp;{L_NEWS_VIEWS}<!-- IF S_ADMIN --></a><!-- ENDIF -->&nbsp;{L_NEWS_AND}&nbsp;<!-- IF not S_BOT --><a href="{INDEX_FILE}?{PORTAL_PAGE_ID}topic_id={articles.ID}" rel="nofollow" title="{articles.L_TITLE}"><!-- ENDIF --><b>{articles.COUNT_COMMENTS}</b>&nbsp;{L_NEWS_COMMENTS}<!-- IF not S_BOT --></a><!-- ENDIF -->.</span>
83
					</td>
84
					<td align="right" style="padding-right:5px;"><!-- IF not S_BOT --><a href="{articles.U_POST_COMMENT}"><img src="{NEWS_REPLY_IMG}" alt="{L_REPLY_NEWS}" title="{L_REPLY_NEWS}" /></a>&nbsp;<a href="{articles.U_PRINT_TOPIC}" target="_blank"><img src="{NEWS_PRINT_IMG}" alt="{L_PRINT_NEWS}" title="{L_PRINT_NEWS}" /></a>&nbsp;<a href="{articles.U_EMAIL_TOPIC}"><img src="{NEWS_EMAIL_IMG}" alt="{L_EMAIL_NEWS}" title="{L_EMAIL_NEWS}" /></a><!-- ELSE -->&nbsp;<!-- ENDIF --></td>
85
				</tr>
86
				</table>
87
			</td>
81
			</td>
88
		</tr>
82
		</tr>
89
		</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}
83
		</table>{IMG_TFL}{IMG_TFC}{IMG_TFR}

Updated ip/trunk/templates/default/viewforum_body.tpl Download diff

156157
85
<!-- ENDIF -->
85
<!-- ENDIF -->
86
<tr>
86
<tr>
87
	<td class="cat" valign="middle" colspan="7">
87
	<td class="cat" valign="middle" colspan="7">
88
		<table class="empty-table" width="100%" cellspacing="0" cellpadding="0" border="0">
88
		<span class="genmed" style="float: right; text-align: right; vertical-align: middle; padding-right: 5px; padding-top: 5px;"><!-- IF S_TIMEZONE -->{S_TIMEZONE}<!-- ELSE -->&nbsp;<!-- ENDIF --></span>
89
		<tr>
89
		<div class="gensmall" style="text-align: left; padding-left: 5px; padding-top: 5px;">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></div>
90
			<td valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{L_DISPLAY_TOPICS}:</span></td>
91
			<td valign="middle" nowrap="nowrap">&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></td>
92
			<td valign="middle" align="right" width="100%"><span class="genmed">{S_TIMEZONE}&nbsp;</span></td>
93
		</tr>
94
		</table>
95
	</td>
90
	</td>
96
</tr>
91
</tr>
97
<!-- IF S_SHOW_ALPHA_BAR and not S_BOT -->
92
<!-- IF S_SHOW_ALPHA_BAR and not S_BOT -->

Updated ip/trunk/templates/default/viewforum_kb_body.tpl Download diff

156157
73
<!-- ENDIF -->
73
<!-- ENDIF -->
74
<tr>
74
<tr>
75
	<td class="cat" valign="middle" colspan="5">
75
	<td class="cat" valign="middle" colspan="5">
76
		<table class="empty-table" width="100%" cellspacing="0" cellpadding="0" border="0">
76
		<span class="genmed" style="float: right; text-align: right; vertical-align: middle; padding-right: 5px; padding-top: 5px;"><!-- IF S_TIMEZONE -->{S_TIMEZONE}<!-- ELSE -->&nbsp;<!-- ENDIF --></span>
77
		<tr>
77
		<div class="gensmall" style="text-align: left; padding-left: 5px; padding-top: 5px;">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></div>
78
			<td valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{L_DISPLAY_TOPICS}:</span></td>
79
			<td valign="middle" nowrap="nowrap">&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></td>
80
			<td valign="middle" align="right" width="100%"><span class="genmed">{S_TIMEZONE}&nbsp;</span></td>
81
		</tr>
82
		</table>
83
	</td>
78
	</td>
84
</tr>
79
</tr>
85
<!-- IF S_SHOW_ALPHA_BAR -->
80
<!-- IF S_SHOW_ALPHA_BAR -->

Updated ip/trunk/templates/icy_phoenix/icy_phoenix.cfg Download diff

156157
97
{
97
{
98
	$images['stats_image'] = $current_template_images . 'stats.png';
98
	$images['stats_image'] = $current_template_images . 'stats.png';
99
}
99
}
100
100
?>
101
?>

Updated ip/trunk/templates/icy_phoenix/style_gray.css Download diff

156157
399
}
399
}
400
400
401
.catBottom, .cat, .catLeft, .catRight {
401
.catBottom, .cat, .catLeft, .catRight {
402
	background: White url('images/gray/bg_catbottom.gif') top left repeat-x;
402
	background: #ffffff url('images/gray/bg_catbottom.gif') top left repeat-x;
403
	text-align: center;
403
	text-align: center;
404
	border: solid 1px #ffffff;
404
	border: solid 1px #ffffff;
405
	border-right-color: #dddddd;
405
	border-right-color: #dddddd;

Updated styles/prosilver_ip/viewforum_body.tpl Download diff

156157
88
<!-- ENDIF -->
88
<!-- ENDIF -->
89
<tr>
89
<tr>
90
	<td class="cat" valign="middle" colspan="7">
90
	<td class="cat" valign="middle" colspan="7">
91
		<table class="empty-table" width="100%" cellspacing="0" cellpadding="0" border="0">
91
		<span class="genmed" style="float: right; text-align: right; vertical-align: middle; padding-right: 5px; padding-top: 5px;"><!-- IF S_TIMEZONE -->{S_TIMEZONE}<!-- ELSE -->&nbsp;<!-- ENDIF --></span>
92
		<tr>
92
		<div class="gensmall" style="text-align: left; padding-left: 5px; padding-top: 5px;">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></div>
93
			<td valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{L_DISPLAY_TOPICS}:</span></td>
94
			<td valign="middle" nowrap="nowrap">&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></td>
95
			<td valign="middle" align="right" width="100%"><span class="genmed">{S_TIMEZONE}&nbsp;</span></td>
96
		</tr>
97
		</table>
98
	</td>
93
	</td>
99
</tr>
94
</tr>
100
<!-- IF S_SHOW_ALPHA_BAR and not S_BOT -->
95
<!-- IF S_SHOW_ALPHA_BAR and not S_BOT -->

Updated styles/prosilver_ip/viewforum_kb_body.tpl Download diff

156157
73
<!-- ENDIF -->
73
<!-- ENDIF -->
74
<tr>
74
<tr>
75
	<td class="cat" valign="middle" colspan="5">
75
	<td class="cat" valign="middle" colspan="5">
76
		<table class="empty-table" width="100%" cellspacing="0" cellpadding="0" border="0">
76
		<span class="genmed" style="float: right; text-align: right; vertical-align: middle; padding-right: 5px; padding-top: 5px;"><!-- IF S_TIMEZONE -->{S_TIMEZONE}<!-- ELSE -->&nbsp;<!-- ENDIF --></span>
77
		<tr>
77
		<div class="gensmall" style="text-align: left; padding-left: 5px; padding-top: 5px;">{L_DISPLAY_TOPICS}:&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></div>
78
			<td valign="middle" nowrap="nowrap"><span class="genmed">&nbsp;{L_DISPLAY_TOPICS}:</span></td>
79
			<td valign="middle" nowrap="nowrap">&nbsp;{S_SELECT_TOPIC_DAYS}&nbsp;<input type="submit" class="liteoption jumpbox" value="{L_GO}" name="submit" /></td>
80
			<td valign="middle" align="right" width="100%"><span class="genmed">{S_TIMEZONE}&nbsp;</span></td>
81
		</tr>
82
		</table>
83
	</td>
78
	</td>
84
</tr>
79
</tr>
85
<!-- IF S_SHOW_ALPHA_BAR -->
80
<!-- IF S_SHOW_ALPHA_BAR -->