Line 39 | Line 39 |
---|
if ($post_id) { $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=$post_id") . "#p$post_id";
|
if ($post_id) { $redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&p=$post_id") . "#p$post_id";
|
| $return_forum_url = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id");
|
$pm_id = 0; } else { $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=view&p=$pm_id");
|
$pm_id = 0; } else { $redirect_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=pm&mode=view&p=$pm_id");
|
| $return_forum_url = '';
|
$post_id = 0; $forum_id = 0; }
| $post_id = 0; $forum_id = 0; }
|
Line 101 | Line 103 |
---|
{ $message = $user->lang['ALREADY_REPORTED']; $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
{ $message = $user->lang['ALREADY_REPORTED']; $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
|
| $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $return_forum_url . '">', '</a>');
|
trigger_error($message); } }
| trigger_error($message); } }
|
Line 129 | Line 132 |
---|
trigger_error($message); } }
|
trigger_error($message); } }
|
| if ($config['enable_post_confirm'] && !$user->data['is_registered']) { include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']); $captcha->init(CONFIRM_REPORT); }
$error = array(); $s_hidden_fields = '';
|
// Submit report? if ($submit && $reason_id) {
|
// Submit report? if ($submit && $reason_id) {
|
| if (isset($captcha)) { $visual_confirmation_response = $captcha->validate(); if ($visual_confirmation_response) { $error[] = $visual_confirmation_response; } }
|
$sql = 'SELECT * FROM ' . REPORTS_REASONS_TABLE . " WHERE reason_id = $reason_id";
| $sql = 'SELECT * FROM ' . REPORTS_REASONS_TABLE . " WHERE reason_id = $reason_id";
|
Line 142 | Line 164 |
---|
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other')) {
|
if (!$row || (!$report_text && strtolower($row['reason_title']) == 'other')) {
|
trigger_error('EMPTY_REPORT');
| $error[] = $user->lang('EMPTY_REPORT'); }
if (!sizeof($error)) { if (isset($captcha)) { $captcha->reset();
|
}
$sql_ary = array(
| }
$sql_ary = array(
|
Line 209 | Line 238 |
---|
meta_refresh(3, $redirect_url);
$message = $lang_success . '<br /><br />' . sprintf($lang_return, '<a href="' . $redirect_url . '">', '</a>');
|
meta_refresh(3, $redirect_url);
$message = $lang_success . '<br /><br />' . sprintf($lang_return, '<a href="' . $redirect_url . '">', '</a>');
|
| if ($return_forum_url) { $message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . $return_forum_url . '">', '</a>'); }
|
trigger_error($message);
|
trigger_error($message);
|
| } else if (isset($captcha) && $captcha->is_solved() !== false) { $s_hidden_fields .= build_hidden_fields($captcha->get_hidden_fields()); }
|
}
// Generate the reasons display_reasons($reason_id);
$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
|
}
// Generate the reasons display_reasons($reason_id);
$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
|
| if (isset($captcha) && $captcha->is_solved() === false) { $template->assign_vars(array( 'S_CONFIRM_CODE' => true, 'CAPTCHA_TEMPLATE' => $captcha->get_template(), )); }
|
$template->assign_vars(array(
|
$template->assign_vars(array(
|
| 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
'S_REPORT_POST' => ($pm_id) ? false : true, 'REPORT_TEXT' => $report_text, 'S_REPORT_ACTION' => append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $post_id . '&pm=' . $pm_id),
|
'S_REPORT_POST' => ($pm_id) ? false : true, 'REPORT_TEXT' => $report_text, 'S_REPORT_ACTION' => append_sid("{$phpbb_root_path}report.$phpEx", 'f=' . $forum_id . '&p=' . $post_id . '&pm=' . $pm_id),
|
| 'S_HIDDEN_FIELDS' => (sizeof($s_hidden_fields)) ? $s_hidden_fields : null,
|
'S_NOTIFY' => $user_notify, 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false)
| 'S_NOTIFY' => $user_notify, 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false)
|