Zeile 483 | Zeile 483 |
---|
$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->usergroup['edittimelimit']); xmlhttp_error($lang->edit_time_limit); }
|
$lang->edit_time_limit = $lang->sprintf($lang->edit_time_limit, $mybb->usergroup['edittimelimit']); xmlhttp_error($lang->edit_time_limit); }
|
// User can't edit unapproved post if($post['visible'] == 0)
| // User can't edit unapproved post unless permitted for own if($post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $post['uid'] == $mybb->user['uid']))
|
{ xmlhttp_error($lang->post_moderation); }
| { xmlhttp_error($lang->post_moderation); }
|
Zeile 745 | Zeile 745 |
---|
(in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->user['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid'])) ) {
|
(in_array($quoted_post['fid'], $onlyusfids) && (!$mybb->user['uid'] || $quoted_post['thread_uid'] != $mybb->user['uid'])) ) {
|
continue;
| // Allow quoting from own unapproved post if($quoted_post['visible'] == 0 && !($mybb->settings['showownunapproved'] && $quoted_post['uid'] == $mybb->user['uid'])) { continue; }
|
}
$message .= parse_quoted_message($quoted_post, false); } if($mybb->settings['maxquotedepth'] != '0')
|
}
$message .= parse_quoted_message($quoted_post, false); } if($mybb->settings['maxquotedepth'] != '0')
|
{
| {
|
$message = remove_message_quotes($message); }
// Send our headers.
|
$message = remove_message_quotes($message); }
// Send our headers.
|
header("Content-type: application/json; charset={$charset}");
| header("Content-type: application/json; charset={$charset}");
|
$plugins->run_hooks("xmlhttp_get_multiquoted_end");
| $plugins->run_hooks("xmlhttp_get_multiquoted_end");
|
Zeile 785 | Zeile 789 |
---|
$db->insert_query("captcha", $regimagearray); header("Content-type: application/json; charset={$charset}"); echo json_encode(array("imagehash" => $imagehash));
|
$db->insert_query("captcha", $regimagearray); header("Content-type: application/json; charset={$charset}"); echo json_encode(array("imagehash" => $imagehash));
|
exit; }
| exit; }
|
else if($mybb->input['action'] == "validate_captcha")
|
else if($mybb->input['action'] == "validate_captcha")
|
{ header("Content-type: application/json; charset={$charset}");
| { header("Content-type: application/json; charset={$charset}");
|
$imagehash = $db->escape_string($mybb->get_input('imagehash')); $query = $db->simple_select("captcha", "imagestring", "imagehash='$imagehash'");
|
$imagehash = $db->escape_string($mybb->get_input('imagehash')); $query = $db->simple_select("captcha", "imagestring", "imagehash='$imagehash'");
|
if($db->num_rows($query) == 0) {
| if($db->num_rows($query) == 0) {
|
echo json_encode($lang->captcha_valid_not_exists); exit; } $imagestring = $db->fetch_field($query, 'imagestring');
|
echo json_encode($lang->captcha_valid_not_exists); exit; } $imagestring = $db->fetch_field($query, 'imagestring');
|
|
|
$plugins->run_hooks("xmlhttp_validate_captcha");
if(my_strtolower($imagestring) == my_strtolower($mybb->get_input('imagestring')))
|
$plugins->run_hooks("xmlhttp_validate_captcha");
if(my_strtolower($imagestring) == my_strtolower($mybb->get_input('imagestring')))
|
{
| {
|
//echo json_encode(array("success" => $lang->captcha_matches)); echo json_encode("true");
|
//echo json_encode(array("success" => $lang->captcha_matches)); echo json_encode("true");
|
exit; }
| exit; }
|
else { echo json_encode($lang->captcha_does_not_match);
| else { echo json_encode($lang->captcha_does_not_match);
|
Zeile 820 | Zeile 824 |
---|
$sid = $db->escape_string($mybb->get_input('question_id')); $query = $db->query(" SELECT q.qid, s.sid
|
$sid = $db->escape_string($mybb->get_input('question_id')); $query = $db->query(" SELECT q.qid, s.sid
|
FROM ".TABLE_PREFIX."questionsessions s LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s.qid) WHERE q.active='1' AND s.sid='{$sid}' ");
if($db->num_rows($query) == 0) {
| FROM ".TABLE_PREFIX."questionsessions s LEFT JOIN ".TABLE_PREFIX."questions q ON (q.qid=s.qid) WHERE q.active='1' AND s.sid='{$sid}' ");
if($db->num_rows($query) == 0) {
|
xmlhttp_error($lang->answer_valid_not_exists); }
|
xmlhttp_error($lang->answer_valid_not_exists); }
|
$qsession = $db->fetch_array($query);
| $qsession = $db->fetch_array($query);
|
// Delete previous question session $db->delete_query("questionsessions", "sid='$sid'");
|
// Delete previous question session $db->delete_query("questionsessions", "sid='$sid'");
|
require_once MYBB_ROOT."inc/functions_user.php";
| require_once MYBB_ROOT."inc/functions_user.php";
|
$sid = generate_question($qsession['qid']); $query = $db->query(" SELECT q.question, s.sid
| $sid = generate_question($qsession['qid']); $query = $db->query(" SELECT q.question, s.sid
|
Zeile 846 | Zeile 850 |
---|
");
$plugins->run_hooks("xmlhttp_refresh_question");
|
");
$plugins->run_hooks("xmlhttp_refresh_question");
|
| require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser; $parser_options = array( "allow_html" => 0, "allow_mycode" => 1, "allow_smilies" => 1, "allow_imgcode" => 1, "allow_videocode" => 1, "filter_badwords" => 1, "me_username" => 0, "shorten_urls" => 0, "highlight" => 0, );
|
if($db->num_rows($query) > 0) { $question = $db->fetch_array($query);
|
if($db->num_rows($query) > 0) { $question = $db->fetch_array($query);
|
echo json_encode(array("question" => htmlspecialchars_uni($question['question']), 'sid' => htmlspecialchars_uni($question['sid'])));
| echo json_encode(array("question" => $parser->parse_message($question['question'], $parser_options), 'sid' => htmlspecialchars_uni($question['sid'])));
|
exit; } else
| exit; } else
|
Zeile 908 | Zeile 927 |
---|
exit; } else if($mybb->input['action'] == "complex_password")
|
exit; } else if($mybb->input['action'] == "complex_password")
|
{
| {
|
$password = trim($mybb->get_input('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);
|
$password = trim($mybb->get_input('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: application/json; charset={$charset}");
| header("Content-type: application/json; charset={$charset}");
|
$plugins->run_hooks("xmlhttp_complex_password");
if(!preg_match("/^.*(?=.{".$mybb->settings['minpasswordlength'].",})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/", $password))
| $plugins->run_hooks("xmlhttp_complex_password");
if(!preg_match("/^.*(?=.{".$mybb->settings['minpasswordlength'].",})(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*$/", $password))
|
Zeile 948 | Zeile 967 |
---|
header("Content-type: application/json; charset={$charset}");
if(empty($username))
|
header("Content-type: application/json; charset={$charset}");
if(empty($username))
|
{
| {
|
echo json_encode($lang->banned_characters_username); exit; }
| echo json_encode($lang->banned_characters_username); exit; }
|
Zeile 958 | Zeile 977 |
---|
if($banned_username) { echo json_encode($lang->banned_username);
|
if($banned_username) { echo json_encode($lang->banned_username);
|
exit; }
| exit; }
|
// 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 || strpos($username, ",") !== false || !validate_utf8_string($username, false, false))
| // 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 || strpos($username, ",") !== false || !validate_utf8_string($username, false, false))
|
Zeile 974 | Zeile 993 |
---|
$plugins->run_hooks("xmlhttp_username_availability");
if($user['uid'])
|
$plugins->run_hooks("xmlhttp_username_availability");
if($user['uid'])
|
{
| {
|
$lang->username_taken = $lang->sprintf($lang->username_taken, htmlspecialchars_uni($username)); echo json_encode($lang->username_taken); exit;
| $lang->username_taken = $lang->sprintf($lang->username_taken, htmlspecialchars_uni($username)); echo json_encode($lang->username_taken); exit;
|
Zeile 989 | Zeile 1008 |
---|
else if($mybb->input['action'] == "email_availability") { if(!verify_post_check($mybb->get_input('my_post_key'), true))
|
else if($mybb->input['action'] == "email_availability") { if(!verify_post_check($mybb->get_input('my_post_key'), true))
|
{
| {
|
xmlhttp_error($lang->invalid_post_code); }
| xmlhttp_error($lang->invalid_post_code); }
|
Zeile 999 | Zeile 1018 |
---|
$email = $mybb->get_input('email');
header("Content-type: application/json; charset={$charset}");
|
$email = $mybb->get_input('email');
header("Content-type: application/json; charset={$charset}");
|
|
|
$user = array( 'email' => $email );
| $user = array( 'email' => $email );
|
Zeile 1009 | Zeile 1028 |
---|
$errors = array();
if(!$userhandler->verify_email())
|
$errors = array();
if(!$userhandler->verify_email())
|
{
| {
|
$errors = $userhandler->get_friendly_errors(); }
| $errors = $userhandler->get_friendly_errors(); }
|
Zeile 1018 | Zeile 1037 |
---|
if(!empty($errors)) { echo json_encode($errors[0]);
|
if(!empty($errors)) { echo json_encode($errors[0]);
|
exit; }
| exit; }
|
else { echo json_encode("true");
| else { echo json_encode("true");
|
Zeile 1029 | Zeile 1048 |
---|
else if($mybb->input['action'] == "get_buddyselect") { // Send our headers.
|
else if($mybb->input['action'] == "get_buddyselect") { // Send our headers.
|
header("Content-type: text/plain; charset={$charset}");
| header("Content-type: text/plain; charset={$charset}");
|
if($mybb->user['buddylist'] != "") {
| if($mybb->user['buddylist'] != "") {
|
Zeile 1039 | Zeile 1058 |
---|
);
$plugins->run_hooks("xmlhttp_get_buddyselect_start");
|
);
$plugins->run_hooks("xmlhttp_get_buddyselect_start");
|
|
|
$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();
| $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();
|
Zeile 1070 | Zeile 1089 |
---|
{ xmlhttp_error($lang->buddylist_error); }
|
{ xmlhttp_error($lang->buddylist_error); }
|
| } else if($mybb->input['action'] == 'get_referrals') { $lang->load('member'); $uid = $mybb->get_input('uid', MYBB::INPUT_INT);
if (!$uid) { xmlhttp_error($lang->referrals_no_user_specified); }
$referrals = get_user_referrals($uid);
if (empty($referrals)) { eval("\$referral_rows = \"".$templates->get('member_no_referrals')."\";"); } else { foreach($referrals as $referral) { $bg_color = alt_trow(); // Format user name link $username = htmlspecialchars_uni($referral['username']); $username = format_name($username, $referral['usergroup'], $referral['displaygroup']); $username = build_profile_link($username, $referral['uid']);
$regdate = my_date('normal', $referral['regdate']);
eval("\$referral_rows .= \"".$templates->get('member_referral_row')."\";"); } }
$plugins->run_hooks('xmlhttp_referrals_end');
eval("\$referrals = \"".$templates->get('member_referrals_popup', 1, 0)."\";");
// Send our headers and output. header("Content-type: text/plain; charset={$charset}"); echo $referrals;
|
}
/**
| }
/**
|