root/ip/tags/release_1_3_0_53/viewtopic.php
| 111 | 163 | ||
|---|---|---|---|
463 | $disp_folder = 'Download'; | 463 | $disp_folder = 'Download'; |
464 | } | 464 | } |
465 | 465 | ||
466 | $filename = $board_config['sitename'] . '_' . (ereg_replace("[^A-Za-z0-9]", "_", $post_subject)) . '_' . $disp_folder . '_' . date('Ymd', time()) . '.txt'; | 466 | $filename = ip_stripslashes($board_config['sitename']) . '_' . (ereg_replace("[^A-Za-z0-9]", "_", $post_subject)) . '_' . $disp_folder . '_' . gmdate('Ymd') . '.txt'; |
467 | header('Content-Type: text/x-delimtext; name="' . $filename . '"'); | 467 | header('Content-Type: text/x-delimtext; name="' . $filename . '"'); |
468 | header('Content-Disposition: attachment;filename="' . $filename . '"'); | 468 | header('Content-Disposition: attachment;filename="' . $filename . '"'); |
469 | header('Content-Transfer-Encoding: plain/text'); | 469 | header('Content-Transfer-Encoding: plain/text'); |
... | ... | ||
537 | $ftr_topic = $row['topic_number']; | 537 | $ftr_topic = $row['topic_number']; |
538 | $msg = $row['message']; | 538 | $msg = $row['message']; |
539 | InsertReadTopic($userdata['user_id']); | 539 | InsertReadTopic($userdata['user_id']); |
540 | redirect(append_sid(VIEWTOPIC_MG . '?' . POST_TOPIC_URL . '=' . $ftr_topic . $kb_mode_append_red . '&mode=reading'), true); | 540 | redirect(append_sid(VIEWTOPIC_MG . '?' . POST_TOPIC_URL . '=' . $ftr_topic . $kb_mode_append_red . '&mode=reading')); |
541 | } | 541 | } |
542 | else | 542 | else |
543 | { | 543 | { |
... | ... | ||
933 | { | 933 | { |
934 | $parse_extra_user_info = true; | 934 | $parse_extra_user_info = true; |
935 | // Query Styles | 935 | // Query Styles |
936 | $sql = "SELECT themes_id, style_name FROM " . THEMES_TABLE . " ORDER BY template_name, themes_id"; | 936 | $sql = "SELECT themes_id, style_name FROM " . THEMES_TABLE . " ORDER BY style_name, themes_id"; |
937 | if (!($result = $db->sql_query($sql, false, 'themes_'))) | 937 | if (!($result = $db->sql_query($sql, false, 'themes_'))) |
938 | { | 938 | { |
939 | message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); | 939 | message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); |
... | ... | ||
1906 | 1906 | ||
1907 | $poster_posts = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : ''; | 1907 | $poster_posts = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Posts'] . ': ' . $postrow[$i]['user_posts'] : ''; |
1908 | 1908 | ||
1909 | $poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : ''; | 1909 | $poster_from = ($postrow[$i]['user_from'] && ($postrow[$i]['user_id'] != ANONYMOUS)) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : ''; |
1910 | 1910 | ||
1911 | $poster_from_flag = ($postrow[$i]['user_from_flag'] && $postrow[$i]['user_id'] != ANONYMOUS) ? '<img src="images/flags/' . $postrow[$i]['user_from_flag'] . '" alt="' . $postrow[$i]['user_from_flag'] . '" title="' . $postrow[$i]['user_from'] . '" />' : ''; | 1911 | $poster_from_flag = ($postrow[$i]['user_from_flag'] && ($postrow[$i]['user_id'] != ANONYMOUS)) ? '<img src="images/flags/' . $postrow[$i]['user_from_flag'] . '" alt="' . $postrow[$i]['user_from_flag'] . '" title="' . $postrow[$i]['user_from'] . '" />' : ''; |
1912 | 1912 | ||
1913 | $poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ': ' . create_date($lang['JOINED_DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ''; | 1913 | $poster_joined = ($postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Joined'] . ': ' . create_date($lang['JOINED_DATE_FORMAT'], $postrow[$i]['user_regdate'], $board_config['board_timezone']) : ''; |
1914 | 1914 | ||
... | ... | ||
2176 | // End Advanced IP Tools Pack MOD | 2176 | // End Advanced IP Tools Pack MOD |
2177 | $ip = '<a href="' . $ip_url . '">' . $lang['View_IP'] . '</a>'; | 2177 | $ip = '<a href="' . $ip_url . '">' . $lang['View_IP'] . '</a>'; |
2178 | 2178 | ||
2179 | if (($board_config['allow_mods_edit_admin_posts'] == false) && ($postrow[$i]['user_level'] == ADMIN) && ($userdata['user_level'] != ADMIN)) | ||
2180 | { | ||
2181 | $delpost_url = ''; | ||
2182 | $delpost_img = ''; | ||
2183 | $delpost = ''; | ||
2184 | } | ||
2185 | else | ||
2186 | { | ||
2179 | $delpost_url = 'posting.' . PHP_EXT . '?mode=delete&' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' . $postrow[$i]['post_id'] . '&sid=' . $userdata['session_id']; | 2187 | $delpost_url = 'posting.' . PHP_EXT . '?mode=delete&' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' . $postrow[$i]['post_id'] . '&sid=' . $userdata['session_id']; |
2180 | $delpost_img = '<a href="' . $delpost_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" /></a>'; | 2188 | $delpost_img = '<a href="' . $delpost_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" /></a>'; |
2181 | $delpost = '<a href="' . $delpost_url . '">' . $lang['Delete_post'] . '</a>'; | 2189 | $delpost = '<a href="' . $delpost_url . '">' . $lang['Delete_post'] . '</a>'; |
2182 | } | 2190 | } |
2191 | } | ||
2183 | else | 2192 | else |
2184 | { | 2193 | { |
2185 | 2194 | if (($board_config['allow_mods_edit_admin_posts'] == false) && ($postrow[$i]['user_level'] == ADMIN) && ($userdata['user_level'] != ADMIN)) | |
2186 | if ($userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id']) | ||
2187 | { | 2195 | { |
2196 | $delpost_url = ''; | ||
2197 | $delpost_img = ''; | ||
2198 | $delpost = ''; | ||
2199 | } | ||
2200 | elseif (($userdata['user_id'] == $poster_id) && $is_auth['auth_delete'] && ($forum_topic_data['topic_last_post_id'] == $postrow[$i]['post_id'])) | ||
2201 | { | ||
2188 | $delpost_url = 'posting.' . PHP_EXT . '?mode=delete&' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' . $postrow[$i]['post_id'] . '&sid=' . $userdata['session_id']; | 2202 | $delpost_url = 'posting.' . PHP_EXT . '?mode=delete&' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' . $postrow[$i]['post_id'] . '&sid=' . $userdata['session_id']; |
2189 | $delpost_img = '<a href="' . $delpost_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" /></a>'; | 2203 | $delpost_img = '<a href="' . $delpost_url . '"><img src="' . $images['icon_delpost'] . '" alt="' . $lang['Delete_post'] . '" title="' . $lang['Delete_post'] . '" /></a>'; |
2190 | $delpost = '<a href="' . $delpost_url . '">' . $lang['Delete_post'] . '</a>'; | 2204 | $delpost = '<a href="' . $delpost_url . '">' . $lang['Delete_post'] . '</a>'; |
... | ... | ||
2351 | if ($board_config['enable_quick_quote'] == true) | 2365 | if ($board_config['enable_quick_quote'] == true) |
2352 | { | 2366 | { |
2353 | $look_up_array = array( | 2367 | $look_up_array = array( |
2354 | "\"", | 2368 | '\"', |
2369 | '"', | ||
2355 | "<", | 2370 | "<", |
2356 | ">", | 2371 | ">", |
2357 | "\n", | 2372 | "\n", |
... | ... | ||
2359 | ); | 2374 | ); |
2360 | 2375 | ||
2361 | $replacement_array = array( | 2376 | $replacement_array = array( |
2362 | "\\\"", | 2377 | '&q_mg;', |
2378 | '\"', | ||
2363 | "<_mg;", | 2379 | "<_mg;", |
2364 | ">_mg;", | 2380 | ">_mg;", |
2365 | "\\n", | 2381 | "\\n", |
... | ... | ||
2612 | $post_id = $postrow[$i]['post_id']; | 2628 | $post_id = $postrow[$i]['post_id']; |
2613 | $poster_number = ($postrow[$i]['poster_id'] == ANONYMOUS) ? '' : $lang['User_Number'] . ': ' . $postrow[$i]['poster_id']; | 2629 | $poster_number = ($postrow[$i]['poster_id'] == ANONYMOUS) ? '' : $lang['User_Number'] . ': ' . $postrow[$i]['poster_id']; |
2614 | $post_edit_link = append_sid('edit_post_details.' . PHP_EXT . '?' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' .
$postrow[$i]['post_id']); | 2630 | $post_edit_link = append_sid('edit_post_details.' . PHP_EXT . '?' . $forum_id_append . '&' . $topic_id_append . '&' . POST_POST_URL . '=' .
$postrow[$i]['post_id']); |
2631 | $post_edit_string_short = ($userdata['user_level'] == ADMIN) ? ('<a href="#" onclick="post_time_edit(\'' . $post_edit_link . '\'); return
false;" style="text-decoration: none;" title="' . $lang['Edit_post_time_xs'] . '">' . $post_date . '</a>') : ''; | ||
2615 | $post_edit_string = ($userdata['user_level'] == ADMIN) ? ('<a href="#" onclick="post_time_edit(\'' . $post_edit_link . '\'); return
false;" style="text-decoration: none;" title="' . $lang['Edit_post_time_xs'] . '">' . $lang['Edit_post_time_xs'] . '</a>') :
''; | 2632 | $post_edit_string = ($userdata['user_level'] == ADMIN) ? ('<a href="#" onclick="post_time_edit(\'' . $post_edit_link . '\'); return
false;" style="text-decoration: none;" title="' . $lang['Edit_post_time_xs'] . '">' . $lang['Edit_post_time_xs'] . '</a>') :
''; |
2616 | //$post_edit_string = (!$userdata['user_level'] == MOD || !$userdata['user_level'] == ADMIN) ? '' : '<a href="javascript:post_time_edit(' . $topic_id . ', ' . $post_id . ')" style="text-decoration:none;">' . $lang['Edit_post_time_xs']. '</a>'; | ||
2617 | $single_post = '<a href="#_Single_Post_View" onclick="open_postreview(\'show_post.' . PHP_EXT . '?' . POST_POST_URL . '=' . intval($post_id) . '\'); return false;" style="text-decoration: none;">#' . ($i + 1 + $start) . '</a>'; | 2633 | $single_post = '<a href="#_Single_Post_View" onclick="open_postreview(\'show_post.' . PHP_EXT . '?' . POST_POST_URL . '=' . intval($post_id) . '\'); return false;" style="text-decoration: none;">#' . ($i + 1 + $start) . '</a>'; |
2618 | 2634 | ||
2619 | // Mighty Gorgon - Feedbacks - BEGIN | 2635 | // Mighty Gorgon - Feedbacks - BEGIN |
... | ... | ||
2668 | 'POSTER_AVATAR' => $poster_avatar, | 2684 | 'POSTER_AVATAR' => $poster_avatar, |
2669 | 'POST_DATE' => $post_date, | 2685 | 'POST_DATE' => $post_date, |
2670 | 'POST_EDIT_STRING' => $post_edit_string, | 2686 | 'POST_EDIT_STRING' => $post_edit_string, |
2687 | 'POST_EDIT_STRING_SHORT' => $post_edit_string_short, | ||
2671 | //'POST_EDIT_LINK' => $post_edit_link, | 2688 | //'POST_EDIT_LINK' => $post_edit_link, |
2672 | 'POST_SUBJECT' => $post_subject, | 2689 | 'POST_SUBJECT' => $post_subject, |
2673 | 'MESSAGE' => $message, | 2690 | 'MESSAGE' => $message, |
Download diff