mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r563
Перенос оставшихся пользовательских функций из ajax.php в отдельные .php-файлы. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@563 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
parent
399ac5a1b0
commit
58fea37572
7 changed files with 199 additions and 166 deletions
181
upload/ajax.php
181
upload/ajax.php
|
@ -132,7 +132,7 @@ class ajax_common
|
||||||
{
|
{
|
||||||
// GUEST
|
// GUEST
|
||||||
case 'guest':
|
case 'guest':
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// USER
|
// USER
|
||||||
case 'user':
|
case 'user':
|
||||||
|
@ -140,7 +140,7 @@ class ajax_common
|
||||||
{
|
{
|
||||||
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// MOD
|
// MOD
|
||||||
case 'mod':
|
case 'mod':
|
||||||
|
@ -149,7 +149,7 @@ class ajax_common
|
||||||
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
$this->ajax_die($lang['ONLY_FOR_MOD']);
|
||||||
}
|
}
|
||||||
$this->check_admin_session();
|
$this->check_admin_session();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// ADMIN
|
// ADMIN
|
||||||
case 'admin':
|
case 'admin':
|
||||||
|
@ -158,7 +158,7 @@ class ajax_common
|
||||||
$this->ajax_die($lang['ONLY_FOR_ADMIN']);
|
$this->ajax_die($lang['ONLY_FOR_ADMIN']);
|
||||||
}
|
}
|
||||||
$this->check_admin_session();
|
$this->check_admin_session();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// SUPER_ADMIN
|
// SUPER_ADMIN
|
||||||
case 'super_admin':
|
case 'super_admin':
|
||||||
|
@ -167,7 +167,7 @@ class ajax_common
|
||||||
$this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']);
|
$this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']);
|
||||||
}
|
}
|
||||||
$this->check_admin_session();
|
$this->check_admin_session();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
trigger_error("invalid auth type for $action", E_USER_ERROR);
|
trigger_error("invalid auth type for $action", E_USER_ERROR);
|
||||||
|
@ -313,174 +313,27 @@ class ajax_common
|
||||||
|
|
||||||
function change_user_rank ()
|
function change_user_rank ()
|
||||||
{
|
{
|
||||||
global $datastore, $lang;
|
require(AJAX_DIR .'change_user_rank.php');
|
||||||
|
|
||||||
$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))
|
|
||||||
{
|
|
||||||
$this->ajax_die("invalid user_id: $user_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");
|
|
||||||
|
|
||||||
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'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function change_user_opt ()
|
function change_user_opt ()
|
||||||
{
|
{
|
||||||
global $bf, $lang;
|
require(AJAX_DIR .'change_user_opt.php');
|
||||||
|
|
||||||
$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))
|
|
||||||
{
|
|
||||||
$this->ajax_die('invalid user_id');
|
|
||||||
}
|
|
||||||
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]))
|
|
||||||
{
|
|
||||||
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");
|
|
||||||
|
|
||||||
// Удаляем данные из кеша
|
|
||||||
cache_rm_user_sessions ($user_id);
|
|
||||||
|
|
||||||
$this->response['resp_html'] = $lang['SAVED'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function gen_passkey ()
|
function gen_passkey ()
|
||||||
{
|
{
|
||||||
global $userdata, $lang;
|
require(AJAX_DIR .'gen_passkey.php');
|
||||||
|
|
||||||
$req_uid = (int) $this->request['user_id'];
|
|
||||||
|
|
||||||
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))
|
|
||||||
{
|
|
||||||
$this->ajax_die('Could not insert passkey');
|
|
||||||
}
|
|
||||||
tracker_rm_user($req_uid);
|
|
||||||
$this->response['passkey'] = $passkey;
|
|
||||||
}
|
|
||||||
else $this->ajax_die($lang['NOT_AUTHORISED']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// User groups membership
|
|
||||||
function group_membership ()
|
function group_membership ()
|
||||||
{
|
{
|
||||||
global $lang, $user;
|
require(AJAX_DIR .'group_membership.php');
|
||||||
|
|
||||||
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'])
|
|
||||||
{
|
|
||||||
$this->ajax_die('invalid mode (empty)');
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
|
||||||
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';
|
|
||||||
$class .= ($row['group_moderator'] == $user_id) ? ' colorMod' : '';
|
|
||||||
$href = "groupcp.php?g={$row['group_id']}";
|
|
||||||
|
|
||||||
if (IS_ADMIN)
|
|
||||||
{
|
|
||||||
$href .= "&u=$user_id";
|
|
||||||
$link = '<a href="'. $href .'" class="'. $class .'" target="_blank">'. htmlCHR($row['group_name']) .'</a>';
|
|
||||||
$html[] = $link;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// скрытая группа и сам юзер не является её членом
|
|
||||||
if ($row['group_type'] == GROUP_HIDDEN && !$row['can_view'])
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ($row['group_moderator'] == $user->id)
|
|
||||||
{
|
|
||||||
$class .= ' selfMod';
|
|
||||||
$href .= "&u=$user_id"; // сам юзер модератор этой группы
|
|
||||||
}
|
|
||||||
$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
|
|
||||||
{
|
|
||||||
$this->response['group_list_html'] = $lang['GROUP_LIST_HIDDEN'];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$this->ajax_die("invalid mode: $mode");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function post_mod_comment ()
|
function post_mod_comment ()
|
||||||
{
|
{
|
||||||
global $lang, $userdata;
|
require(AJAX_DIR .'post_mod_comment.php');
|
||||||
|
|
||||||
$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
|
|
||||||
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'];
|
|
||||||
$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");
|
|
||||||
$this->response['type'] = $type;
|
|
||||||
$this->response['post_id'] = $post_id;
|
|
||||||
if ($type == 0) $this->response['html'] = '';
|
|
||||||
elseif ($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>';
|
|
||||||
elseif ($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 ()
|
||||||
|
@ -503,37 +356,37 @@ class ajax_common
|
||||||
require(AJAX_DIR .'view_torrent.php');
|
require(AJAX_DIR .'view_torrent.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function user_register()
|
function user_register ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'user_register.php');
|
require(AJAX_DIR .'user_register.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function mod_action()
|
function mod_action ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'mod_action.php');
|
require(AJAX_DIR .'mod_action.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function posts()
|
function posts ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'posts.php');
|
require(AJAX_DIR .'posts.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function manage_user()
|
function manage_user ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'manage_user.php');
|
require(AJAX_DIR .'manage_user.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function topic_tpl()
|
function topic_tpl ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'topic_tpl.php');
|
require(AJAX_DIR .'topic_tpl.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function index_data()
|
function index_data ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'index_data.php');
|
require(AJAX_DIR .'index_data.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
function view_profile()
|
function view_profile ()
|
||||||
{
|
{
|
||||||
require(AJAX_DIR .'view_profile.php');
|
require(AJAX_DIR .'view_profile.php');
|
||||||
}
|
}
|
||||||
|
|
33
upload/ajax/change_user_opt.php
Normal file
33
upload/ajax/change_user_opt.php
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $bf, $lang;
|
||||||
|
|
||||||
|
$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))
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid user_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
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]))
|
||||||
|
{
|
||||||
|
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");
|
||||||
|
|
||||||
|
// Удаляем данные из кеша
|
||||||
|
cache_rm_user_sessions ($user_id);
|
||||||
|
|
||||||
|
$this->response['resp_html'] = $lang['SAVED'];
|
24
upload/ajax/change_user_rank.php
Normal file
24
upload/ajax/change_user_rank.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $datastore, $lang;
|
||||||
|
|
||||||
|
$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))
|
||||||
|
{
|
||||||
|
$this->ajax_die("invalid user_id: $user_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");
|
||||||
|
|
||||||
|
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'];
|
25
upload/ajax/gen_passkey.php
Normal file
25
upload/ajax/gen_passkey.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $userdata, $lang;
|
||||||
|
|
||||||
|
$req_uid = (int) $this->request['user_id'];
|
||||||
|
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
$this->ajax_die('Could not insert passkey');
|
||||||
|
}
|
||||||
|
|
||||||
|
tracker_rm_user($req_uid);
|
||||||
|
|
||||||
|
$this->response['passkey'] = $passkey;
|
||||||
|
}
|
||||||
|
else $this->ajax_die($lang['NOT_AUTHORISED']);
|
69
upload/ajax/group_membership.php
Normal file
69
upload/ajax/group_membership.php
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $lang, $user;
|
||||||
|
|
||||||
|
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'])
|
||||||
|
{
|
||||||
|
$this->ajax_die('invalid mode (empty)');
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
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';
|
||||||
|
$class .= ($row['group_moderator'] == $user_id) ? ' colorMod' : '';
|
||||||
|
$href = "groupcp.php?g={$row['group_id']}";
|
||||||
|
|
||||||
|
if (IS_ADMIN)
|
||||||
|
{
|
||||||
|
$href .= "&u=$user_id";
|
||||||
|
$link = '<a href="'. $href .'" class="'. $class .'" target="_blank">'. htmlCHR($row['group_name']) .'</a>';
|
||||||
|
$html[] = $link;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// скрытая группа и сам юзер не является её членом
|
||||||
|
if ($row['group_type'] == GROUP_HIDDEN && !$row['can_view'])
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ($row['group_moderator'] == $user->id)
|
||||||
|
{
|
||||||
|
$class .= ' selfMod';
|
||||||
|
$href .= "&u=$user_id"; // сам юзер модератор этой группы
|
||||||
|
}
|
||||||
|
$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
|
||||||
|
{
|
||||||
|
$this->response['group_list_html'] = $lang['GROUP_LIST_HIDDEN'];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
$this->ajax_die("invalid mode: $mode");
|
||||||
|
}
|
29
upload/ajax/post_mod_comment.php
Normal file
29
upload/ajax/post_mod_comment.php
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if (!defined('IN_AJAX')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $lang, $userdata;
|
||||||
|
|
||||||
|
$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
|
||||||
|
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'];
|
||||||
|
$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");
|
||||||
|
|
||||||
|
$this->response['type'] = $type;
|
||||||
|
$this->response['post_id'] = $post_id;
|
||||||
|
|
||||||
|
if ($type == 0) $this->response['html'] = '';
|
||||||
|
elseif ($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>';
|
||||||
|
elseif ($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>';
|
|
@ -56,7 +56,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||||
// Increase number of revision after update
|
// Increase number of revision after update
|
||||||
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
$bb_cfg['tp_version'] = '2.5 (unstable)';
|
||||||
$bb_cfg['tp_release_date'] = '19-01-2014';
|
$bb_cfg['tp_release_date'] = '19-01-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'R562';
|
$bb_cfg['tp_release_state'] = 'R563';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
$charset = 'utf8';
|
$charset = 'utf8';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue