root/ip/trunk/modcp.php

157159
1127
			}
1127
			}
1128
			$topic_id_append = $topic_link['topic_id_append'];
1128
			$topic_id_append = $topic_link['topic_id_append'];
1129
1129
1130
			if(($replies + 1) > $config['posts_per_page'])
1130
			$topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies);
1131
			{
1132
				$total_pages = ceil(($replies + 1) / $config['posts_per_page']);
1133
				$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />&nbsp;' . $lang['Goto_page'] . ': ';
1134
1131
1135
				$times = 1;
1136
				for($j = 0; $j < $replies + 1; $j += $config['posts_per_page'])
1137
				{
1138
					$goto_page .= '<a href="' . append_sid(CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&amp;' . $topic_id_append . '&amp;start=' . $j) . '"><b>' . $times . '</b></a>';
1139
					if(($times == 1) && ($total_pages > 4))
1140
					{
1141
						$goto_page .= ' ... ';
1142
						$times = $total_pages - 3;
1143
						$j += ($total_pages - 4) * $config['posts_per_page'];
1144
					}
1145
					elseif ($times < $total_pages)
1146
					{
1147
						//$goto_page .= ', ';
1148
						$goto_page .= ' ';
1149
					}
1150
					$times++;
1151
				}
1152
				$goto_page .= ' ] ';
1153
			}
1154
			else
1155
			{
1156
				$goto_page = '';
1157
			}
1158
1159
			$first_post_time = create_date_ip($config['default_dateformat'], $topic_rowset[$i]['topic_time'], $config['board_timezone']);
1132
			$first_post_time = create_date_ip($config['default_dateformat'], $topic_rowset[$i]['topic_time'], $config['board_timezone']);
1160
			//$first_post_author = ($topic_rowset[$i]['topic_starter_id'] == ANONYMOUS) ? (($topic_rowset[$i]['topic_starter_guest'] != '') ?
$topic_rowset[$i]['topic_starter_guest'] . ' ' : $lang['Guest'] . ' ') : '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' .
POST_USERS_URL . '=' . $topic_rowset[$i]['topic_starter_id']) . '">' . $topic_rowset[$i]['topic_starter'] . '</a> ';
1133
			//$first_post_author = ($topic_rowset[$i]['topic_starter_id'] == ANONYMOUS) ? (($topic_rowset[$i]['topic_starter_guest'] != '') ?
$topic_rowset[$i]['topic_starter_guest'] . ' ' : $lang['Guest'] . ' ') : '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' .
POST_USERS_URL . '=' . $topic_rowset[$i]['topic_starter_id']) . '">' . $topic_rowset[$i]['topic_starter'] . '</a> ';
1161
			$first_post_author =  colorize_username($topic_rowset[$i]['topic_starter_id'], $topic_rowset[$i]['topic_starter'], $topic_rowset[$i]['topic_starter_color'],
$topic_rowset[$i]['topic_starter_active']);
1134
			$first_post_author =  colorize_username($topic_rowset[$i]['topic_starter_id'], $topic_rowset[$i]['topic_starter'], $topic_rowset[$i]['topic_starter_color'],
$topic_rowset[$i]['topic_starter_active']);
...
...
1184
				'TOPIC_CLASS' => (!empty($topic_link['class_new']) ? ('topiclink' . $topic_link['class_new']) : $topic_link['class']),
1157
				'TOPIC_CLASS' => (!empty($topic_link['class_new']) ? ('topiclink' . $topic_link['class_new']) : $topic_link['class']),
1185
				'CLASS_NEW' => $topic_link['class_new'],
1158
				'CLASS_NEW' => $topic_link['class_new'],
1186
				'NEWEST_POST_IMG' => $topic_link['newest_post_img'],
1159
				'NEWEST_POST_IMG' => $topic_link['newest_post_img'],
1187
				'GOTO_PAGE' => (($goto_page == '') ? '' : '<span class="gotopage">' . $goto_page . '</span>'),
1160
				'GOTO_PAGE' => $topic_pagination['base'],
1161
				'GOTO_PAGE_FULL' => $topic_pagination['full'],
1188
				'REPLIES' => $replies,
1162
				'REPLIES' => $replies,
1189
				'VIEWS' => $topic_rowset[$i]['topic_views'],
1163
				'VIEWS' => $topic_rowset[$i]['topic_views'],
1190
				'FIRST_POST_URL' => $first_post_url,
1164
				'FIRST_POST_URL' => $first_post_url,