Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: xmlhttp.php 4117 2008-08-15 15:38:41Z Tikitiki $
| * $Id: xmlhttp.php 4835 2010-03-22 01:51:51Z DougSD $
|
*/
/**
| */
/**
|
Zeile 41 | Zeile 41 |
---|
// 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");
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
| header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache");
| header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache");
|
Zeile 335 | Zeile 335 |
---|
xmlhttp_error($lang->edit_time_limit); } }
|
xmlhttp_error($lang->edit_time_limit); } }
|
| // 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']); // Send the contents of the post.
| $post['message'] = htmlspecialchars_uni($post['message']); // Send the contents of the post.
|
Zeile 356 | Zeile 363 |
---|
xmlhttp_error($lang->invalid_post_code); }
|
xmlhttp_error($lang->invalid_post_code); }
|
$message = strval($_POST['value']);
| $message = strval($mybb->input['value']);
|
if(my_strtolower($charset) != "utf-8") { if(function_exists("iconv"))
|
if(my_strtolower($charset) != "utf-8") { if(function_exists("iconv"))
|
{
| {
|
$message = iconv($charset, "UTF-8//IGNORE", $message); } else if(function_exists("mb_convert_encoding"))
| $message = iconv($charset, "UTF-8//IGNORE", $message); } else if(function_exists("mb_convert_encoding"))
|
Zeile 368 | Zeile 375 |
---|
$message = @mb_convert_encoding($message, $charset, "UTF-8"); } else if(my_strtolower($charset) == "iso-8859-1")
|
$message = @mb_convert_encoding($message, $charset, "UTF-8"); } else if(my_strtolower($charset) == "iso-8859-1")
|
{
| {
|
$message = utf8_decode($message); } }
| $message = utf8_decode($message); } }
|
Zeile 431 | Zeile 438 |
---|
while($attachment = $db->fetch_array($query)) { $attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
|
while($attachment = $db->fetch_array($query)) { $attachcache[$attachment['pid']][$attachment['aid']] = $attachment;
|
}
| }
|
require_once MYBB_ROOT."inc/functions_post.php"; get_post_attachments($post['pid'], $post);
| require_once MYBB_ROOT."inc/functions_post.php"; get_post_attachments($post['pid'], $post);
|
Zeile 440 | Zeile 447 |
---|
// Figure out if we need to show an "edited by" message // Only show if at least one of "showeditedby" or "showeditedbyadmin" is enabled if($mybb->settings['showeditedby'] != 0 && $mybb->settings['showeditedbyadmin'] != 0)
|
// Figure out if we need to show an "edited by" message // Only show if at least one of "showeditedby" or "showeditedbyadmin" is enabled if($mybb->settings['showeditedby'] != 0 && $mybb->settings['showeditedbyadmin'] != 0)
|
{
| {
|
$post['editdate'] = my_date($mybb->settings['dateformat'], TIME_NOW); $post['edittime'] = my_date($mybb->settings['timeformat'], TIME_NOW); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate'], $post['edittime']);
| $post['editdate'] = my_date($mybb->settings['dateformat'], TIME_NOW); $post['edittime'] = my_date($mybb->settings['timeformat'], TIME_NOW); $post['editnote'] = $lang->sprintf($lang->postbit_edited, $post['editdate'], $post['edittime']);
|
Zeile 464 | Zeile 471 |
---|
{ // If the cookie does not exist, exit if(!array_key_exists("multiquote", $mybb->cookies))
|
{ // If the cookie does not exist, exit if(!array_key_exists("multiquote", $mybb->cookies))
|
{
| {
|
exit; } // Divide up the cookie using our delimeter $multiquoted = explode("|", $mybb->cookies['multiquote']);
|
exit; } // Divide up the cookie using our delimeter $multiquoted = explode("|", $mybb->cookies['multiquote']);
|
|
|
// No values - exit if(!is_array($multiquoted)) {
| // No values - exit if(!is_array($multiquoted)) {
|
Zeile 497 | Zeile 504 |
---|
if(!$mybb->input['load_all']) { $from_tid = "p.tid != '".intval($mybb->input['tid'])."' AND ";
|
if(!$mybb->input['load_all']) { $from_tid = "p.tid != '".intval($mybb->input['tid'])."' AND ";
|
}
| }
|
else { $from_tid = '';
| else { $from_tid = '';
|
Zeile 591 | Zeile 598 |
---|
// Fix bad characters $username = trim($username);
|
// 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)), array(" ", "-", "", "", ""), $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);
|
// Remove multiple spaces from the username $username = preg_replace("#\s{2,}#", " ", $username);
|
// Remove multiple spaces from the username $username = preg_replace("#\s{2,}#", " ", $username);
|
| if(empty($username)) { echo "<fail>{$lang->banned_characters_username}</fail>"; exit; }
|
header("Content-type: text/xml; charset={$charset}");
| header("Content-type: text/xml; charset={$charset}");
|
Zeile 673 | Zeile 686 |
---|
); $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);
|
); $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);
|
$buddy_array = array();
| $online = array(); $offline = array();
|
while($buddy = $db->fetch_array($query)) { $buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
| while($buddy = $db->fetch_array($query)) { $buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
|