mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -07:00
r492
откат git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@492 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
a544f1feb7
commit
1993d6c9cc
18 changed files with 3495 additions and 3355 deletions
|
@ -665,7 +665,7 @@ INSERT INTO `bb_config` VALUES ('report_notify', '0');
|
|||
INSERT INTO `bb_config` VALUES ('report_list_admin', '0');
|
||||
INSERT INTO `bb_config` VALUES ('report_new_window', '0');
|
||||
INSERT INTO `bb_config` VALUES ('torrent_pass_private_key', 'вставить_из_конфига_XBTT');
|
||||
INSERT INTO `bb_config` VALUES ('cron_enabled', '0');
|
||||
INSERT INTO `bb_config` VALUES ('cron_enabled', '1');
|
||||
INSERT INTO `bb_config` VALUES ('cron_check_interval', '300');
|
||||
INSERT INTO `bb_config` VALUES ('reports_enabled', '1');
|
||||
INSERT INTO `bb_config` VALUES ('gallery_enabled', '1');
|
||||
|
|
409
upload/ajax.php
409
upload/ajax.php
|
@ -8,51 +8,53 @@ require('./common.php');
|
|||
$ajax->init();
|
||||
|
||||
// Handle "board disabled via ON/OFF trigger"
|
||||
if (file_exists(BB_DISABLED)) {
|
||||
if (file_exists(BB_DISABLED))
|
||||
{
|
||||
$ajax->ajax_die($bb_cfg['board_disabled_msg']);
|
||||
}
|
||||
|
||||
// Load actions required modules
|
||||
switch ($ajax->action) {
|
||||
switch ($ajax->action)
|
||||
{
|
||||
case 'view_post':
|
||||
require(INC_DIR . 'bbcode.php');
|
||||
break;
|
||||
require(INC_DIR .'bbcode.php');
|
||||
break;
|
||||
|
||||
case 'posts':
|
||||
case 'post_mod_comment':
|
||||
require(INC_DIR . 'bbcode.php');
|
||||
require(INC_DIR . 'functions_post.php');
|
||||
require(INC_DIR . 'functions_admin.php');
|
||||
break;
|
||||
require(INC_DIR .'bbcode.php');
|
||||
require(INC_DIR .'functions_post.php');
|
||||
require(INC_DIR .'functions_admin.php');
|
||||
break;
|
||||
|
||||
case 'view_torrent':
|
||||
case 'mod_action':
|
||||
case 'change_tor_status':
|
||||
case 'gen_passkey';
|
||||
require(BB_ROOT . 'attach_mod/attachment_mod.php');
|
||||
require(INC_DIR . 'functions_torrent.php');
|
||||
break;
|
||||
require(BB_ROOT .'attach_mod/attachment_mod.php');
|
||||
require(INC_DIR .'functions_torrent.php');
|
||||
break;
|
||||
|
||||
case 'change_torrent':
|
||||
require(BB_ROOT . 'attach_mod/attachment_mod.php');
|
||||
require(INC_DIR . 'functions_torrent.php');
|
||||
break;
|
||||
require(BB_ROOT .'attach_mod/attachment_mod.php');
|
||||
require(INC_DIR .'functions_torrent.php');
|
||||
break;
|
||||
|
||||
case 'user_register':
|
||||
require(INC_DIR . 'functions_validate.php');
|
||||
break;
|
||||
require(INC_DIR .'functions_validate.php');
|
||||
break;
|
||||
|
||||
case 'manage_user':
|
||||
require(INC_DIR . 'functions_admin.php');
|
||||
break;
|
||||
require(INC_DIR .'functions_admin.php');
|
||||
break;
|
||||
|
||||
case 'group_membership':
|
||||
require(INC_DIR . 'functions_group.php');
|
||||
break;
|
||||
require(INC_DIR .'functions_group.php');
|
||||
break;
|
||||
}
|
||||
|
||||
// position in $ajax->valid_actions['xxx']
|
||||
define('AJAX_AUTH', 0); // 'guest', 'user', 'mod', 'admin'
|
||||
define('AJAX_AUTH', 0); // 'guest', 'user', 'mod', 'admin'
|
||||
|
||||
$user->session_start();
|
||||
$ajax->exec();
|
||||
|
@ -62,82 +64,88 @@ $ajax->exec();
|
|||
//
|
||||
class ajax_common
|
||||
{
|
||||
var $request = array();
|
||||
var $request = array();
|
||||
var $response = array();
|
||||
|
||||
var $valid_actions = array(
|
||||
// ACTION NAME AJAX_AUTH
|
||||
// ACTION NAME AJAX_AUTH
|
||||
'edit_user_profile' => array('admin'),
|
||||
'change_user_rank' => array('admin'),
|
||||
'change_user_opt' => array('admin'),
|
||||
'manage_user' => array('admin'),
|
||||
'change_user_rank' => array('admin'),
|
||||
'change_user_opt' => array('admin'),
|
||||
'manage_user' => array('admin'),
|
||||
|
||||
'mod_action' => array('mod'),
|
||||
'topic_tpl' => array('mod'),
|
||||
'group_membership' => array('mod'),
|
||||
'mod_action' => array('mod'),
|
||||
'topic_tpl' => array('mod'),
|
||||
'group_membership' => array('mod'),
|
||||
'post_mod_comment' => array('mod'),
|
||||
|
||||
'gen_passkey' => array('user'),
|
||||
'change_torrent' => array('user'),
|
||||
'gen_passkey' => array('user'),
|
||||
'change_torrent' => array('user'),
|
||||
'change_tor_status' => array('user'),
|
||||
'modify_draft' => array('user'),
|
||||
'modify_draft' => array('user'),
|
||||
|
||||
'view_post' => array('guest'),
|
||||
'view_torrent' => array('guest'),
|
||||
'user_register' => array('guest'),
|
||||
'posts' => array('guest'),
|
||||
'index_data' => array('guest'),
|
||||
|
||||
'post_mod_comment' => array('mod'),
|
||||
);
|
||||
'view_post' => array('guest'),
|
||||
'view_torrent' => array('guest'),
|
||||
'user_register' => array('guest'),
|
||||
'posts' => array('guest'),
|
||||
'index_data' => array('guest'),
|
||||
);
|
||||
|
||||
var $action = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function ajax_common()
|
||||
* Constructor
|
||||
*/
|
||||
function ajax_common ()
|
||||
{
|
||||
ob_start(array(&$this, 'ob_handler'));
|
||||
header('Content-Type: text/plain');
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform action
|
||||
*/
|
||||
function exec()
|
||||
* Perform action
|
||||
*/
|
||||
function exec ()
|
||||
{
|
||||
global $lang;
|
||||
|
||||
// Exit if we already have errors
|
||||
if (!empty($this->response['error_code'])) {
|
||||
if (!empty($this->response['error_code']))
|
||||
{
|
||||
$this->send();
|
||||
}
|
||||
|
||||
// Check that requested action is valid
|
||||
$action = $this->action;
|
||||
|
||||
if (!$action || !is_string($action)) {
|
||||
if (!$action || !is_string($action))
|
||||
{
|
||||
$this->ajax_die('no action specified');
|
||||
} else if (!$action_params =& $this->valid_actions[$action]) {
|
||||
$this->ajax_die('invalid action: ' . $action);
|
||||
}
|
||||
else if (!$action_params =& $this->valid_actions[$action])
|
||||
{
|
||||
$this->ajax_die('invalid action: '. $action);
|
||||
}
|
||||
|
||||
// Auth check
|
||||
switch ($action_params[AJAX_AUTH]) {
|
||||
switch ($action_params[AJAX_AUTH])
|
||||
{
|
||||
// GUEST
|
||||
case 'guest':
|
||||
break;
|
||||
|
||||
// USER
|
||||
case 'user':
|
||||
if (IS_GUEST) {
|
||||
if (IS_GUEST)
|
||||
{
|
||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||
}
|
||||
break;
|
||||
|
||||
// MOD
|
||||
case 'mod':
|
||||
if (!IS_AM) {
|
||||
if (!IS_AM)
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||
}
|
||||
$this->check_admin_session();
|
||||
|
@ -145,7 +153,8 @@ class ajax_common
|
|||
|
||||
// ADMIN
|
||||
case 'admin':
|
||||
if (!IS_ADMIN) {
|
||||
if (!IS_ADMIN)
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_ADMIN']);
|
||||
}
|
||||
$this->check_admin_session();
|
||||
|
@ -163,9 +172,9 @@ class ajax_common
|
|||
}
|
||||
|
||||
/**
|
||||
* Exit on error
|
||||
*/
|
||||
function ajax_die($error_msg, $error_code = E_AJAX_GENERAL_ERROR)
|
||||
* Exit on error
|
||||
*/
|
||||
function ajax_die ($error_msg, $error_code = E_AJAX_GENERAL_ERROR)
|
||||
{
|
||||
$this->response['error_code'] = $error_code;
|
||||
$this->response['error_msg'] = $error_msg;
|
||||
|
@ -174,22 +183,23 @@ class ajax_common
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
*/
|
||||
function init()
|
||||
* Initialization
|
||||
*/
|
||||
function init ()
|
||||
{
|
||||
$this->request = $_POST;
|
||||
$this->action =& $this->request['action'];
|
||||
$this->action =& $this->request['action'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Send data
|
||||
*/
|
||||
function send()
|
||||
* Send data
|
||||
*/
|
||||
function send ()
|
||||
{
|
||||
$this->response['action'] = $this->action;
|
||||
|
||||
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log'])) {
|
||||
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log']))
|
||||
{
|
||||
$this->response['sql_log'] = get_sql_log();
|
||||
}
|
||||
|
||||
|
@ -198,20 +208,24 @@ class ajax_common
|
|||
}
|
||||
|
||||
/**
|
||||
* OB Handler
|
||||
*/
|
||||
function ob_handler($contents)
|
||||
* OB Handler
|
||||
*/
|
||||
function ob_handler ($contents)
|
||||
{
|
||||
if (DBG_USER) {
|
||||
if ($contents) {
|
||||
if (DBG_USER)
|
||||
{
|
||||
if ($contents)
|
||||
{
|
||||
$this->response['raw_output'] = $contents;
|
||||
}
|
||||
}
|
||||
|
||||
$response_js = bb_json_encode($this->response);
|
||||
|
||||
if (GZIP_OUTPUT_ALLOWED && !defined('NO_GZIP')) {
|
||||
if (UA_GZIP_SUPPORTED && strlen($response_js) > 2000) {
|
||||
if (GZIP_OUTPUT_ALLOWED && !defined('NO_GZIP'))
|
||||
{
|
||||
if (UA_GZIP_SUPPORTED && strlen($response_js) > 2000)
|
||||
{
|
||||
header('Content-Encoding: gzip');
|
||||
$response_js = gzencode($response_js, 1);
|
||||
}
|
||||
|
@ -221,21 +235,26 @@ class ajax_common
|
|||
}
|
||||
|
||||
/**
|
||||
* Admin session
|
||||
*/
|
||||
function check_admin_session()
|
||||
* Admin session
|
||||
*/
|
||||
function check_admin_session ()
|
||||
{
|
||||
global $user;
|
||||
|
||||
if (!$user->data['session_admin']) {
|
||||
if (empty($this->request['user_password'])) {
|
||||
if (!$user->data['session_admin'])
|
||||
{
|
||||
if (empty($this->request['user_password']))
|
||||
{
|
||||
$this->prompt_for_password();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$login_args = array(
|
||||
'login_username' => $user->data['username'],
|
||||
'login_password' => $_POST['user_password'],
|
||||
);
|
||||
if (!$user->login($login_args, true)) {
|
||||
if (!$user->login($login_args, true))
|
||||
{
|
||||
$this->ajax_die('Wrong password');
|
||||
}
|
||||
}
|
||||
|
@ -243,161 +262,184 @@ class ajax_common
|
|||
}
|
||||
|
||||
/**
|
||||
* Prompt for password
|
||||
*/
|
||||
function prompt_for_password()
|
||||
* Prompt for password
|
||||
*/
|
||||
function prompt_for_password ()
|
||||
{
|
||||
$this->response['prompt_password'] = 1;
|
||||
$this->send();
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompt for confirmation
|
||||
*/
|
||||
function prompt_for_confirm($confirm_msg)
|
||||
* Prompt for confirmation
|
||||
*/
|
||||
function prompt_for_confirm ($confirm_msg)
|
||||
{
|
||||
if (empty($confirm_msg)) $this->ajax_die('false');
|
||||
if(empty($confirm_msg)) $this->ajax_die('false');
|
||||
|
||||
$this->response['prompt_confirm'] = 1;
|
||||
$this->response['confirm_msg'] = $confirm_msg;
|
||||
$this->send();
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify mod rights
|
||||
*/
|
||||
function verify_mod_rights($forum_id)
|
||||
/**
|
||||
* Verify mod rights
|
||||
*/
|
||||
function verify_mod_rights ($forum_id)
|
||||
{
|
||||
global $userdata, $lang;
|
||||
|
||||
$is_auth = auth(AUTH_MOD, $forum_id, $userdata);
|
||||
|
||||
if (!$is_auth['auth_mod']) {
|
||||
if (!$is_auth['auth_mod'])
|
||||
{
|
||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||
}
|
||||
}
|
||||
|
||||
function edit_user_profile()
|
||||
function edit_user_profile ()
|
||||
{
|
||||
require(AJAX_DIR . 'edit_user_profile.php');
|
||||
require(AJAX_DIR .'edit_user_profile.php');
|
||||
}
|
||||
|
||||
function change_user_rank()
|
||||
function change_user_rank ()
|
||||
{
|
||||
global $datastore, $lang;
|
||||
|
||||
$ranks = $datastore->get('ranks');
|
||||
$ranks = $datastore->get('ranks');
|
||||
$rank_id = intval($this->request['rank_id']);
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id)) {
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
}
|
||||
if ($rank_id != 0 && !isset($ranks[$rank_id])) {
|
||||
if ($rank_id != 0 && !isset($ranks[$rank_id]))
|
||||
{
|
||||
$this->ajax_die("invalid rank_id: $rank_id");
|
||||
}
|
||||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_rank = $rank_id WHERE user_id = $user_id LIMIT 1");
|
||||
DB()->query("UPDATE ". BB_USERS ." SET user_rank = $rank_id WHERE user_id = $user_id LIMIT 1");
|
||||
|
||||
cache_rm_user_sessions($user_id);
|
||||
|
||||
$this->response['html'] = ($rank_id != 0) ? $lang['AWARDED_RANK'] . ' <b> ' . $ranks[$rank_id]['rank_title'] . '</b>' : $lang['SHOT_RANK'];
|
||||
$this->response['html'] = ($rank_id != 0) ? $lang['AWARDED_RANK'] . ' <b> '. $ranks[$rank_id]['rank_title'] .'</b>' : $lang['SHOT_RANK'];
|
||||
}
|
||||
|
||||
function change_user_opt()
|
||||
function change_user_opt ()
|
||||
{
|
||||
global $bf, $lang;
|
||||
|
||||
$user_id = (int)$this->request['user_id'];
|
||||
$user_id = (int) $this->request['user_id'];
|
||||
$new_opt = bb_json_decode($this->request['user_opt']);
|
||||
|
||||
if (!$user_id OR !$u_data = get_userdata($user_id)) {
|
||||
if (!$user_id OR !$u_data = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die('invalid user_id');
|
||||
}
|
||||
if (!is_array($new_opt)) {
|
||||
if (!is_array($new_opt))
|
||||
{
|
||||
$this->ajax_die('invalid new_opt');
|
||||
}
|
||||
|
||||
foreach ($bf['user_opt'] as $opt_name => $opt_bit) {
|
||||
if (isset($new_opt[$opt_name])) {
|
||||
foreach ($bf['user_opt'] as $opt_name => $opt_bit)
|
||||
{
|
||||
if (isset($new_opt[$opt_name]))
|
||||
{
|
||||
setbit($u_data['user_opt'], $opt_bit, !empty($new_opt[$opt_name]));
|
||||
}
|
||||
}
|
||||
|
||||
DB()->query("UPDATE " . BB_USERS . " SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id LIMIT 1");
|
||||
DB()->query("UPDATE ". BB_USERS ." SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id LIMIT 1");
|
||||
|
||||
// Удаляем данные из кеша
|
||||
cache_rm_user_sessions($user_id);
|
||||
// Удаляем данные из кеша
|
||||
cache_rm_user_sessions ($user_id);
|
||||
|
||||
$this->response['resp_html'] = $lang['SAVED'];
|
||||
}
|
||||
|
||||
function gen_passkey()
|
||||
function gen_passkey ()
|
||||
{
|
||||
global $userdata, $lang;
|
||||
|
||||
$req_uid = (int)$this->request['user_id'];
|
||||
$req_uid = (int) $this->request['user_id'];
|
||||
|
||||
if ($req_uid == $userdata['user_id'] || IS_ADMIN) {
|
||||
if (empty($this->request['confirmed'])) {
|
||||
if ($req_uid == $userdata['user_id'] || IS_ADMIN)
|
||||
{
|
||||
if (empty($this->request['confirmed']))
|
||||
{
|
||||
$this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
|
||||
}
|
||||
|
||||
if (!$passkey = generate_passkey($req_uid, IS_ADMIN)) {
|
||||
if (!$passkey = generate_passkey($req_uid, IS_ADMIN))
|
||||
{
|
||||
$this->ajax_die('Could not insert passkey');
|
||||
}
|
||||
tracker_rm_user($req_uid);
|
||||
$this->response['passkey'] = $passkey;
|
||||
} else $this->ajax_die($lang['NOT_AUTHORISED']);
|
||||
}
|
||||
else $this->ajax_die($lang['NOT_AUTHORISED']);
|
||||
}
|
||||
|
||||
// User groups membership
|
||||
function group_membership()
|
||||
// User groups membership
|
||||
function group_membership ()
|
||||
{
|
||||
global $lang, $user;
|
||||
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id)) {
|
||||
if (!$user_id = intval($this->request['user_id']) OR !$profiledata = get_userdata($user_id))
|
||||
{
|
||||
$this->ajax_die("invalid user_id: $user_id");
|
||||
}
|
||||
if (!$mode = (string)$this->request['mode']) {
|
||||
if (!$mode = (string) $this->request['mode'])
|
||||
{
|
||||
$this->ajax_die('invalid mode (empty)');
|
||||
}
|
||||
|
||||
switch ($mode) {
|
||||
switch ($mode)
|
||||
{
|
||||
case 'get_group_list':
|
||||
$sql = "
|
||||
SELECT ug.user_pending, g.group_id, g.group_type, g.group_name, g.group_moderator, self.user_id AS can_view
|
||||
FROM " . BB_USER_GROUP . " ug
|
||||
INNER JOIN " . BB_GROUPS . " g ON(g.group_id = ug.group_id AND g.group_single_user = 0)
|
||||
LEFT JOIN " . BB_USER_GROUP . " self ON(self.group_id = g.group_id AND self.user_id = {$user->id} AND self.user_pending = 0)
|
||||
FROM ". BB_USER_GROUP ." ug
|
||||
INNER JOIN ". BB_GROUPS ." g ON(g.group_id = ug.group_id AND g.group_single_user = 0)
|
||||
LEFT JOIN ". BB_USER_GROUP ." self ON(self.group_id = g.group_id AND self.user_id = {$user->id} AND self.user_pending = 0)
|
||||
WHERE ug.user_id = $user_id
|
||||
ORDER BY g.group_name
|
||||
";
|
||||
$html = array();
|
||||
foreach (DB()->fetch_rowset($sql) as $row) {
|
||||
$class = ($row['user_pending']) ? 'med' : 'med bold';
|
||||
foreach (DB()->fetch_rowset($sql) as $row)
|
||||
{
|
||||
$class = ($row['user_pending']) ? 'med' : 'med bold';
|
||||
$class .= ($row['group_moderator'] == $user_id) ? ' colorMod' : '';
|
||||
$href = "groupcp.php?g={$row['group_id']}";
|
||||
$href = "groupcp.php?g={$row['group_id']}";
|
||||
|
||||
if (IS_ADMIN) {
|
||||
if (IS_ADMIN)
|
||||
{
|
||||
$href .= "&u=$user_id";
|
||||
$link = '<a href="' . $href . '" class="' . $class . '" target="_blank">' . htmlCHR($row['group_name']) . '</a>';
|
||||
$link = '<a href="'. $href .'" class="'. $class .'" target="_blank">'. htmlCHR($row['group_name']) .'</a>';
|
||||
$html[] = $link;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// скрытая группа и сам юзер не является её членом
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$row['can_view']) {
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$row['can_view'])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if ($row['group_moderator'] == $user->id) {
|
||||
if ($row['group_moderator'] == $user->id)
|
||||
{
|
||||
$class .= ' selfMod';
|
||||
$href .= "&u=$user_id"; // сам юзер модератор этой группы
|
||||
$href .= "&u=$user_id"; // сам юзер модератор этой группы
|
||||
}
|
||||
$link = '<a href="' . $href . '" class="' . $class . '" target="_blank">' . htmlCHR($row['group_name']) . '</a>';
|
||||
$link = '<a href="'. $href .'" class="'. $class .'" target="_blank">'. htmlCHR($row['group_name']) .'</a>';
|
||||
$html[] = $link;
|
||||
}
|
||||
}
|
||||
if ($html) {
|
||||
$this->response['group_list_html'] = '<ul><li>' . join('</li><li>', $html) . '</li></ul>';
|
||||
} else {
|
||||
if ($html)
|
||||
{
|
||||
$this->response['group_list_html'] = '<ul><li>'. join('</li><li>', $html) .'</li></ul>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response['group_list_html'] = $lang['GROUP_LIST_HIDDEN'];
|
||||
}
|
||||
break;
|
||||
|
@ -407,103 +449,110 @@ class ajax_common
|
|||
}
|
||||
}
|
||||
|
||||
function post_mod_comment()
|
||||
function post_mod_comment ()
|
||||
{
|
||||
global $lang, $userdata;
|
||||
|
||||
$post_id = (int)$this->request['post_id'];
|
||||
$post_id = (int) $this->request['post_id'];
|
||||
$post = DB()->fetch_row("SELECT t.*, f.*, p.*, pt.post_text
|
||||
FROM " . BB_TOPICS . " t, " . BB_FORUMS . " f, " . BB_POSTS . " p, " . BB_POSTS_TEXT . " pt
|
||||
FROM ". BB_TOPICS ." t, ". BB_FORUMS ." f, ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt
|
||||
WHERE p.post_id = $post_id
|
||||
AND t.topic_id = p.topic_id
|
||||
AND f.forum_id = t.forum_id
|
||||
AND p.post_id = pt.post_id
|
||||
LIMIT 1");
|
||||
if (!$post) $this->ajax_die('not post');
|
||||
$type = (int)$this->request['mc_type'];
|
||||
$text = (string)$this->request['mc_text'];
|
||||
if(!$post) $this->ajax_die('not post');
|
||||
$type = (int) $this->request['mc_type'];
|
||||
$text = (string) $this->request['mc_text'];
|
||||
$text = prepare_message($text);
|
||||
if (!$text) $this->ajax_die('no text');
|
||||
DB()->query("UPDATE " . BB_POSTS . " SET post_mod_comment = '" . DB()->escape($text) . "', post_mod_comment_type = $type, post_mc_mod_id = " . $userdata['user_id'] . ", post_mc_mod_name = '" . $userdata['username'] . "' WHERE post_id = $post_id LIMIT 1");
|
||||
DB()->query("UPDATE ". BB_POSTS ." SET post_mod_comment = '". DB()->escape($text) ."', post_mod_comment_type = $type, post_mc_mod_id = ". $userdata['user_id'] .", post_mc_mod_name = '". $userdata['username'] ."' WHERE post_id = $post_id LIMIT 1");
|
||||
$this->response['type'] = $type;
|
||||
$this->response['post_id'] = $post_id;
|
||||
if ($type == 0) $this->response['html'] = '';
|
||||
else if ($type == 1) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1C">K</td><td class="mcTd2C">' . profile_url($userdata) . ' ' . $lang['WROTE'] . ':<br /><br />' . bbcode2html($text) . '</td></tr></table></div>';
|
||||
else if ($type == 2) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1W">!</td><td class="mcTd2W">' . profile_url($userdata) . ' ' . $lang['WROTE'] . ':<br /><br />' . bbcode2html($text) . '</td></tr></table></div>';
|
||||
else if ($type == 1) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1C">K</td><td class="mcTd2C">'. profile_url($userdata) .' '. $lang['WROTE'] .':<br /><br />'. bbcode2html($text) .'</td></tr></table></div>';
|
||||
else if ($type == 2) $this->response['html'] = '<div class="mcBlock"><table cellspacing="0" cellpadding="0" border="0"><tr><td class="mcTd1W">!</td><td class="mcTd2W">'. profile_url($userdata) .' '. $lang['WROTE'] .':<br /><br />'. bbcode2html($text) .'</td></tr></table></div>';
|
||||
}
|
||||
|
||||
function view_post()
|
||||
function view_post ()
|
||||
{
|
||||
require(AJAX_DIR . 'view_post.php');
|
||||
require(AJAX_DIR .'view_post.php');
|
||||
}
|
||||
|
||||
function change_tor_status()
|
||||
function change_tor_status ()
|
||||
{
|
||||
require(AJAX_DIR . 'change_tor_status.php');
|
||||
require(AJAX_DIR .'change_tor_status.php');
|
||||
}
|
||||
|
||||
function change_torrent()
|
||||
function change_torrent ()
|
||||
{
|
||||
require(AJAX_DIR . 'change_torrent.php');
|
||||
require(AJAX_DIR .'change_torrent.php');
|
||||
}
|
||||
|
||||
function view_torrent()
|
||||
function view_torrent ()
|
||||
{
|
||||
require(AJAX_DIR . 'view_torrent.php');
|
||||
require(AJAX_DIR .'view_torrent.php');
|
||||
}
|
||||
|
||||
function user_register()
|
||||
{
|
||||
require(AJAX_DIR . 'user_register.php');
|
||||
}
|
||||
{
|
||||
require(AJAX_DIR .'user_register.php');
|
||||
}
|
||||
|
||||
function mod_action()
|
||||
{
|
||||
require(AJAX_DIR . 'mod_action.php');
|
||||
}
|
||||
function mod_action()
|
||||
{
|
||||
require(AJAX_DIR .'mod_action.php');
|
||||
}
|
||||
|
||||
function posts()
|
||||
{
|
||||
require(AJAX_DIR . 'posts.php');
|
||||
}
|
||||
function posts()
|
||||
{
|
||||
require(AJAX_DIR .'posts.php');
|
||||
}
|
||||
|
||||
function manage_user()
|
||||
{
|
||||
require(AJAX_DIR . 'manage_user.php');
|
||||
require(AJAX_DIR .'manage_user.php');
|
||||
}
|
||||
|
||||
function topic_tpl()
|
||||
{
|
||||
require(AJAX_DIR . 'topic_tpl.php');
|
||||
require(AJAX_DIR .'topic_tpl.php');
|
||||
}
|
||||
|
||||
function index_data()
|
||||
{
|
||||
require(AJAX_DIR . 'index_data.php');
|
||||
{
|
||||
require(AJAX_DIR .'index_data.php');
|
||||
}
|
||||
|
||||
function modify_draft()
|
||||
{
|
||||
global $userdata;
|
||||
$tid = (int)$this->request["id_draft"];
|
||||
$mode = (int)$this->request["mode"];
|
||||
$sql = "SELECT * FROM " . BB_TOPICS . " WHERE topic_id = {$tid}";
|
||||
|
||||
//if($bb_cfg['status_of_draft'] || !$bb_cfg['status_of_draft']) $this->ajax_die('Профилактика !!!');
|
||||
|
||||
$tid = (int) $this->request['id_draft'];
|
||||
$mode = (int) $this->request['mode'];
|
||||
|
||||
$row = DB()->fetch_row("SELECT * FROM " . BB_TOPICS . " WHERE topic_id = {$tid}");
|
||||
|
||||
if (!$row = DB()->fetch_row($sql)) {
|
||||
$this->ajax_die("Нет такого черновика");
|
||||
}
|
||||
if(!$row) $this->ajax_die('Нет такого черновика');
|
||||
|
||||
if ($row["topic_poster"] != $userdata["user_id"] && !IS_ADMIN) {
|
||||
$this->ajax_die("Нельзя удалять чужие черновики");
|
||||
if($row['topic_poster'] != $userdata['user_id'] && !IS_ADMIN)
|
||||
{
|
||||
$this->ajax_die('Нельзя удалять чужие черновики');
|
||||
}
|
||||
|
||||
print_r($mode);
|
||||
if (!$mode) {
|
||||
DB()->query("DELETE FROM `bb_topics` WHERE `topic_id`={$tid} LIMIT 1;");
|
||||
}else {
|
||||
DB()->query("UPDATE `bb_topics` SET `is_draft`=0 WHERE `topic_id`={$tid}");
|
||||
|
||||
if(!$mode)
|
||||
{
|
||||
DB()->query("DELETE FROM ". BB_TOPICS ." WHERE topic_id = {$tid}");
|
||||
}
|
||||
else
|
||||
{
|
||||
DB()->query("UPDATE ". BB_TOPICS ." SET is_draft = 0 WHERE topic_id = {$tid}");
|
||||
}
|
||||
|
||||
$this->response["tid"] = $tid;
|
||||
$this->response['tid'] = $tid;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
|||
|
||||
// Increase number of revision after update
|
||||
$bb_cfg['tp_version'] = '2.5 pre-stable';
|
||||
$bb_cfg['tp_release_date'] = '13-01-2013';
|
||||
$bb_cfg['tp_release_state'] = 'R491';
|
||||
$bb_cfg['tp_release_date'] = '15-01-2013';
|
||||
$bb_cfg['tp_release_state'] = 'R492';
|
||||
|
||||
// Database
|
||||
$charset = 'utf8';
|
||||
|
|
|
@ -136,8 +136,8 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
|
|||
SELECT topic_id, topic_time, topic_title, forum_id
|
||||
FROM ". BB_TOPICS ."
|
||||
WHERE forum_id IN ($news_forum_ids)
|
||||
AND topic_moved_id = 0
|
||||
AND is_draft = 0
|
||||
AND topic_moved_id = 0
|
||||
AND is_draft = 0
|
||||
ORDER BY topic_time DESC
|
||||
LIMIT $news_count
|
||||
");
|
||||
|
@ -150,18 +150,19 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
|
|||
//
|
||||
if ($bb_cfg['show_network_news'] AND $net_forum_ids = $bb_cfg['network_news_forum_id'])
|
||||
{
|
||||
$net_count = max($bb_cfg['network_news_count'], 1);
|
||||
$net_count = max($bb_cfg['network_news_count'], 1);
|
||||
|
||||
$data = DB()->fetch_rowset("
|
||||
SELECT topic_id, topic_time, topic_title, forum_id
|
||||
FROM ". BB_TOPICS ."
|
||||
WHERE forum_id IN ($net_forum_ids)
|
||||
AND topic_moved_id = 0
|
||||
ORDER BY topic_time DESC
|
||||
LIMIT $net_count
|
||||
");
|
||||
$data = DB()->fetch_rowset("
|
||||
SELECT topic_id, topic_time, topic_title, forum_id
|
||||
FROM ". BB_TOPICS ."
|
||||
WHERE forum_id IN ($net_forum_ids)
|
||||
AND topic_moved_id = 0
|
||||
AND is_draft = 0
|
||||
ORDER BY topic_time DESC
|
||||
LIMIT $net_count
|
||||
");
|
||||
|
||||
$this->store('network_news', $data);
|
||||
$this->store('network_news', $data);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -162,7 +162,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
|
|||
|
||||
$is_draft = (empty($_POST['to_draft'])) ? 0 : 1;
|
||||
|
||||
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote, is_draft) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote, $is_draft)" : "UPDATE " . BB_TOPICS . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", is_draft={$is_draft}" . " WHERE topic_id = $topic_id";
|
||||
$sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote, is_draft) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote, $is_draft)" : "UPDATE " . BB_TOPICS . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", is_draft = {$is_draft}" . " WHERE topic_id = $topic_id";
|
||||
|
||||
if (!DB()->sql_query($sql))
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@ define('IN_PHPBB', true);
|
|||
define('BB_SCRIPT', 'login');
|
||||
define('IN_LOGIN', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
|
||||
array_deep($_POST, 'trim');
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
define('IN_PHPBB', true);
|
||||
define('BB_SCRIPT', 'misc');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
|
||||
// Start Session Management
|
||||
$user->session_start();
|
||||
|
|
|
@ -527,3 +527,82 @@ $(document).ready(function(){
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Autocomplete password
|
||||
**/
|
||||
var array_for_rand_pass = ["a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||
var array_rand = function (array) {
|
||||
var array_length = array.length;
|
||||
var result = Math.random() * array_length;
|
||||
return Math.floor(result);
|
||||
|
||||
};
|
||||
|
||||
var autocomplete = function (noCenter) {
|
||||
var string_result = ""; // Empty string
|
||||
for (var i = 1; i <= 8; i++) {
|
||||
string_result += array_for_rand_pass[array_rand(array_for_rand_pass)];
|
||||
}
|
||||
|
||||
var _popup_left = (Math.ceil(window.screen.availWidth / 2) - 150);
|
||||
var _popup_top = (Math.ceil(window.screen.availHeight / 2) - 50);
|
||||
|
||||
if (!noCenter) {
|
||||
$("div#autocomplete_popup").css({
|
||||
left:_popup_left + "px",
|
||||
top:_popup_top + "px"
|
||||
}).show(1000);
|
||||
} else {
|
||||
$("div#autocomplete_popup").show(1000);
|
||||
}
|
||||
|
||||
$("input#pass, input#pass_confirm, div#autocomplete_popup input").each(function () {
|
||||
$(this).val(string_result);
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
$("span#autocomplete").click(function() {
|
||||
autocomplete();
|
||||
});
|
||||
|
||||
// перемещение окна
|
||||
var _X, _Y;
|
||||
var _bMoveble = false;
|
||||
|
||||
$("div#autocomplete_popup div.title").mousedown(function (event) {
|
||||
_bMoveble = true;
|
||||
_X = event.clientX;
|
||||
_Y = event.clientY;
|
||||
});
|
||||
|
||||
$("div#autocomplete_popup div.title").mousemove(function (event) {
|
||||
var jFrame = $("div#autocomplete_popup");
|
||||
var jFLeft = parseInt(jFrame.css("left"));
|
||||
var jFTop = parseInt(jFrame.css("top"));
|
||||
|
||||
if (_bMoveble) {
|
||||
if (event.clientX < _X) {
|
||||
jFrame.css("left", jFLeft - (_X - event.clientX) + "px");
|
||||
} else {
|
||||
jFrame.css("left", (jFLeft + (event.clientX - _X)) + "px");
|
||||
}
|
||||
|
||||
if (event.clientY < _Y) {
|
||||
jFrame.css("top", jFTop - (_Y - event.clientY) + "px");
|
||||
} else {
|
||||
jFrame.css("top", (jFTop + (event.clientY - _Y)) + "px");
|
||||
}
|
||||
|
||||
_X = event.clientX;
|
||||
_Y = event.clientY;
|
||||
}
|
||||
});
|
||||
|
||||
$("div#autocomplete_popup div.title").mouseup(function () {
|
||||
_bMoveble = false;
|
||||
}).mouseout(function () {
|
||||
_bMoveble = false;
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@ define('IN_PHPBB', true);
|
|||
define('BB_SCRIPT', 'pm');
|
||||
define('IN_PM', true);
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
require(INC_DIR .'bbcode.php');
|
||||
require(INC_DIR .'functions_post.php');
|
||||
|
||||
|
|
|
@ -20,13 +20,9 @@ switch ($mode)
|
|||
require(INC_DIR . 'ucp/usercp_viewprofile.php');
|
||||
break;
|
||||
|
||||
case 'viewdraft':
|
||||
require(INC_DIR . 'ucp/usercp_viewdraft.php');
|
||||
break;
|
||||
|
||||
case 'register':
|
||||
case 'editprofile':
|
||||
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
|
||||
if (IS_GUEST && $mode == 'editprofile' )
|
||||
{
|
||||
login_redirect();
|
||||
}
|
||||
|
@ -57,6 +53,10 @@ switch ($mode)
|
|||
|
||||
require(INC_DIR . 'ucp/usercp_topic_watch.php');
|
||||
break;
|
||||
|
||||
case 'viewdraft':
|
||||
require(INC_DIR . 'ucp/usercp_viewdraft.php');
|
||||
break;
|
||||
|
||||
default:
|
||||
bb_die('Invalid mode');
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
define('IN_PHPBB', true);
|
||||
define('BB_SCRIPT', 'report');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(INC_DIR ."bbcode.php");
|
||||
require(INC_DIR ."functions_report.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
require(INC_DIR .'bbcode.php');
|
||||
require(INC_DIR .'functions_report.php');
|
||||
|
||||
// Init userdata
|
||||
$user->session_start(array('req_login' => true));
|
||||
|
|
|
@ -1,100 +1,16 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
ajax.callback.user_register = function (data) {
|
||||
$('#' + data.mode).html(data.html);
|
||||
};
|
||||
|
||||
/** @Author: dimka3210
|
||||
* @Desc: Method autocomplete password
|
||||
*/
|
||||
var array_for_rand_pass = ["a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
||||
var array_rand = function (array) {
|
||||
var array_length = array.length;
|
||||
var result = Math.random() * array_length;
|
||||
return Math.floor(result);
|
||||
|
||||
};
|
||||
|
||||
var autocomplete = function (noCenter) {
|
||||
var string_result = ""; // Empty string
|
||||
for (var i = 1; i <= 8; i++) {
|
||||
string_result += array_for_rand_pass[array_rand(array_for_rand_pass)];
|
||||
}
|
||||
|
||||
var _popup_left = (Math.ceil(window.screen.availWidth / 2) - 150);
|
||||
var _popup_top = (Math.ceil(window.screen.availHeight / 2) - 50);
|
||||
|
||||
if (!noCenter) {
|
||||
jQuery("div#autocomplete_popup").css({
|
||||
left:_popup_left + "px",
|
||||
top:_popup_top + "px"
|
||||
}).show(1000);
|
||||
} else {
|
||||
jQuery("div#autocomplete_popup").show(1000);
|
||||
}
|
||||
|
||||
jQuery("input#pass, input#pass_confirm, div#autocomplete_popup input").each(function () {
|
||||
jQuery(this).val(string_result);
|
||||
});
|
||||
};
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
jQuery("span#autocomplete").click(function() {
|
||||
autocomplete();
|
||||
});
|
||||
|
||||
/**
|
||||
* @Author: dimka3210
|
||||
* @Desc: А давайте окно сделаем перемещаемым.
|
||||
*/
|
||||
var _X, _Y;
|
||||
var _bMoveble = false;
|
||||
|
||||
jQuery("div#autocomplete_popup div.title").mousedown(function (event) {
|
||||
_bMoveble = true;
|
||||
_X = event.clientX;
|
||||
_Y = event.clientY;
|
||||
});
|
||||
|
||||
jQuery("div#autocomplete_popup div.title").mousemove(function (event) {
|
||||
var jFrame = jQuery("div#autocomplete_popup");
|
||||
var jFLeft = parseInt(jFrame.css("left"));
|
||||
var jFTop = parseInt(jFrame.css("top"));
|
||||
|
||||
if (_bMoveble) {
|
||||
if (event.clientX < _X) {
|
||||
jFrame.css("left", jFLeft - (_X - event.clientX) + "px");
|
||||
} else {
|
||||
jFrame.css("left", (jFLeft + (event.clientX - _X)) + "px");
|
||||
}
|
||||
|
||||
if (event.clientY < _Y) {
|
||||
jFrame.css("top", jFTop - (_Y - event.clientY) + "px");
|
||||
} else {
|
||||
jFrame.css("top", (jFTop + (event.clientY - _Y)) + "px");
|
||||
}
|
||||
|
||||
_X = event.clientX;
|
||||
_Y = event.clientY;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery("div#autocomplete_popup div.title").mouseup(function () {
|
||||
_bMoveble = false;
|
||||
}).mouseout(function () {
|
||||
_bMoveble = false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
ajax.callback.user_register = function(data){
|
||||
$('#'+ data.mode).html(data.html);
|
||||
};
|
||||
</script>
|
||||
<div id="autocomplete_popup">
|
||||
<div class="relative">
|
||||
<div class="close" onclick="jQuery('div#autocomplete_popup').hide();"></div>
|
||||
<div class="close" onclick="$('div#autocomplete_popup').hide();"></div>
|
||||
<div class="title">{L_YOUR_NEW_PASSWORD}</div>
|
||||
<div>
|
||||
<input value="" autocomplete="off" type="text"/>
|
||||
<span class="regenerate" title="{L_REGENERATE}" onclick="autocomplete(true)"
|
||||
title=""></span>
|
||||
<span class="regenerate" title="{L_REGENERATE}" onclick="autocomplete(true);"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,20 +19,20 @@
|
|||
<p class="nav"><a href="{U_INDEX}">{T_INDEX}</a></p>
|
||||
|
||||
<form method="post" action="profile.php" class="tokenized" enctype="multipart/form-data">
|
||||
<input type="hidden" name="mode" value="{MODE}"/>
|
||||
<input type="hidden" name="reg_agreed" value="1"/>
|
||||
<!-- IF NEW_USER --><input type="hidden" name="admin" value="1"/><!-- ENDIF -->
|
||||
<input type="hidden" name="mode" value="{MODE}" />
|
||||
<input type="hidden" name="reg_agreed" value="1" />
|
||||
<!-- IF NEW_USER --><input type="hidden" name="admin" value="1" /><!-- ENDIF -->
|
||||
<!-- IF ADM_EDIT -->
|
||||
<input type="hidden" name="u" value="{PR_USER_ID}"/>
|
||||
<input type="hidden" name="u" value="{PR_USER_ID}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not ADM_EDIT -->
|
||||
<script type="text/javascript">
|
||||
x = new Date();
|
||||
tz = -x.getTimezoneOffset() / 60;
|
||||
document.write('<input type="hidden" name="user_timezone" value="' + tz + '" />');
|
||||
x = new Date();
|
||||
tz = -x.getTimezoneOffset()/60;
|
||||
document.write('<input type="hidden" name="user_timezone" value="'+tz+'" />');
|
||||
</script>
|
||||
<!-- ELSE -->
|
||||
<input type="hidden" name="user_timezone" value="{USER_TIMEZONE}"/>
|
||||
<input type="hidden" name="user_timezone" value="{USER_TIMEZONE}" />
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table class="forumline usercp_register">
|
||||
|
@ -131,49 +47,38 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>{L_USERNAME}: *</td>
|
||||
<td><!-- IF CAN_EDIT_USERNAME --><input id="username"
|
||||
onBlur="ajax.exec({ action: 'user_register', mode: 'check_name', username: $('#username').val()}); return false;"
|
||||
type="text" name="username" size="35" maxlength="25" value="{USERNAME}"/><!-- ELSE --><b>{USERNAME}</b><!-- ENDIF -->
|
||||
<span id="check_name"></span></td>
|
||||
<td><!-- IF CAN_EDIT_USERNAME --><input id="username" onBlur="ajax.exec({ action: 'user_register', mode: 'check_name', username: $('#username').val()}); return false;" type="text" name="username" size="35" maxlength="25" value="{USERNAME}" /><!-- ELSE --><b>{USERNAME}</b><!-- ENDIF -->
|
||||
<span id="check_name"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_EMAIL}: * <!-- IF EDIT_PROFILE --><!-- ELSE IF $bb_cfg['reg_email_activation'] --><h6>{L_EMAIL_EXPLAIN}</h6>
|
||||
<!-- ENDIF --></td>
|
||||
<td><input id="email"
|
||||
onBlur="ajax.exec({ action: 'user_register', mode: 'check_email', email: $('#email').val()}); return false;"
|
||||
type="text" name="user_email" size="35" maxlength="40" value="{USER_EMAIL}" <!-- IF EDIT_PROFILE -->
|
||||
<!-- IF $bb_cfg['emailer_disabled'] -->readonly="readonly" style="color: gray;"<!-- ENDIF --><!-- ENDIF --> />
|
||||
<span id="check_email"></span></td>
|
||||
<td>{L_EMAIL}: * <!-- IF EDIT_PROFILE --><!-- ELSE IF $bb_cfg['reg_email_activation'] --><h6>{L_EMAIL_EXPLAIN}</h6><!-- ENDIF --></td>
|
||||
<td><input id="email" onBlur="ajax.exec({ action: 'user_register', mode: 'check_email', email: $('#email').val()}); return false;" type="text" name="user_email" size="35" maxlength="40" value="{USER_EMAIL}" <!-- IF EDIT_PROFILE --><!-- IF $bb_cfg['emailer_disabled'] -->readonly="readonly" style="color: gray;"<!-- ENDIF --><!-- ENDIF --> />
|
||||
<span id="check_email"></span></td>
|
||||
</tr>
|
||||
<!-- IF EDIT_PROFILE and not ADM_EDIT -->
|
||||
<tr>
|
||||
<td>{L_CURRENT_PASSWORD}: * <h6>{L_CONFIRM_PASSWORD_EXPLAIN}</h6></td>
|
||||
<td><input type="password" name="cur_pass" size="35" maxlength="32" value="" autocomplete="off"/></td>
|
||||
<td><input type="password" name="cur_pass" size="35" maxlength="32" value="" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td><!-- IF EDIT_PROFILE -->{L_NEW_PASSWORD}: * <h6>{L_PASSWORD_IF_CHANGED}</h6><!-- ELSE -->{L_PASSWORD}: *
|
||||
<!-- ENDIF --></td>
|
||||
<td><input id="pass" type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="new_pass" size="35"
|
||||
maxlength="32" value="" autocomplete="off"/> <span id="autocomplete"
|
||||
title="{L_AUTOCOMPLETE}">◄</span> <i
|
||||
class="med">{L_PASSWORD_LONG}</i></td>
|
||||
<td><!-- IF EDIT_PROFILE -->{L_NEW_PASSWORD}: * <h6>{L_PASSWORD_IF_CHANGED}</h6><!-- ELSE -->{L_PASSWORD}: *<!-- ENDIF --></td>
|
||||
<td>
|
||||
<input id="pass" type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="new_pass" size="35" maxlength="32" value="" />
|
||||
<span id="autocomplete" title="{L_AUTOCOMPLETE}">◄</span> <i class="med">{L_PASSWORD_LONG}</i>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_CONFIRM_PASSWORD}: * <!-- IF EDIT_PROFILE --><h6>{L_PASSWORD_CONFIRM_IF_CHANGED}</h6><!-- ENDIF --></td>
|
||||
<td><input id="pass_confirm"
|
||||
onBlur="ajax.exec({ action: 'user_register', mode: 'check_pass', pass: $('#pass').val(), pass_confirm: $('#pass_confirm').val() }); return false;"
|
||||
type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="cfm_pass" size="35"
|
||||
maxlength="32" value=""/>
|
||||
<span id="check_pass"></span></td>
|
||||
<td>
|
||||
<input id="pass_confirm" onBlur="ajax.exec({ action: 'user_register', mode: 'check_pass', pass: $('#pass').val(), pass_confirm: $('#pass_confirm').val() }); return false;" type="<!-- IF SHOW_PASS -->text<!-- ELSE -->password<!-- ENDIF -->" name="cfm_pass" size="35" maxlength="32" value="" />
|
||||
<span id="check_pass"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- IF CAPTCHA_HTML -->
|
||||
<tr>
|
||||
<td>{L_CONFIRM_CODE}:</td>
|
||||
<td><span id="refresh_captcha">{CAPTCHA_HTML}</span> <img align="middle" src="/images/pic_loading.gif"
|
||||
title="{L_UPDATE}"
|
||||
onclick="ajax.exec({ action: 'user_register', mode: 'refresh_captcha'}); return false;">
|
||||
</td>
|
||||
<td><span id="refresh_captcha">{CAPTCHA_HTML}</span> <img align="middle" src="/images/pic_loading.gif" title="{L_UPDATE}" onclick="ajax.exec({ action: 'user_register', mode: 'refresh_captcha'}); return false;" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF EDIT_PROFILE -->
|
||||
|
@ -200,28 +105,28 @@
|
|||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td>ICQ:</td>
|
||||
<td><input type="text" name="user_icq" size="30" maxlength="15" value="{USER_ICQ}"/></td>
|
||||
<td><input type="text" name="user_icq" size="30" maxlength="15" value="{USER_ICQ}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_SKYPE}:</td>
|
||||
<td><input type="text" name="user_skype" size="30" maxlength="250" value="{USER_SKYPE}"/></td>
|
||||
<td><input type="text" name="user_skype" size="30" maxlength="250" value="{USER_SKYPE}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_WEBSITE}:</td>
|
||||
<td><input type="text" name="user_website" size="50" maxlength="100" value="{USER_WEBSITE}"/></td>
|
||||
<td><input type="text" name="user_website" size="50" maxlength="100" value="{USER_WEBSITE}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_OCCUPATION}:</td>
|
||||
<td><input type="text" name="user_occ" size="50" maxlength="100" value="{USER_OCC}"/></td>
|
||||
<td><input type="text" name="user_occ" size="50" maxlength="100" value="{USER_OCC}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_INTERESTS}:</td>
|
||||
<td><input type="text" name="user_interests" size="50" maxlength="150" value="{USER_INTERESTS}"/></td>
|
||||
<td><input type="text" name="user_interests" size="50" maxlength="150" value="{USER_INTERESTS}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_LOCATION}:</td>
|
||||
<td>
|
||||
<div><input type="text" name="user_from" size="50" maxlength="100" value="{USER_FROM}"/></div>
|
||||
<div><input type="text" name="user_from" size="50" maxlength="100" value="{USER_FROM}" /></div>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
|
@ -238,15 +143,15 @@
|
|||
<!-- IF not SIG_DISALLOWED -->
|
||||
<tr colspan="2" id="view_message" class="hidden">
|
||||
<td colspan="2">
|
||||
<div class="signature"></div>
|
||||
<div class="signature"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<script type="text/javascript">
|
||||
ajax.callback.posts = function (data) {
|
||||
$('#view_message').show();
|
||||
$('.signature').html(data.message_html);
|
||||
initPostBBCode('.signature');
|
||||
};
|
||||
ajax.callback.posts = function(data){
|
||||
$('#view_message').show();
|
||||
$('.signature').html(data.message_html);
|
||||
initPostBBCode('.signature');
|
||||
};
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
|
@ -256,8 +161,7 @@
|
|||
<!-- ELSE -->
|
||||
<td>
|
||||
<textarea id="user_sig" name="user_sig" rows="5" cols="60" style="width: 96%;">{USER_SIG}</textarea>
|
||||
<input type="button" value="{L_PREVIEW}"
|
||||
onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#user_sig').val() });">
|
||||
<input type="button" value="{L_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#user_sig').val() });">
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
|
@ -265,37 +169,29 @@
|
|||
<tr>
|
||||
<td>{L_PUBLIC_VIEW_EMAIL}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="viewemail" value="1" <!-- IF VIEWEMAIL -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_YES}</label>
|
||||
<label><input type="radio" name="viewemail" value="0" <!-- IF not VIEWEMAIL -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_NO}</label>
|
||||
<label><input type="radio" name="viewemail" value="1" <!-- IF VIEWEMAIL -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="viewemail" value="0" <!-- IF not VIEWEMAIL -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_HIDE_USER}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="allow_viewonline" value="1" <!-- IF ALLOW_VIEWONLINE -->checked="checked"
|
||||
<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="allow_viewonline" value="0" <!-- IF not ALLOW_VIEWONLINE -->checked="checked"
|
||||
<!-- ENDIF --> />{L_NO}</label>
|
||||
<label><input type="radio" name="allow_viewonline" value="1" <!-- IF ALLOW_VIEWONLINE -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="allow_viewonline" value="0" <!-- IF not ALLOW_VIEWONLINE -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_DENY_VISITORS}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="allow_dls" value="1" <!-- IF ALLOW_DLS -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_YES}</label>
|
||||
<label><input type="radio" name="allow_dls" value="0" <!-- IF not ALLOW_DLS -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_NO}</label>
|
||||
<label><input type="radio" name="allow_dls" value="1" <!-- IF ALLOW_DLS -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="allow_dls" value="0" <!-- IF not ALLOW_DLS -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_ALWAYS_NOTIFY}:<h6>{L_ALWAYS_NOTIFY_EXPLAIN}</h6></td>
|
||||
<td>
|
||||
<label><input type="radio" name="notify" value="1" <!-- IF NOTIFY -->checked="checked"<!-- ENDIF --> />{L_YES}
|
||||
</label>
|
||||
<label><input type="radio" name="notify" value="0" <!-- IF not NOTIFY -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_NO}</label>
|
||||
<label><input type="radio" name="notify" value="1" <!-- IF NOTIFY -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="notify" value="0" <!-- IF not NOTIFY -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -303,26 +199,22 @@
|
|||
<tr>
|
||||
<td>{L_NOTIFY_ON_PRIVMSG}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="notify_pm" value="1" <!-- IF NOTIFY_PM -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_YES}</label>
|
||||
<label><input type="radio" name="notify_pm" value="0" <!-- IF not NOTIFY_PM -->checked="checked"<!-- ENDIF -->
|
||||
/>{L_NO}</label>
|
||||
<label><input type="radio" name="notify_pm" value="1" <!-- IF NOTIFY_PM -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="notify_pm" value="0" <!-- IF not NOTIFY_PM -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td>{L_HIDE_PORN_FORUMS}:</td>
|
||||
<td>
|
||||
<label><input type="radio" name="hide_porn_forums" value="1" <!-- IF HIDE_PORN_FORUMS -->checked="checked"
|
||||
<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="hide_porn_forums" value="0" <!-- IF not HIDE_PORN_FORUMS -->checked="checked"
|
||||
<!-- ENDIF --> />{L_NO}</label>
|
||||
<label><input type="radio" name="hide_porn_forums" value="1" <!-- IF HIDE_PORN_FORUMS -->checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<label><input type="radio" name="hide_porn_forums" value="0" <!-- IF not HIDE_PORN_FORUMS -->checked="checked"<!-- ENDIF --> />{L_NO}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<!-- IF SHOW_DATEFORMAT -->
|
||||
<tr>
|
||||
<td>{L_DATE_FORMAT}:<h6>{L_DATE_FORMAT_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14"/></td>
|
||||
<td><input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN not_avatar_block -->
|
||||
|
@ -332,14 +224,13 @@
|
|||
<tr>
|
||||
<td colspan="2">
|
||||
<table class="borderless bCenter w80">
|
||||
<tr>
|
||||
<td>{L_AVATAR_DISABLE}</td>
|
||||
<td class="tCenter nowrap med">
|
||||
<p>{L_CURRENT_IMAGE}</p>
|
||||
|
||||
<p class="mrg_6">{USER_AVATAR}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{L_AVATAR_DISABLE}</td>
|
||||
<td class="tCenter nowrap med">
|
||||
<p>{L_CURRENT_IMAGE}</p>
|
||||
<p class="mrg_6">{USER_AVATAR}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -351,16 +242,14 @@
|
|||
<tr>
|
||||
<td colspan="2">
|
||||
<table class="borderless bCenter w80 med">
|
||||
<tr>
|
||||
<td>{AVATAR_EXPLAIN}</td>
|
||||
<td class="tCenter nowrap">
|
||||
<p>{L_CURRENT_IMAGE}</p>
|
||||
|
||||
<p class="mrg_6">{USER_AVATAR}</p>
|
||||
|
||||
<p><label><input type="checkbox" name="avatardel"/> {L_DELETE_IMAGE}</label></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{AVATAR_EXPLAIN}</td>
|
||||
<td class="tCenter nowrap">
|
||||
<p>{L_CURRENT_IMAGE}</p>
|
||||
<p class="mrg_6">{USER_AVATAR}</p>
|
||||
<p><label><input type="checkbox" name="avatardel" /> {L_DELETE_IMAGE}</label></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -368,27 +257,27 @@
|
|||
<tr>
|
||||
<td>{L_UPLOAD_AVATAR_FILE}:</td>
|
||||
<td>
|
||||
<input type="file" name="avatar" size="40"/>
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}"/>
|
||||
<input type="file" name="avatar" size="40" />
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
|
||||
</td>
|
||||
</tr>
|
||||
<!-- END switch_avatar_local_upload -->
|
||||
<!-- BEGIN switch_avatar_remote_upload -->
|
||||
<tr>
|
||||
<td>{L_UPLOAD_AVATAR_URL}:<h6>{L_UPLOAD_AVATAR_URL_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="avatarurl" size="44"/></td>
|
||||
<td><input type="text" name="avatarurl" size="44" /></td>
|
||||
</tr>
|
||||
<!-- END switch_avatar_remote_upload -->
|
||||
<!-- BEGIN switch_avatar_remote_link -->
|
||||
<tr>
|
||||
<td>{L_LINK_REMOTE_AVATAR}:<h6>{L_LINK_REMOTE_AVATAR_EXPLAIN}</h6></td>
|
||||
<td><input type="text" name="avatarremoteurl" size="44"/></td>
|
||||
<td><input type="text" name="avatarremoteurl" size="44" /></td>
|
||||
</tr>
|
||||
<!-- END switch_avatar_remote_link -->
|
||||
<!-- BEGIN switch_avatar_local_gallery -->
|
||||
<tr>
|
||||
<td>{L_AVATAR_GALLERY}:</td>
|
||||
<td><input type="submit" name="avatargallery" value="{L_VIEW_AVATAR_GALLERY}" class="lite"/></td>
|
||||
<td><input type="submit" name="avatargallery" value="{L_VIEW_AVATAR_GALLERY}" class="lite" /></td>
|
||||
</tr>
|
||||
<!-- END switch_avatar_local_gallery -->
|
||||
<!-- END switch_avatar_block -->
|
||||
|
@ -397,29 +286,25 @@
|
|||
<!-- IF SHOW_REG_AGREEMENT -->
|
||||
<tr>
|
||||
<td class="row2" colspan="2">
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">{L_USER_AGREEMENT_HEAD}</legend>
|
||||
<div class="bCenter">
|
||||
<?php include($bb_cfg['user_agreement_html_path']) ?>
|
||||
</div>
|
||||
<p class="med bold mrg_4 tCenter"><label><input type="checkbox" value="" checked="checked"
|
||||
disabled="disabled"/> {L_USER_AGREEMENT_AGREE}</label>
|
||||
</p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!--/infobox-wrap-->
|
||||
<div id="infobox-wrap" class="bCenter row1">
|
||||
<fieldset class="pad_6">
|
||||
<legend class="med bold mrg_2 warnColor1">{L_USER_AGREEMENT_HEAD}</legend>
|
||||
<div class="bCenter">
|
||||
<?php include($bb_cfg['user_agreement_html_path']) ?>
|
||||
</div>
|
||||
<p class="med bold mrg_4 tCenter"><label><input type="checkbox" value="" checked="checked" disabled="disabled" /> {L_USER_AGREEMENT_AGREE}</label></p>
|
||||
</fieldset>
|
||||
</div><!--/infobox-wrap-->
|
||||
</td>
|
||||
</tr>
|
||||
<!-- ENDIF / SHOW_REG_AGREEMENT -->
|
||||
|
||||
<tr>
|
||||
<td class="catBottom" colspan="2">
|
||||
<div id="submit-buttons">
|
||||
<!-- IF EDIT_PROFILE --><input type="reset" value="{L_RESET}" name="reset" class="lite"/>
|
||||
<!-- ENDIF -->
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="main"/>
|
||||
</div>
|
||||
<div id="submit-buttons">
|
||||
<!-- IF EDIT_PROFILE --><input type="reset" value="{L_RESET}" name="reset" class="lite" /> <!-- ENDIF -->
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="main" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
define('BB_SCRIPT', 'tracker');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT . 'common.php');
|
||||
require(BB_ROOT .'common.php');
|
||||
|
||||
require(INC_DIR . 'class.utf8.php');
|
||||
require(INC_DIR . 'class.correct.php');
|
||||
require(INC_DIR . 'class.reflection.php');
|
||||
require(INC_DIR .'class.utf8.php');
|
||||
require(INC_DIR .'class.correct.php');
|
||||
require(INC_DIR .'class.reflection.php');
|
||||
|
||||
// Page config
|
||||
$page_cfg['include_bbcode_js'] = true;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
xZ6v0bcwckAqvp506NFR
|
|
@ -3,7 +3,7 @@
|
|||
define('IN_PHPBB', true);
|
||||
define('BB_SCRIPT', 'topic');
|
||||
define('BB_ROOT', './');
|
||||
require(BB_ROOT ."common.php");
|
||||
require(BB_ROOT .'common.php');
|
||||
require(INC_DIR .'bbcode.php');
|
||||
|
||||
$datastore->enqueue(array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue