root/ip/trunk/watched_topics.php

133159
132
132
133
			$topic_link = $class_topics->build_topic_icon_link($watch_rows[$i]['forum_id'], $watch_rows[$i]['topic_id'], $watch_rows[$i]['topic_type'],
$watch_rows[$i]['topic_reg'], $watch_rows[$i]['topic_replies'], $watch_rows[$i]['news_id'], $watch_rows[$i]['topic_vote'], $watch_rows[$i]['topic_status'],
$watch_rows[$i]['topic_moved_id'], $watch_rows[$i]['post_time'], $user_replied, $replies, $unread);
133
			$topic_link = $class_topics->build_topic_icon_link($watch_rows[$i]['forum_id'], $watch_rows[$i]['topic_id'], $watch_rows[$i]['topic_type'],
$watch_rows[$i]['topic_reg'], $watch_rows[$i]['topic_replies'], $watch_rows[$i]['news_id'], $watch_rows[$i]['topic_vote'], $watch_rows[$i]['topic_status'],
$watch_rows[$i]['topic_moved_id'], $watch_rows[$i]['post_time'], $user_replied, $replies, $unread);
134
134
135
			if(($replies + 1) > $config['posts_per_page'])
135
			$topic_pagination = generate_topic_pagination($forum_id, $topic_id, $replies);
136
			{
137
				$total_pages = ceil(($replies + 1) / $config['posts_per_page']);
138
				$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />&nbsp;' . $lang['Goto_page'] . ': ';
139
136
140
				$times = 1;
141
				for($j = 0; $j < $replies + 1; $j += $config['posts_per_page'])
142
				{
143
					$goto_page .= '<a href="' . append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&amp;' . $topic_id_append . '&amp;start=' . $j) . '"><b>' . $times . '</b></a>';
144
					if($times == 1 && $total_pages > 4)
145
					{
146
						$goto_page .= ' ... ';
147
						$times = $total_pages - 3;
148
						$j += ($total_pages - 4) * $config['posts_per_page'];
149
					}
150
					elseif ($times < $total_pages)
151
					{
152
						//$goto_page .= ', ';
153
						$goto_page .= ' ';
154
					}
155
					$times++;
156
				}
157
				$goto_page .= ' ] ';
158
			}
159
			else
160
			{
161
				$goto_page = '';
162
			}
163
			$row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];
137
			$row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];
164
			$template->assign_block_vars('topic_watch_row', array(
138
			$template->assign_block_vars('topic_watch_row', array(
165
				'ROW_CLASS' => $row_class,
139
				'ROW_CLASS' => $row_class,
...
...
185
				'FORUM_NAME' => $watch_rows[$i]['forum_name'],
159
				'FORUM_NAME' => $watch_rows[$i]['forum_name'],
186
				'TOPIC_POSTER' => $topic_poster,
160
				'TOPIC_POSTER' => $topic_poster,
187
				'LAST_POSTER' => $last_poster,
161
				'LAST_POSTER' => $last_poster,
188
				'GOTO_PAGE' => (($goto_page == '') ? '' : '<span class="gotopage">' . $goto_page . '</span>'),
162
				'GOTO_PAGE' => $topic_pagination['base'],
163
				'GOTO_PAGE_FULL' => $topic_pagination['full'],
189
164
190
				'U_VIEW_FORUM' => append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWFORUM . '?' . $forum_id_append),
165
				'U_VIEW_FORUM' => append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWFORUM . '?' . $forum_id_append),
191
				'U_VIEW_TOPIC' => append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&amp;' . $topic_id_append),
166
				'U_VIEW_TOPIC' => append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWTOPIC . '?' . $forum_id_append . '&amp;' . $topic_id_append),