Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: xmlhttp.php 5380 2011-02-21 12:04:43Z Tomm $
| * $Id$
|
*/
/**
| */
/**
|
Zeile 18 | Zeile 18 |
---|
* This is done to make response times when using XML HTTP Requests faster and * less intense on the server. */
|
* This is done to make response times when using XML HTTP Requests faster and * less intense on the server. */
|
define("IN_MYBB", 1);
| define("IN_MYBB", 1);
|
// We don't want visits here showing up on the Who's Online define("NO_ONLINE", 1);
|
// We don't want visits here showing up on the Who's Online define("NO_ONLINE", 1);
|
|
|
define('THIS_SCRIPT', 'xmlhttp.php');
// Load MyBB core files require_once dirname(__FILE__)."/inc/init.php";
|
define('THIS_SCRIPT', 'xmlhttp.php');
// Load MyBB core files require_once dirname(__FILE__)."/inc/init.php";
|
$shutdown_queries = array();
| $shutdown_queries = array();
|
// Load some of the stock caches we'll be using. $groupscache = $cache->read("usergroups");
| // Load some of the stock caches we'll be using. $groupscache = $cache->read("usergroups");
|
Zeile 38 | Zeile 38 |
---|
{ $cache->update_usergroups(); $groupscache = $cache->read("usergroups");
|
{ $cache->update_usergroups(); $groupscache = $cache->read("usergroups");
|
}
| }
|
// Send no cache headers header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
| // Send no cache headers header("Expires: Sat, 1 Jan 2000 01:00:00 GMT");
|
Zeile 98 | Zeile 98 |
---|
$theme['imglangdir'] = $theme['imgdir']; } }
|
$theme['imglangdir'] = $theme['imgdir']; } }
|
| $templatelist = "postbit_editedby,xmlhttp_inline_post_editor,xmlhttp_buddyselect_online,xmlhttp_buddyselect_offline,xmlhttp_buddyselect"; $templates->cache($db->escape_string($templatelist));
|
if($lang->settings['charset']) {
| if($lang->settings['charset']) {
|
Zeile 122 | Zeile 125 |
---|
{ exit; }
|
{ exit; }
|
|
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
// Sanitize the input. $mybb->input['query'] = str_replace(array("%", "_"), array("\\%", "\\_"), $mybb->input['query']);
| |
// Query for any matching users. $query_options = array( "order_by" => "username",
|
// Query for any matching users. $query_options = array( "order_by" => "username",
|
"order_dir" => "asc",
| "order_dir" => "asc",
|
"limit_start" => 0, "limit" => 15 );
|
"limit_start" => 0, "limit" => 15 );
|
$query = $db->simple_select("users", "uid, username", "username LIKE '".$db->escape_string($mybb->input['query'])."%'", $query_options);
| $query = $db->simple_select("users", "uid, username", "username LIKE '".$db->escape_string_like($mybb->input['query'])."%'", $query_options);
|
while($user = $db->fetch_array($query)) { $user['username'] = htmlspecialchars_uni($user['username']);
| while($user = $db->fetch_array($query)) { $user['username'] = htmlspecialchars_uni($user['username']);
|
Zeile 154 | Zeile 154 |
---|
{ exit; }
|
{ exit; }
|
|
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
|
|
// Sanitize the input. $mybb->input['query'] = str_replace(array("%", "_"), array("\\%", "\\_"), $mybb->input['query']);
|
// Sanitize the input. $mybb->input['query'] = str_replace(array("%", "_"), array("\\%", "\\_"), $mybb->input['query']);
|
|
|
// Query for any matching usergroups. $query_options = array( "order_by" => "title",
| // Query for any matching usergroups. $query_options = array( "order_by" => "title",
|
Zeile 168 | Zeile 168 |
---|
"limit_start" => 0, "limit" => 15 );
|
"limit_start" => 0, "limit" => 15 );
|
|
|
$query = $db->simple_select("usergroups", "gid, title", "title LIKE '".$db->escape_string($mybb->input['query'])."%'", $query_options); while($group = $db->fetch_array($query)) {
| $query = $db->simple_select("usergroups", "gid, title", "title LIKE '".$db->escape_string($mybb->input['query'])."%'", $query_options); while($group = $db->fetch_array($query)) {
|
Zeile 187 | Zeile 187 |
---|
{ xmlhttp_error($lang->invalid_post_code); }
|
{ xmlhttp_error($lang->invalid_post_code); }
|
|
|
// Editing a post subject. if($mybb->input['pid']) { // Fetch the post from the database. $post = get_post($mybb->input['pid']);
|
// Editing a post subject. if($mybb->input['pid']) { // Fetch the post from the database. $post = get_post($mybb->input['pid']);
|
|
|
// No result, die. if(!$post['pid']) { xmlhttp_error($lang->post_doesnt_exist); }
|
// No result, die. if(!$post['pid']) { xmlhttp_error($lang->post_doesnt_exist); }
|
|
|
// Fetch the thread associated with this post. $thread = get_thread($post['tid']); }
|
// Fetch the thread associated with this post. $thread = get_thread($post['tid']); }
|
|
|
// We're editing a thread subject. else if($mybb->input['tid']) { // Fetch the thread. $thread = get_thread($mybb->input['tid']);
|
// We're editing a thread subject. else if($mybb->input['tid']) { // Fetch the thread. $thread = get_thread($mybb->input['tid']);
|
|
|
// Fetch some of the information from the first post of this thread. $query_options = array( "order_by" => "dateline",
| // Fetch some of the information from the first post of this thread. $query_options = array( "order_by" => "dateline",
|
Zeile 220 | Zeile 220 |
---|
} // Fetch the specific forum this thread/post is in. $forum = get_forum($thread['fid']);
|
} // Fetch the specific forum this thread/post is in. $forum = get_forum($thread['fid']);
|
|
|
// Missing thread, invalid forum? Error. if(!$thread['tid'] || !$forum['fid'] || $forum['type'] != "f") { xmlhttp_error($lang->thread_doesnt_exist); }
|
// Missing thread, invalid forum? Error. if(!$thread['tid'] || !$forum['fid'] || $forum['type'] != "f") { xmlhttp_error($lang->thread_doesnt_exist); }
|
|
|
// Fetch forum permissions. $forumpermissions = forum_permissions($forum['fid']);
|
// Fetch forum permissions. $forumpermissions = forum_permissions($forum['fid']);
|
|
|
// If this user is not a moderator with "caneditposts" permissions. if(!is_moderator($forum['fid'], "caneditposts")) {
| // If this user is not a moderator with "caneditposts" permissions. if(!is_moderator($forum['fid'], "caneditposts")) {
|
Zeile 254 | Zeile 254 |
---|
else { $ismod = true;
|
else { $ismod = true;
|
}
| }
|
$subject = $mybb->input['value']; if(my_strtolower($charset) != "utf-8") { if(function_exists("iconv"))
|
$subject = $mybb->input['value']; if(my_strtolower($charset) != "utf-8") { if(function_exists("iconv"))
|
{
| {
|
$subject = iconv($charset, "UTF-8//IGNORE", $subject); } else if(function_exists("mb_convert_encoding")) { $subject = @mb_convert_encoding($subject, $charset, "UTF-8");
|
$subject = iconv($charset, "UTF-8//IGNORE", $subject); } else if(function_exists("mb_convert_encoding")) { $subject = @mb_convert_encoding($subject, $charset, "UTF-8");
|
}
| }
|
else if(my_strtolower($charset) == "iso-8859-1") { $subject = utf8_decode($subject); }
|
else if(my_strtolower($charset) == "iso-8859-1") { $subject = utf8_decode($subject); }
|
}
| }
|
// Set up posthandler. require_once MYBB_ROOT."inc/datahandlers/post.php"; $posthandler = new PostDataHandler("update");
| // Set up posthandler. require_once MYBB_ROOT."inc/datahandlers/post.php"; $posthandler = new PostDataHandler("update");
|
Zeile 288 | Zeile 288 |
---|
// Now let the post handler do all the hard work. if(!$posthandler->validate_post())
|
// Now let the post handler do all the hard work. if(!$posthandler->validate_post())
|
{
| {
|
$post_errors = $posthandler->get_friendly_errors(); $errors = implode("\n\n", $post_errors); xmlhttp_error($errors);
| $post_errors = $posthandler->get_friendly_errors(); $errors = implode("\n\n", $post_errors); xmlhttp_error($errors);
|
Zeile 298 | Zeile 298 |
---|
{ $posthandler->update_post(); if($ismod == true)
|
{ $posthandler->update_post(); if($ismod == true)
|
{
| {
|
$modlogdata = array( "tid" => $thread['tid'],
|
$modlogdata = array( "tid" => $thread['tid'],
|
"pid" => $post['pid'],
| |
"fid" => $forum['fid'] ); log_moderator_action($modlogdata, $lang->edited_post); } }
|
"fid" => $forum['fid'] ); log_moderator_action($modlogdata, $lang->edited_post); } }
|
|
|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
|
|
$mybb->input['value'] = $parser->parse_badwords($mybb->input['value']);
|
$mybb->input['value'] = $parser->parse_badwords($mybb->input['value']);
|
|
|
// Spit the subject back to the browser. echo substr($mybb->input['value'], 0, 120); // 120 is the varchar length for the subject column
|
// Spit the subject back to the browser. echo substr($mybb->input['value'], 0, 120); // 120 is the varchar length for the subject column
|
|
|
// Close the connection. exit; } else if($mybb->input['action'] == "edit_post")
|
// Close the connection. exit; } else if($mybb->input['action'] == "edit_post")
|
{
| {
|
// Fetch the post from the database. $post = get_post($mybb->input['pid']);
|
// Fetch the post from the database. $post = get_post($mybb->input['pid']);
|
|
|
// No result, die. if(!$post['pid']) { xmlhttp_error($lang->post_doesnt_exist);
|
// No result, die. if(!$post['pid']) { xmlhttp_error($lang->post_doesnt_exist);
|
}
| }
|
// Fetch the thread associated with this post. $thread = get_thread($post['tid']);
| // Fetch the thread associated with this post. $thread = get_thread($post['tid']);
|
Zeile 344 | Zeile 343 |
---|
{ xmlhttp_error($lang->thread_doesnt_exist); }
|
{ xmlhttp_error($lang->thread_doesnt_exist); }
|
|
|
// Fetch forum permissions. $forumpermissions = forum_permissions($forum['fid']);
|
// Fetch forum permissions. $forumpermissions = forum_permissions($forum['fid']);
|
|
|
// If this user is not a moderator with "caneditposts" permissions. if(!is_moderator($forum['fid'], "caneditposts")) {
| // If this user is not a moderator with "caneditposts" permissions. if(!is_moderator($forum['fid'], "caneditposts")) {
|
Zeile 358 | Zeile 357 |
---|
} // Forum is not open, user doesn't have permission to edit, or author doesn't match this user - don't allow editing. else if($forum['open'] == 0 || $forumpermissions['caneditposts'] == 0 || $mybb->user['uid'] != $post['uid'] || $mybb->user['uid'] == 0 || $mybb->user['suspendposting'] == 1)
|
} // Forum is not open, user doesn't have permission to edit, or author doesn't match this user - don't allow editing. else if($forum['open'] == 0 || $forumpermissions['caneditposts'] == 0 || $mybb->user['uid'] != $post['uid'] || $mybb->user['uid'] == 0 || $mybb->user['suspendposting'] == 1)
|
{ xmlhttp_error($lang->no_permission_edit_post);
| { xmlhttp_error($lang->no_permission_edit_post);
|
} // If we're past the edit time limit - don't allow editing. else if($mybb->settings['edittimelimit'] != 0 && $post['dateline'] < (TIME_NOW-($mybb->settings['edittimelimit']*60)))
|
} // If we're past the edit time limit - don't allow editing. else if($mybb->settings['edittimelimit'] != 0 && $post['dateline'] < (TIME_NOW-($mybb->settings['edittimelimit']*60)))
|
{
| {
|
$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->settings['edittimelimit']); xmlhttp_error($lang->edit_time_limit);
|
$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->settings['edittimelimit']); xmlhttp_error($lang->edit_time_limit);
|
| } // User can't edit unapproved post if($post['visible'] == 0) { xmlhttp_error($lang->post_moderation); }
// Forum is closed - no editing allowed if($forum['open'] == 0) { xmlhttp_error($lang->no_permission_edit_post);
|
} }
|
} }
|
// Forum is closed - no editing allowed (for anyone) if($forum['open'] == 0) { xmlhttp_error($lang->no_permission_edit_post); }
| |
if($mybb->input['do'] == "get_post") { // Send our headers. header("Content-type: text/xml; charset={$charset}");
|
if($mybb->input['do'] == "get_post") { // Send our headers. header("Content-type: text/xml; charset={$charset}");
|
|
|
$post['message'] = htmlspecialchars_uni($post['message']);
|
$post['message'] = htmlspecialchars_uni($post['message']);
|
|
|
// Send the contents of the post. eval("\$inline_editor = \"".$templates->get("xmlhttp_inline_post_editor")."\";"); echo "<?xml version=\"1.0\" encoding=\"{$charset}\"?".">";
| // Send the contents of the post. eval("\$inline_editor = \"".$templates->get("xmlhttp_inline_post_editor")."\";"); echo "<?xml version=\"1.0\" encoding=\"{$charset}\"?".">";
|
Zeile 412 | Zeile 415 |
---|
$message = utf8_decode($message); } }
|
$message = utf8_decode($message); } }
|
|
|
// Set up posthandler. require_once MYBB_ROOT."inc/datahandlers/post.php"; $posthandler = new PostDataHandler("update");
| // Set up posthandler. require_once MYBB_ROOT."inc/datahandlers/post.php"; $posthandler = new PostDataHandler("update");
|
Zeile 438 | Zeile 441 |
---|
{ $postinfo = $posthandler->update_post(); $visible = $postinfo['visible'];
|
{ $postinfo = $posthandler->update_post(); $visible = $postinfo['visible'];
|
if($visible == 0 && !is_moderator())
| if($visible == 0 && !is_moderator($post['fid']))
|
{ echo "<p>\n"; echo $lang->post_moderation;
| { echo "<p>\n"; echo $lang->post_moderation;
|
Zeile 449 | Zeile 452 |
---|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
|
|
$parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'],
| $parser_options = array( "allow_html" => $forum['allowhtml'], "allow_mycode" => $forum['allowmycode'],
|
Zeile 459 | Zeile 462 |
---|
"me_username" => $post['username'], "filter_badwords" => 1 );
|
"me_username" => $post['username'], "filter_badwords" => 1 );
|
|
|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
|
if($post['smilieoff'] == 1) { $parser_options['allow_smilies'] = 0; }
|
|
|
$post['message'] = $parser->parse_message($message, $parser_options);
|
$post['message'] = $parser->parse_message($message, $parser_options);
|
|
|
// Now lets fetch all of the attachments for these posts. $query = $db->simple_select("attachments", "*", "pid='{$post['pid']}'"); while($attachment = $db->fetch_array($query)) { $attachcache[$attachment['pid']][$attachment['aid']] = $attachment; }
|
// Now lets fetch all of the attachments for these posts. $query = $db->simple_select("attachments", "*", "pid='{$post['pid']}'"); while($attachment = $db->fetch_array($query)) { $attachcache[$attachment['pid']][$attachment['aid']] = $attachment; }
|
|
|
require_once MYBB_ROOT."inc/functions_post.php";
|
require_once MYBB_ROOT."inc/functions_post.php";
|
|
|
get_post_attachments($post['pid'], $post);
// Figure out if we need to show an "edited by" message
| get_post_attachments($post['pid'], $post);
// Figure out if we need to show an "edited by" message
|
Zeile 488 | Zeile 491 |
---|
$post['editedprofilelink'] = build_profile_link($mybb->user['username'], $mybb->user['uid']); eval("\$editedmsg = \"".$templates->get("postbit_editedby")."\";"); }
|
$post['editedprofilelink'] = build_profile_link($mybb->user['username'], $mybb->user['uid']); eval("\$editedmsg = \"".$templates->get("postbit_editedby")."\";"); }
|
|
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
// Send our headers. header("Content-type: text/plain; charset={$charset}");
|
echo "<p>\n"; echo $post['message']; echo "</p>\n";
| echo $post['message']."\n";
|
if($editedmsg) { echo str_replace(array("\r", "\n"), "", "<editedmsg>{$editedmsg}</editedmsg>");
| if($editedmsg) { echo str_replace(array("\r", "\n"), "", "<editedmsg>{$editedmsg}</editedmsg>");
|
Zeile 510 | Zeile 511 |
---|
} // Divide up the cookie using our delimeter $multiquoted = explode("|", $mybb->cookies['multiquote']);
|
} // Divide up the cookie using our delimeter $multiquoted = explode("|", $mybb->cookies['multiquote']);
|
|
|
// No values - exit if(!is_array($multiquoted)) { exit; }
|
// No values - exit if(!is_array($multiquoted)) { exit; }
|
|
|
// Loop through each post ID and sanitize it before querying foreach($multiquoted as $post)
|
// Loop through each post ID and sanitize it before querying foreach($multiquoted as $post)
|
{
| {
|
$quoted_posts[$post] = intval($post); }
|
$quoted_posts[$post] = intval($post); }
|
|
|
// Join the post IDs back together $quoted_posts = implode(",", $quoted_posts);
|
// Join the post IDs back together $quoted_posts = implode(",", $quoted_posts);
|
|
|
// Fetch unviewable forums $unviewable_forums = get_unviewable_forums(); if($unviewable_forums)
| // Fetch unviewable forums $unviewable_forums = get_unviewable_forums(); if($unviewable_forums)
|
Zeile 533 | Zeile 534 |
---|
$unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})"; } $message = '';
|
$unviewable_forums = "AND t.fid NOT IN ({$unviewable_forums})"; } $message = '';
|
|
|
// Are we loading all quoted posts or only those not in the current thread? if(!$mybb->input['load_all']) {
| // Are we loading all quoted posts or only those not in the current thread? if(!$mybb->input['load_all']) {
|
Zeile 542 | Zeile 543 |
---|
else { $from_tid = '';
|
else { $from_tid = '';
|
}
| }
|
require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
| require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
Zeile 556 | Zeile 557 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE {$from_tid}p.pid IN ($quoted_posts) {$unviewable_forums}
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE {$from_tid}p.pid IN ($quoted_posts) {$unviewable_forums}
|
| ORDER BY p.dateline
|
"); while($quoted_post = $db->fetch_array($query)) {
| "); while($quoted_post = $db->fetch_array($query)) {
|
Zeile 563 | Zeile 565 |
---|
{ continue; }
|
{ continue; }
|
|
|
$message .= parse_quoted_message($quoted_post, false);
|
$message .= parse_quoted_message($quoted_post, false);
|
}
| }
|
if($mybb->settings['maxquotedepth'] != '0') { $message = remove_message_quotes($message); }
|
if($mybb->settings['maxquotedepth'] != '0') { $message = remove_message_quotes($message); }
|
|
|
// Send our headers. header("Content-type: text/plain; charset={$charset}"); echo $message;
|
// Send our headers. header("Content-type: text/plain; charset={$charset}"); echo $message;
|
exit;
| exit;
|
} else if($mybb->input['action'] == "refresh_captcha") {
| } else if($mybb->input['action'] == "refresh_captcha") {
|
Zeile 622 | Zeile 624 |
---|
else if($mybb->input['action'] == "complex_password") { $password = trim($mybb->input['value']);
|
else if($mybb->input['action'] == "complex_password") { $password = trim($mybb->input['value']);
|
$password = str_replace(array(unicode_chr(160), unicode_chr(173), unicode_chr(0xCA), dec_to_utf8(8238), dec_to_utf8(8237), dec_to_utf8(8203)), array(" ", "-", "", "", "", ""), $password);
| $password = str_replace(array(unichr(160), unichr(173), unichr(0xCA), dec_to_utf8(8238), dec_to_utf8(8237), dec_to_utf8(8203)), array(" ", "-", "", "", "", ""), $password);
|
header("Content-type: text/xml; charset={$charset}"); if(!preg_match("/^.*(?=.{".$mybb->settings['minpasswordlength'].",})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/", $password))
| header("Content-type: text/xml; charset={$charset}"); if(!preg_match("/^.*(?=.{".$mybb->settings['minpasswordlength'].",})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/", $password))
|
Zeile 648 | Zeile 650 |
---|
$username = $mybb->input['value'];
// Fix bad characters
|
$username = $mybb->input['value'];
// Fix bad characters
|
$username = trim($username); $username = str_replace(array(unicode_chr(160), unicode_chr(173), unicode_chr(0xCA), dec_to_utf8(8238), dec_to_utf8(8237), dec_to_utf8(8203)), array(" ", "-", "", "", "", ""), $username);
| $username = trim_blank_chrs($username); $username = str_replace(array(unichr(160), unichr(173), unichr(0xCA), dec_to_utf8(8238), dec_to_utf8(8237), dec_to_utf8(8203)), array(" ", "-", "", "", "", ""), $username);
|
// Remove multiple spaces from the username $username = preg_replace("#\s{2,}#", " ", $username);
| // Remove multiple spaces from the username $username = preg_replace("#\s{2,}#", " ", $username);
|
Zeile 661 | Zeile 663 |
---|
echo "<fail>{$lang->banned_characters_username}</fail>"; exit; }
|
echo "<fail>{$lang->banned_characters_username}</fail>"; exit; }
|
|
|
// Check if the username belongs to the list of banned usernames. $banned_username = is_banned_username($username, true); if($banned_username) { echo "<fail>{$lang->banned_username}</fail>";
|
// Check if the username belongs to the list of banned usernames. $banned_username = is_banned_username($username, true); if($banned_username) { echo "<fail>{$lang->banned_username}</fail>";
|
exit;
| exit;
|
}
// Check for certain characters in username (<, >, &, and slashes)
|
}
// Check for certain characters in username (<, >, &, and slashes)
|
if(strpos($username, "<") !== false || strpos($username, ">") !== false || strpos($username, "&") !== false || my_strpos($username, "\\") !== false || strpos($username, ";") !== false)
| if(strpos($username, "<") !== false || strpos($username, ">") !== false || strpos($username, "&") !== false || my_strpos($username, "\\") !== false || strpos($username, ";") !== false|| strpos($username, ",") !== false || !validate_utf8_string($username, false, false))
|
{ echo "<fail>{$lang->banned_characters_username}</fail>"; exit; }
|
{ echo "<fail>{$lang->banned_characters_username}</fail>"; exit; }
|
|
|
// Check if the username is actually already in use $query = $db->simple_select("users", "uid", "LOWER(username)='".$db->escape_string(my_strtolower($username))."'"); $user = $db->fetch_array($query);
| // Check if the username is actually already in use $query = $db->simple_select("users", "uid", "LOWER(username)='".$db->escape_string(my_strtolower($username))."'"); $user = $db->fetch_array($query);
|
Zeile 685 | Zeile 687 |
---|
{ $lang->username_taken = $lang->sprintf($lang->username_taken, htmlspecialchars_uni($username)); echo "<fail>{$lang->username_taken}</fail>";
|
{ $lang->username_taken = $lang->sprintf($lang->username_taken, htmlspecialchars_uni($username)); echo "<fail>{$lang->username_taken}</fail>";
|
exit;
| exit;
|
} else {
| } else {
|
Zeile 724 | Zeile 726 |
---|
} else {
|
} else {
|
$lang->invalid_username = $lang->sprintf($lang->invalid_username, htmlspecialchars_uni($username));
| $lang->invalid_username = htmlspecialchars_uni($lang->sprintf($lang->invalid_username, htmlspecialchars_uni($username)));
|
echo "<fail>{$lang->invalid_username}</fail>"; exit; }
| echo "<fail>{$lang->invalid_username}</fail>"; exit; }
|
Zeile 740 | Zeile 742 |
---|
"order_by" => "username", "order_dir" => "asc" );
|
"order_by" => "username", "order_dir" => "asc" );
|
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
| $timecut = TIME_NOW - $mybb->settings['wolcutoff'];
|
$query = $db->simple_select("users", "uid, username, usergroup, displaygroup, lastactive, lastvisit, invisible", "uid IN ({$mybb->user['buddylist']})", $query_options); $online = array(); $offline = array();
| $query = $db->simple_select("users", "uid, username, usergroup, displaygroup, lastactive, lastvisit, invisible", "uid IN ({$mybb->user['buddylist']})", $query_options); $online = array(); $offline = array();
|
Zeile 776 | Zeile 778 |
---|
function xmlhttp_error($message) { global $charset;
|
function xmlhttp_error($message) { global $charset;
|
|
|
// Send our headers. header("Content-type: text/xml; charset={$charset}");
|
// Send our headers. header("Content-type: text/xml; charset={$charset}");
|
|
|
// Send the error message. echo "<error>".$message."</error>";
|
// Send the error message. echo "<error>".$message."</error>";
|
|
|
// Exit exit; }
| // Exit exit; }
|