Экспорт. Коммит №25. Мелочи. _Xz_. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@27 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
glix08 2011-06-27 21:43:42 +00:00
commit eb40e707cb
17 changed files with 165 additions and 164 deletions

View file

@ -28,7 +28,7 @@ $template->assign_var('S_REPORT_ACTION', append_sid("admin_reports.php"));
if (isset($_POST['mode']) || isset($_GET['mode']))
{
$mode = (isset($_POST['mode'])) ? $_POST['mode'] : $_GET['mode'];
//
// allow multiple modes (we need this for sub-modes, e.g. the report reasons)
//
@ -56,17 +56,17 @@ if ($mode == 'config')
if (isset($_POST['submit']))
{
$config_update = (isset($_POST['bb_cfg'])) ? $_POST['bb_cfg'] : array();
bb_update_config($config_update);
report_modules_cache_clean();
message_die(GENERAL_MESSAGE, $lang['REPORT_CONFIG_UPDATED'] . $return_links['config'] . $return_links['index']);
}
else
{
{
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => '<input type="hidden" name="mode" value="config" />',
'REPORT_SUBJECT_AUTH_ON' => ($bb_cfg['report_subject_auth']) ? ' checked="checked"' : '',
'REPORT_SUBJECT_AUTH_OFF' => (!$bb_cfg['report_subject_auth']) ? ' checked="checked"' : '',
'REPORT_MODULES_CACHE_ON' => ($bb_cfg['report_modules_cache']) ? ' checked="checked"' : '',
@ -78,7 +78,7 @@ if ($mode == 'config')
'REPORT_LIST_ADMIN_OFF' => (!$bb_cfg['report_list_admin']) ? ' checked="checked"' : '',
'REPORT_NEW_WINDOW_ON' => ($bb_cfg['report_new_window']) ? ' checked="checked"' : '',
'REPORT_NEW_WINDOW_OFF' => (!$bb_cfg['report_new_window']) ? ' checked="checked"' : '',
'L_CONFIGURATION_TITLE' => $lang['REPORTS'] . ': ' . $lang['CONFIGURATION'],
'L_CONFIGURATION_EXPLAIN' => $lang['REPORT_CONFIG_EXPLAIN'])
);
@ -89,12 +89,12 @@ if ($mode == 'config')
else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$module_id = (isset($_POST[POST_CAT_URL])) ? (int) $_POST[POST_CAT_URL] : (int) $_GET[POST_CAT_URL];
if (!$report_module = report_modules('id', $module_id))
{
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_NOT_EXISTS'] . $return_links['admin'] . $return_links['index']);
}
switch ($mode)
{
//
@ -105,14 +105,14 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$module_notify = (isset($_POST['report_module_notify']) && $_POST['report_module_notify'] == 1) ? 1 : 0;
$module_prune = (isset($_POST['report_module_prune'])) ? (int) $_POST['report_module_prune'] : $report_module->data['report_module_prune'];
$auth_write = (isset($_POST['auth_write'])) ? (int) $_POST['auth_write'] : $report_module->data['auth_write'];
$auth_view = (isset($_POST['auth_view'])) ? (int) $_POST['auth_view'] : $report_module->data['auth_view'];
$auth_notify = (isset($_POST['auth_notify'])) ? (int) $_POST['auth_notify'] : $report_module->data['auth_notify'];
$auth_delete = (isset($_POST['auth_delete'])) ? (int) $_POST['auth_delete'] : $report_module->data['auth_delete'];
report_module_edit($module_id, $module_notify, $module_prune, $auth_write, $auth_view, $auth_notify, $auth_delete);
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_EDITED'] . $return_links['admin'] . $return_links['index']);
}
else if (isset($_POST['cancel']))
@ -126,13 +126,13 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $hidden_fields,
'MODULE_TITLE' => $module_info['title'],
'MODULE_EXPLAIN' => $module_info['explain'],
'MODULE_NOTIFY_ON' => ($report_module->data['report_module_notify']) ? ' checked="checked"' : '',
'MODULE_NOTIFY_OFF' => (!$report_module->data['report_module_notify']) ? ' checked="checked"' : '',
'MODULE_PRUNE' => $report_module->data['report_module_prune'],
'L_EDIT_MODULE' => $lang['EDIT_REPORT_MODULE'],
'L_AUTH_WRITE' => $lang['WRITE'],
'L_AUTH_VIEW' => $lang['VIEW'],
@ -141,7 +141,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
'L_AUTH_DELETE' => $lang['DELETE'],
'L_AUTH_DELETE_EXPLAIN' => $lang['REPORT_AUTH_DELETE_EXPLAIN'])
);
//
// Authorisation selects
//
@ -152,34 +152,34 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
print_page('report_module_edit_body.tpl');
break;
//
// Report reasons
//
case 'reasons':
$reason_mode = (isset($modes[1])) ? $modes[1] : '';
$temp_url = append_sid("admin_reports.php?mode=reasons&amp;" . POST_CAT_URL . "=$module_id");
$return_links['reasons'] = '<br /><br />' . sprintf($lang['CLICK_RETURN_REPORT_REASONS'], '<a href="' . $temp_url . '">', '</a>');
$redirect_url = append_sid("admin/admin_reports.php?mode=reasons&" . POST_CAT_URL . "=$module_id", true);
if (isset($_POST[POST_REPORT_REASON_URL]) || isset($_GET[POST_REPORT_REASON_URL]))
{
$reason_id = (isset($_POST[POST_REPORT_REASON_URL])) ? (int) $_POST[POST_REPORT_REASON_URL] : (int) $_GET[POST_REPORT_REASON_URL];
switch ($reason_mode)
{
{
//
// Edit reason
//
case 'edit':
$errors = array();
if (isset($_POST['submit']))
{
$reason_desc = (isset($_POST['report_reason_desc'])) ? htmlspecialchars($_POST['report_reason_desc']) : '';
//
// Validate reason desc
//
@ -187,13 +187,13 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$errors[] = $lang['REASON_DESC_EMPTY'];
}
if (empty($errors))
{
$reason_desc = str_replace("\'", "'", $reason_desc);
report_reason_edit($reason_id, $module_id, $reason_desc);
message_die(GENERAL_MESSAGE, $lang['REPORT_REASON_EDITED'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
}
}
@ -215,25 +215,25 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
);
}
}
if (!$report_reason = report_reason_obtain($reason_id))
{
message_die(GENERAL_MESSAGE, $lang['REPORT_REASON_NOT_EXISTS'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
}
if (isset($reason_desc))
{
$report_reason['report_reason_desc'] = stripslashes($reason_desc);
}
$hidden_fields = '<input type="hidden" name="mode[]" value="reasons" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $module_id . '" />';
$hidden_fields .= '<input type="hidden" name="mode[]" value="edit" /><input type="hidden" name="' . POST_REPORT_REASON_URL . '" value="' . $reason_id . '" />';
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $hidden_fields,
'REASON_DESC' => $report_reason['report_reason_desc'],
'L_EDIT_REASON' => $lang['EDIT_REASON'],
'L_REASON_DESC' => $lang['FORUM_DESC'],
'L_REASON_DESC_EXPLAIN' => $lang['REASON_DESC_EXPLAIN'],
@ -243,17 +243,17 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
print_page('report_reason_edit_body.tpl');
break;
//
// Move reason up/down
//
case 'up':
case 'down':
report_reason_move($reason_mode, $reason_id);
redirect($redirect_url);
break;
//
// Delete reason
//
@ -261,7 +261,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
if (isset($_POST['confirm']))
{
report_reason_delete($reason_id);
message_die(GENERAL_MESSAGE, $lang['REPORT_REASON_DELETED'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
}
else if (isset($_POST['cancel']))
@ -271,21 +271,15 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
$hidden_fields = '<input type="hidden" name="mode[]" value="reasons" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $module_id . '" />';
$hidden_fields .= '<input type="hidden" name="mode[]" value="delete" /><input type="hidden" name="' . POST_REPORT_REASON_URL . '" value="' . $reason_id . '" />';
$template->assign_vars(array(
'S_CONFIRM_ACTION' => append_sid("admin_reports.php"),
'S_HIDDEN_FIELDS' => $hidden_fields,
'MESSAGE_TITLE' => $lang['DELETE_REASON'],
'MESSAGE_TEXT' => $lang['DELETE_REPORT_REASON_EXPLAIN'],
'L_YES' => $lang['YES'],
'L_NO' => $lang['NO'])
);
print_page('confirm_body.tpl');
print_confirmation(array(
'CONFIRM_TITLE' => $lang['DELETE_REASON'],
'QUESTION' => $lang['DELETE_REPORT_REASON_EXPLAIN'],
'FORM_ACTION' => "admin_reports.php",,
'HIDDEN_FIELDS' => $hidden_fields,
));
break;
default:
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
break;
@ -300,11 +294,11 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
//
case 'add':
$errors = array();
if (isset($_POST['submit']))
{
$reason_desc = (isset($_POST['report_reason_desc'])) ? htmlspecialchars($_POST['report_reason_desc']) : '';
//
// Validate reason desc
//
@ -312,13 +306,13 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$errors[] = $lang['REASON_DESC_EMPTY'];
}
if (empty($errors))
{
$reason_desc = str_replace("\'", "'", $reason_desc);
report_reason_insert($module_id, $reason_desc);
message_die(GENERAL_MESSAGE, $lang['REPORT_REASON_ADDED'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
}
}
@ -340,22 +334,22 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
);
}
}
$hidden_fields = '<input type="hidden" name="mode[]" value="reasons" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $module_id . '" />';
$hidden_fields .= '<input type="hidden" name="mode[]" value="add" />';
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $hidden_fields,
'REASON_DESC' => (isset($reason_desc)) ? stripslashes($reason_desc) : '',
'L_EDIT_REASON' => $lang['ADD_REASON'],
'L_REASON_DESC' => $lang['FORUM_DESC'])
);
print_page('report_reason_edit_body.tpl');
break;
case '':
if ($report_reasons = $report_module->reasons_obtain())
@ -364,7 +358,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$template->assign_block_vars('report_reasons', array(
'DESC' => $reason_desc,
'U_EDIT' => append_sid("admin_reports.php?mode[]=reasons&amp;" . POST_CAT_URL . "=$module_id&amp;mode[]=edit&amp;" . POST_REPORT_REASON_URL . "=$reason_id"),
'U_MOVE_UP' => append_sid("admin_reports.php?mode[]=reasons&amp;" . POST_CAT_URL . "=$module_id&amp;mode[]=up&amp;" . POST_REPORT_REASON_URL . "=$reason_id"),
'U_MOVE_DOWN' => append_sid("admin_reports.php?mode[]=reasons&amp;" . POST_CAT_URL . "=$module_id&amp;mode[]=down&amp;" . POST_REPORT_REASON_URL . "=$reason_id"),
@ -376,7 +370,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
$template->assign_block_vars('switch_no_reasons', array());
}
$template->assign_vars(array(
'U_ADD_REASON' => append_sid("admin_reports.php?mode[]=reasons&amp;" . POST_CAT_URL . "=$module_id&amp;mode[]=add"),
'U_MODULES' => append_sid("admin_reports.php"))
@ -384,24 +378,24 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
print_page('report_module_reasons_body.tpl');
break;
default:
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['reasons'] . $return_links['admin'] . $return_links['index']);
break;
}
}
break;
//
// Move module up/down
//
case 'up':
case 'down':
report_module_move($mode, $module_id);
redirect($redirect_url);
break;
//
// Synchronize module
//
@ -410,12 +404,12 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
{
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['admin'] . $return_links['index']);
}
$report_module->sync();
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_SYNCED'] . $return_links['admin'] . $return_links['index']);
break;
//
// Uninstall module
//
@ -423,7 +417,7 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
if (isset($_POST['confirm']))
{
report_module_uninstall($module_id);
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_UNINSTALLED'] . $return_links['admin'] . $return_links['index']);
}
else if (isset($_POST['cancel']))
@ -432,18 +426,15 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
}
$hidden_fields = '<input type="hidden" name="mode" value="uninstall" /><input type="hidden" name="' . POST_CAT_URL . '" value="' . $module_id . '" />';
$template->assign_vars(array(
'S_CONFIRM_ACTION' => append_sid("admin_reports.php"),
'S_HIDDEN_FIELDS' => $hidden_fields,
'MESSAGE_TITLE' => $lang['UNINSTALL_REPORT_MODULE'],
'MESSAGE_TEXT' => $lang['UNINSTALL_REPORT_MODULE_EXPLAIN'])
);
print_page('confirm_body.tpl');
print_confirmation(array(
'CONFIRM_TITLE' => $lang['UNINSTALL_REPORT_MODULE'],
'QUESTION' => $lang['UNINSTALL_REPORT_MODULE_EXPLAIN'],
'FORM_ACTION' => "admin_reports.php",,
'HIDDEN_FIELDS' => $hidden_fields,
));
break;
default:
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['admin'] . $return_links['index']);
break;
@ -452,12 +443,12 @@ else if (isset($_POST[POST_CAT_URL]) || isset($_GET[POST_CAT_URL]))
else if (isset($_POST['module']) || isset($_GET['module']))
{
$module_name = (isset($_POST['module'])) ? stripslashes($_POST['module']) : stripslashes($_GET['module']);
if (!$report_module = report_modules_inactive('name', $module_name))
{
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_NOT_EXISTS'] . $return_links['admin'] . $return_links['index']);
}
switch ($mode)
{
//
@ -468,14 +459,14 @@ else if (isset($_POST['module']) || isset($_GET['module']))
{
$module_notify = (isset($_POST['report_module_notify']) && $_POST['report_module_notify'] == 1) ? 1 : 0;
$module_prune = (isset($_POST['report_module_prune'])) ? (int) $_POST['report_module_prune'] : 0;
$auth_write = (isset($_POST['auth_write'])) ? (int) $_POST['auth_write'] : REPORT_AUTH_USER;
$auth_view = (isset($_POST['auth_view'])) ? (int) $_POST['auth_view'] : REPORT_AUTH_MOD;
$auth_notify = (isset($_POST['auth_notify'])) ? (int) $_POST['auth_notify'] : REPORT_AUTH_MOD;
$auth_delete = (isset($_POST['auth_delete'])) ? (int) $_POST['auth_delete'] : REPORT_AUTH_ADMIN;
report_module_install($module_notify, $module_prune, $module_name, $auth_write, $auth_view, $auth_notify, $auth_delete, false);
message_die(GENERAL_MESSAGE, $lang['REPORT_MODULE_INSTALLED'] . $return_links['admin'] . $return_links['index']);
}
else if (isset($_POST['cancel']))
@ -484,18 +475,18 @@ else if (isset($_POST['module']) || isset($_GET['module']))
}
$module_info = $report_module->info();
$hidden_fields = '<input type="hidden" name="mode" value="install" /><input type="hidden" name="module" value="' . htmlspecialchars($module_name) . '" />';
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => $hidden_fields,
'MODULE_TITLE' => $module_info['title'],
'MODULE_EXPLAIN' => $module_info['explain'],
'MODULE_NOTIFY_ON' => ($bb_cfg['report_notify']) ? ' checked="checked"' : '',
'MODULE_NOTIFY_OFF' => (!$bb_cfg['report_notify']) ? ' checked="checked"' : '',
'MODULE_PRUNE' => 0,
'L_EDIT_MODULE' => $lang['INSTALL_REPORT_MODULE'],
'L_AUTH_WRITE' => $lang['WRITE'],
'L_AUTH_VIEW' => $lang['VIEW'],
@ -504,7 +495,7 @@ else if (isset($_POST['module']) || isset($_GET['module']))
'L_AUTH_DELETE' => $lang['DELETE'],
'L_AUTH_DELETE_EXPLAIN' => $lang['REPORT_AUTH_DELETE_EXPLAIN'])
);
//
// Authorisation selects
//
@ -515,7 +506,7 @@ else if (isset($_POST['module']) || isset($_GET['module']))
print_page('report_module_edit_body.tpl');
break;
default:
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['admin'] . $return_links['index']);
break;
@ -531,14 +522,14 @@ else
$template->assign_vars(array(
'L_REPORTS_TITLE' => $lang['REPORTS'] . ': ' . $lang['MODULES_REASONS'],
'L_REPORTS_EXPLAIN' => $lang['REPORT_ADMIN_EXPLAIN'],
'L_REPORT_COUNT' => $lang['REPORTS'],
'L_INSTALL' => $lang['INSTALL2'])
);
$report_counts = report_counts_obtain();
$report_reason_counts = report_reason_counts_obtain();
//
// Display installed modules
//
@ -547,14 +538,14 @@ else
{
$report_module =& $report_modules[$report_module_id];
$module_info = $report_module->info();
$template->assign_block_vars('installed_modules.modules', array(
'L_REASONS' => sprintf($lang['REASONS'], $report_reason_counts[$report_module->id]),
'MODULE_TITLE' => $module_info['title'],
'MODULE_EXPLAIN' => $module_info['explain'],
'REPORT_COUNT' => $report_counts[$report_module->id],
'U_EDIT' => append_sid("admin_reports.php?mode=edit&amp;" . POST_CAT_URL . '=' . $report_module->id),
'U_REASONS' => append_sid("admin_reports.php?mode=reasons&amp;" . POST_CAT_URL . '=' . $report_module->id),
'U_MOVE_UP' => append_sid("admin_reports.php?mode=up&amp;" . POST_CAT_URL . '=' . $report_module->id),
@ -562,7 +553,7 @@ else
'U_SYNC' => append_sid("admin_reports.php?mode=sync&amp;" . POST_CAT_URL . '=' . $report_module->id),
'U_UNINSTALL' => append_sid("admin_reports.php?mode=uninstall&amp;" . POST_CAT_URL . '=' . $report_module->id))
);
//
// Display sync option if available
//
@ -571,14 +562,14 @@ else
$template->assign_block_vars('installed_modules.modules.switch_sync', array());
}
}
if (empty($report_modules))
{
$template->assign_block_vars('installed_modules.switch_no_modules', array());
}
$report_modules_inactive = report_modules_inactive();
//
// Display inactive modules
//
@ -587,16 +578,16 @@ else
{
$report_module =& $report_modules_inactive[$key];
$module_info = $report_module->info();
$template->assign_block_vars('inactive_modules.modules', array(
'MODULE_TITLE' => $module_info['title'],
'MODULE_EXPLAIN' => $module_info['explain'],
'REPORT_COUNT' => '-',
'U_INSTALL' => append_sid("admin_reports.php?mode=install&amp;module=" . $report_module->data['module_name']))
);
}
if (empty($report_modules_inactive))
{
$template->assign_block_vars('inactive_modules.switch_no_modules', array());
@ -604,7 +595,7 @@ else
print_page('report_modules_body.tpl');
break;
default:
message_die(GENERAL_MESSAGE, $lang['REPORT_NOT_SUPPORTED'] . $return_links['admin'] . $return_links['index']);
break;

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

View file

@ -206,7 +206,7 @@ $template->assign_vars(array(
'LOGGED_IN' => $logged_in,
'SESSION_USER_ID' => $userdata['user_id'],
'THIS_USERNAME' => $userdata['username'],
'AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], $userdata['user_allowavatar']),
'THIS_AVATAR' => get_avatar($userdata['user_avatar'], $userdata['user_avatar_type'], $userdata['user_allowavatar']),
'SHOW_LOGIN_LINK' => !defined('IN_LOGIN'),
'AUTOLOGIN_DISABLED' => !$bb_cfg['allow_autologin'],
'S_LOGIN_ACTION' => BB_ROOT ."login.php",

View file

@ -28,6 +28,7 @@ class user_common
'h_sig' => 0, // hide signatures
'sp_op' => 0, // show spoiler opened
'tr_t_ax' => 0, // ajax open topics
'tr_t_t' => 0, // show time of the creation topics
);
/**

View file

@ -684,7 +684,7 @@ if ($submit && !$errors)
}
else
{
$die_msg = 'Спасибо за регистрацию, учётная запись была создана<br /><br />Вы можете войти в систему, используя ваше имя и пароль';
$die_msg = $lang['ACCOUNT_ADDED'];
}
bb_die($die_msg);
}
@ -715,7 +715,7 @@ if ($submit && !$errors)
}
else
{
bb_die('Ничего не было изменено');
bb_die($lang['NOTHING_HAS_CHANGED']);
}
}
}
@ -723,7 +723,7 @@ if ($submit && !$errors)
$template->assign_vars($tp_data);
$template->assign_vars(array(
'PAGE_TITLE' => ($mode == 'editprofile') ? 'Редактирование профиля'. ($adm_edit ? " :: {$pr_data['username']}" : '') : 'Регистрация',
'PAGE_TITLE' => ($mode == 'editprofile') ? $lang['EDIT_PROFILE'] . ($adm_edit ? " :: {$pr_data['username']}" : '') : $lang['REGISTER'],
'SHOW_REG_AGREEMENT' => ($mode == 'register' && !IS_ADMIN),
'ERROR_MESSAGE' => ($errors) ? join('<br />', $errors) : '',
'MODE' => $mode,

View file

@ -121,7 +121,7 @@ $lang['SEARCH_LATEST'] = 'latest';
$lang['REGISTER'] = 'Register';
$lang['PROFILE'] = 'Profile';
$lang['EDIT_PROFILE'] = 'Edit your profile';
$lang['EDIT_PROFILE'] = 'Edit profile';
$lang['SEARCH'] = 'Search';
$lang['MEMBERLIST'] = 'Memberlist';
$lang['FAQ'] = 'FAQ';
@ -131,6 +131,7 @@ $lang['LASTPOST'] = 'Last Post';
$lang['MODERATOR'] = 'Moderator';
$lang['MODERATORS'] = 'Moderators';
$lang['TERMS'] = 'Terms';
$lang['NOTHING_HAS_CHANGED'] = 'Nothing has changed';
//
// Stats block text
@ -1183,7 +1184,7 @@ $lang['UNSET_GOLD_TORRENT'] = 'UnMake gold';
$lang['SET_SILVER_TORRENT'] = 'Make silver';
$lang['UNSET_SILVER_TORRENT'] = 'UnMake gold';
$lang['GOLD_STATUS'] = 'GOLD TORRENT! DOWNLOAD TRAFFIC DOES NOT CONSIDER!';
$lang['SILVER_STATUS'] = 'SILVER TORRENT! DOWNLOAD TRAFFIC PARTIALLY CONSIDERED!';
$lang['SILVER_STATUS'] = 'SILVER TORRENT! DOWNLOAD TRAFFIC PARTIALLY CONSIDERED!';
// End - Gold/Silver releases
$lang['SEARCH_IN_FORUMS'] = 'Search in Forums';
@ -1265,9 +1266,9 @@ $lang['VIEWING_USER_BT_PROFILE'] = 'Viewing torrent-profile :: %s'; // %s is use
$lang['CUR_ACTIVE_DLS'] = 'Currently active torrents';
$lang['VIEW_TORRENT_PROFILE'] = 'Torrent-profile';
$lang['PROFILE_UP_TOTAL'] = 'Total uploaded';
$lang['PROFILE_UP_TOTAL'] = 'Total uploaded';
$lang['PROFILE_DOWN_TOTAL'] = 'Total downloaded';
$lang['PROFILE_BONUS'] = 'Bonus';
$lang['PROFILE_BONUS'] = 'Bonus';
$lang['PROFILE_RELEASED'] = 'Total released';
$lang['PROFILE_RATIO'] = 'Ratio';
$lang['PROFILE_MAX_SPEED'] = 'Speed';
@ -1287,6 +1288,7 @@ $lang['TRACKER'] = 'Tracker';
$lang['GALLERY'] = 'Gallery';
$lang['OPEN_TOPICS'] = 'Open topics';
$lang['OPEN_IN_SAME_WINDOW'] = 'open in same window';
$lang['SHOW_TIME_TOPICS'] = 'show time of the creation topics';
$lang['BT_LOW_RATIO_FUNC'] = "You can't use this option (ratio is too low)";
$lang['BT_LOW_RATIO_FOR_DL'] = "With ratio <b>%s</b> you can't download torrents";

View file

@ -126,7 +126,7 @@ $lang['SEARCH_LATEST'] = 'Последние';
$lang['REGISTER'] = 'Регистрация';
$lang['PROFILE'] = 'Профиль';
$lang['EDIT_PROFILE'] = 'Редактирование вашего профиля';
$lang['EDIT_PROFILE'] = 'Редактирование профиля';
$lang['SEARCH'] = 'Поиск';
$lang['MEMBERLIST'] = 'Пользователи';
$lang['FAQ'] = 'FAQ';
@ -136,6 +136,7 @@ $lang['LASTPOST'] = 'Посл. сообщение';
$lang['MODERATOR'] = 'Модератор';
$lang['MODERATORS'] = 'Модераторы';
$lang['TERMS'] = 'Правила';
$lang['NOTHING_HAS_CHANGED'] = 'Ничего не было изменено';
//
// Stats block text
@ -1293,6 +1294,7 @@ $lang['TRACKER'] = 'Трекер';
$lang['GALLERY'] = 'Галерея';
$lang['OPEN_TOPICS'] = 'Открывать топики';
$lang['OPEN_IN_SAME_WINDOW'] = 'открывать в этом же окне';
$lang['SHOW_TIME_TOPICS'] = 'показывать время создания темыs';
$lang['BT_LOW_RATIO_FUNC'] = 'У Вас слишком низкий рейтинг для того, чтобы воспользоваться этой функцией';
$lang['BT_LOW_RATIO_FOR_DL'] = 'Рейтинг <b>%s</b> уже не позволяет Вам скачивать новые торренты.<br /><br />Для поднятия рейтинга, Вы можете что-либо раздать из <a href="%s"><b>Ваших прошлых закачек</b></a>, либо организовать новую раздачу.<br /><br /><b>Пожалуйста, помните о том, что Ваше yчастие в системе BitTorrent не может ограничиваться только скачиванием!</b>';

View file

@ -383,20 +383,12 @@ else
message_die(GENERAL_MESSAGE, $lang[$message] . $return_links['list'] . $return_links['index']);
}
$page_title = ($single_report) ? $lang['DELETE_REPORT'] : $lang['DELETE_REPORTS'];
include(PAGE_HEADER);
$template->set_filenames(array(
'confirm' => 'confirm_body.tpl')
);
$template->assign_vars(array(
'MESSAGE_TITLE' => $page_title,
'MESSAGE_TEXT' => ($single_report) ? $lang['DELETE_REPORT_EXPLAIN'] : $lang['DELETE_REPORTS_EXPLAIN'])
);
$template->pparse('confirm');
include(PAGE_FOOTER);
print_confirmation(array(
'CONFIRM_TITLE' => ($single_report) ? $lang['DELETE_REPORT'] : $lang['DELETE_REPORTS'],
'QUESTION' => ($single_report) ? $lang['DELETE_REPORT_EXPLAIN'] : $lang['DELETE_REPORTS_EXPLAIN'],
'FORM_ACTION' => "report.php",,
'HIDDEN_FIELDS' => $hidden_fields,
));
}
break;

View file

@ -1,10 +0,0 @@
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
<tr>
<th class="thHead" height="25" valign="middle">{MESSAGE_TITLE}</th>
</tr>
<tr>
<td class="row1" align="center"><form action="{S_CONFIRM_ACTION}" method="post"><span class="gen"><br />{MESSAGE_TEXT}<br /><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{L_YES}" class="mainoption" />&nbsp;&nbsp;<input type="submit" name="cancel" value="{L_NO}" class="liteoption" /></span></form></td>
</tr>
</table>
<br clear="all" />

View file

@ -475,7 +475,7 @@ important_info
<!-- IF SHOW_BT_USERDATA --><div id="user_ratio">
<h3>{L_BT_RATIO}</h3>
<table cellpadding="0">
<div align="center">{AVATAR}</div>
<div align="center">{THIS_AVATAR}</div>
<tr><td>{L_YOUR_RATIO}</td><td><!-- IF DOWN_TOTAL_BYTES gt MIN_DL_BYTES --><b>{USER_RATIO}</b><!-- ELSE --><b>{L_NONE}</b> (DL < {MIN_DL_FOR_RATIO})<!-- ENDIF --></td></tr>
<tr><td>{L_DOWNLOADED}</td><td class="leechmed"><b>{DOWN_TOTAL}</b></td></tr>
<tr><td>{L_UPLOADED}</td><td class="seedmed"><b>{UP_TOTAL}</b></td></tr>

View file

@ -250,6 +250,11 @@ ajax.callback.view_post = function(data) {
onclick="user.set('tr_t_ax', this.checked ? 1 : 0);"
/>{L_OPEN_IN_SAME_WINDOW}
</label>
<label>
<input type="checkbox" <!-- IF SHOW_TIME_TOPICS -->{CHECKED}<!-- ENDIF -->
onclick="user.set('tr_t_t', this.checked ? 1 : 0);"
/>{L_SHOW_TIME_TOPICS}
</label>
</div>
</fieldset>
</td>
@ -306,6 +311,7 @@ ajax.callback.view_post = function(data) {
<!-- ENDIF -->
<td class="row4 med tLeft">
<a class="{tor.DL_CLASS}<!-- IF AJAX_TOPICS --> folded2 tLink<!-- ENDIF -->" <!-- IF AJAX_TOPICS -->onclick="ajax.view_post({tor.POST_ID}, this); return false;"<!-- ENDIF --> href="{TOPIC_URL}{tor.TOPIC_ID}"><!-- IF tor.TOR_FROZEN -->{tor.TOPIC_TITLE}<!-- ELSE -->{tor.TOR_TYPE}<b>{tor.TOPIC_TITLE}</b><!-- ENDIF --></a>
<!-- IF SHOW_TIME_TOPICS --><div class="tr_tm">{tor.TOPIC_TIME}</div><!-- ENDIF -->
</td>
<!-- IF SHOW_AUTHOR -->
<td class="row1"><a class="med" href="{TR_POSTER_URL}{tor.POSTER_ID}">{tor.USERNAME}</a></td>

View file

@ -374,11 +374,22 @@ td.topic_id { cursor: pointer; }
<td class="small bold nowrap" style="padding: 0px 0px 0px 4px;">
<span id="show_mod_options"><a href="#" class="small bold">{L_MODERATE_FORUM}</a></span>
</td>
<td class="med" style="padding: 0px 4px 2px 4px;">|</td>
<td class="small nowrap" style="padding: 0px 0px 0px 0px;">{L_TOPICS_PER_PAGE}:</td>
<td class="small nowrap" style="padding: 0px 0px 0px 3px;">
<form id="tpp" action="{PAGE_URL_TPP}" method="post">{SELECT_TPP}</form>
</td>
<td class="med" style="padding: 0 4px 2px 4px;">|</td>
<td class="small nowrap" style="padding: 0;">{L_TOPICS_PER_PAGE}:</td>
<td class="small nowrap" style="padding: 0 0 0 3px;">{SELECT_TPP}</td>
<!-- IF TORRENTS -->
<td class="small nowrap" style="padding: 0 0 0 6px;">{L_STATUS}:</td>
<td class="small nowrap" style="padding: 0 0 0 3px;">{SELECT_TST}</td>
<!-- ENDIF -->
<td class="small nowrap" style="padding: 0 0 0 3px;">&nbsp;<input id="tst-submit-btn" type="button" class="bold" value="&raquo;" style="width: 30px;" onclick="mod_goto(); return false;" /></td>
<script type="text/javascript">
function mod_goto(){
window.location = '{MOD_URL}' +'&tpp='+ $('#tpp').val() <!-- IF TORRENTS -->+'&tst='+ $('#tst').val()<!-- ENDIF --> +'&mod=1';
}
$(function(){
$('#tst').bind('change', function(){ $('#tst-submit-btn').attr({disabled: 1}); mod_goto(); });
});
</script>
<!-- ENDIF / AUTH_MOD -->
<td class="small bold nowrap tRight w100">

View file

@ -644,7 +644,7 @@ if ($allowed_forums)
$select = "
SELECT
tor.topic_id, tor.post_id, tor.attach_id, tor.size, tor.reg_time, tor.complete_count, tor.seeder_last_seen, tor.tor_status, tor.tor_type,
t.topic_title, t.topic_replies, t.topic_views, sn.seeders, sn.leechers, tor.info_hash
t.topic_title, t.topic_time, t.topic_replies, t.topic_views, sn.seeders, sn.leechers, tor.info_hash
";
$select .= (!$hide_speed) ? ", sn.speed_up, sn.speed_down" : '';
$select .= (!$hide_forum) ? ", tor.forum_id" : '';
@ -738,6 +738,7 @@ if ($allowed_forums)
'FORUM_NAME' => ($forum_id) ? $forum_name_html[$forum_id] : '',
'TOPIC_ID' => $tor['topic_id'],
'TOPIC_TITLE' => wbr($tor['topic_title']),
'TOPIC_TIME' => bb_date($tor['topic_time'], 'd-M-y') .' <b>&middot;</b> '. delta_time($tor['topic_time']),
'POST_ID' => $tor['post_id'],
'POSTER_ID' => $poster_id,
'USERNAME' => isset($tor['username']) ? wbr($tor['username']) : '',
@ -860,6 +861,7 @@ $template->assign_vars(array(
'TITLE_MATCH_VAL' => $title_match_val,
'AJAX_TOPICS' => $user->opt_js['tr_t_ax'],
'SHOW_TIME_TOPICS' => $user->opt_js['tr_t_t'],
'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key",
));

View file

@ -1,23 +1,4 @@
<?php
/*
This file is part of TorrentPier
TorrentPier is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
TorrentPier is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GPL 2.0 should have been included with the program.
If not, see http://www.gnu.org/licenses/
Official SVN repository and contact information can be found at
http://code.google.com/p/torrentpier/
*/
define('IN_PHPBB', true);
define('BB_SCRIPT', 'forum');
@ -100,6 +81,9 @@ if (!$is_auth['auth_view'])
// Redirect to login page if not admin session
$mod_redirect_url = '';
// Filter by torrent status
$tor_status = -1; // all by default
if ($is_auth['auth_mod'])
{
$redirect = isset($_POST['redirect']) ? $_POST['redirect'] : $_SERVER['REQUEST_URI'];
@ -110,7 +94,17 @@ if ($is_auth['auth_mod'])
{
redirect($mod_redirect_url);
}
if (isset($_REQUEST['tst']) && $_REQUEST['tst'] != -1)
{
$tor_status = (int) $_REQUEST['tst'];
// reset other req values
unset($_REQUEST['sort'], $_REQUEST['order'], $_REQUEST[$title_match_key]);
$show_type_separator = false;
}
$select_tst = array_merge(array('* любой' => -1), array_flip($lang['tor_status']));
$template->assign_vars(array(
'SELECT_TST' => build_select('tst', $select_tst, $tor_status),
));
$select_st = array_merge(array('Выберите статус' => -1), array_flip($lang['tor_status']));
$template->assign_vars(array(
'SELECT_ST' => build_select('st', $select_st, -1),
@ -351,8 +345,14 @@ $limit_topics_time_sql = ($topic_days) ? "AND t.topic_last_post_time > ". (TIMEN
$select_tor_sql = $join_tor_sql = '';
$join_dl = ($bb_cfg['show_dl_status_in_forum'] && !IS_GUEST);
$where_tor_sql = '';
if ($forum_data['allow_reg_tracker'])
{
if ($tor_status != -1)
{
$where_tor_sql = "AND tor.tor_status = $tor_status";
}
$select_tor_sql = ',
bt.auth_key, tor.info_hash, tor.size AS tor_size, tor.reg_time, tor.complete_count, tor.seeder_last_seen, tor.attach_id, tor.tor_status, tor.tor_type,
sn.seeders, sn.leechers
@ -420,6 +420,7 @@ if ($topics_csv = join(',', $topic_ids))
LEFT JOIN ". BB_USERS ." u2 ON(p2.poster_id = u2.user_id)
$join_tor_sql
WHERE t.topic_id IN($topics_csv)
$where_tor_sql
GROUP BY t.topic_id
$order_sql
");
@ -474,7 +475,7 @@ $template->assign_vars(array(
'ONLY_NEW_TOPICS_ON' => ($only_new == ONLY_NEW_TOPICS),
'TITLE_MATCH' => htmlCHR($title_match),
'SELECT_TPP' => ($select_tpp) ? build_select('tpp', $select_tpp, $topics_per_page, null, null, 'onchange="$(\'#tpp\').submit();"') : '',
'SELECT_TPP' => ($select_tpp) ? build_select('tpp', $select_tpp, $topics_per_page) : '',
'T_POST_NEW_TOPIC' => ($forum_data['forum_status'] == FORUM_LOCKED) ? $lang['FORUM_LOCKED'] : $lang['POST_NEW_TOPIC'],
'S_AUTH_LIST' => $u_auth,
'U_VIEW_FORUM' => FORUM_URL . $forum_id,
@ -575,6 +576,10 @@ foreach ($topic_rowset as $topic)
}
unset($topic_rowset);
$pg_url = FORUM_URL . $forum_id;
$pg_url .= ($sort_value) ? "&sort=$sort_value" : '';
$pg_url .= ($order_value) ? "&order=$order_value" : '';
$template->assign_var('MOD_URL', $pg_url);
$pg_url = FORUM_URL . $forum_id;
$pg_url .= ($topic_days) ? "&amp;topicdays=$topic_days" : '';
$pg_url .= ($sort_value) ? "&amp;sort=$sort_value" : '';
@ -606,7 +611,6 @@ else
$template->assign_vars(array(
'PAGE_URL' => $pg_url,
'PAGE_URL_TPP' => url_arg($pg_url, 'tpp', null),
'FOUND_TOPICS' => $found_topics,
'AUTH_MOD' => $is_auth['auth_mod'],