Vergleich misc.php - 1.8.15 - 1.8.18

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 268Zeile 268
	{
$mybb->settings['threadsperpage'] = 20;
}

	{
$mybb->settings['threadsperpage'] = 20;
}

 

$query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")");
$helpcount = $db->fetch_field($query, "total");


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];


// Work out pagination, which page we're at, as well as the limits.
$perpage = $mybb->settings['threadsperpage'];

Zeile 275Zeile 278
	if($page > 0)
{
$start = ($page-1) * $perpage;

	if($page > 0)
{
$start = ($page-1) * $perpage;

 
		$pages = ceil($helpcount / $perpage);
if($pages > $page)
{
$start = 0;
$page = 1;
}

	}
else
{

	}
else
{

Zeile 288Zeile 297
	// Work out if we have terms to highlight
$highlight = "";
if($search['keywords'])

	// Work out if we have terms to highlight
$highlight = "";
if($search['keywords'])

	{

	{

		$highlight = "&highlight=".urlencode($search['keywords']);
}

		$highlight = "&highlight=".urlencode($search['keywords']);
}





	// Do Multi Pages

	// Do Multi Pages

	$query = $db->simple_select("helpdocs", "COUNT(*) AS total", "hid IN(".$db->escape_string($search['querycache']).")");
$helpcount = $db->fetch_array($query);


 
	if($upper > $helpcount)
{
$upper = $helpcount;
}

	if($upper > $helpcount)
{
$upper = $helpcount;
}

	$multipage = multipage($helpcount['total'], $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");

	$multipage = multipage($helpcount, $perpage, $page, "misc.php?action=helpresults&sid='".htmlspecialchars_uni($mybb->get_input('sid'))."'");

	$helpdoclist = '';

require_once MYBB_ROOT."inc/class_parser.php";

	$helpdoclist = '';

require_once MYBB_ROOT."inc/class_parser.php";

Zeile 333Zeile 339
			'allow_imgcode' => 0,
'filter_badwords' => 1
);

			'allow_imgcode' => 0,
'filter_badwords' => 1
);

		$helpdoc['helpdoc'] = my_strip_tags($parser->parse_message($helpdoc['document'], $parser_options));

		$helpdoc['helpdoc'] = $parser->parse_message($helpdoc['document'], $parser_options);


if(my_strlen($helpdoc['helpdoc']) > 350)
{


if(my_strlen($helpdoc['helpdoc']) > 350)
{

Zeile 347Zeile 353
		$plugins->run_hooks("misc_helpresults_bit");

eval("\$helpdoclist .= \"".$templates->get("misc_helpresults_bit")."\";");

		$plugins->run_hooks("misc_helpresults_bit");

eval("\$helpdoclist .= \"".$templates->get("misc_helpresults_bit")."\";");

	}


	}


	if($db->num_rows($query) == 0)
{
eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");

	if($db->num_rows($query) == 0)
{
eval("\$helpdoclist = \"".$templates->get("misc_helpresults_noresults")."\";");

Zeile 377Zeile 383
			LEFT JOIN ".TABLE_PREFIX."helpsections s ON (s.sid=h.sid)
WHERE h.hid='{$hid}'
");

			LEFT JOIN ".TABLE_PREFIX."helpsections s ON (s.sid=h.sid)
WHERE h.hid='{$hid}'
");





		$helpdoc = $db->fetch_array($query);
if($helpdoc['section'] != 0 && $helpdoc['enabled'] != 0)
{

		$helpdoc = $db->fetch_array($query);
if($helpdoc['section'] != 0 && $helpdoc['enabled'] != 0)
{

Zeile 424Zeile 430

eval("\$helppage = \"".$templates->get("misc_help_helpdoc")."\";");
output_page($helppage);


eval("\$helppage = \"".$templates->get("misc_help_helpdoc")."\";");
output_page($helppage);

		}

		}

		else
{
error($lang->error_invalidhelpdoc);

		else
{
error($lang->error_invalidhelpdoc);

Zeile 490Zeile 496
						$expcolimage = "collapse_collapsed.png";
$expdisplay = "display: none;";
$expthead = " thead_collapsed";

						$expcolimage = "collapse_collapsed.png";
$expdisplay = "display: none;";
$expthead = " thead_collapsed";

 
						$expaltext = "[+]";

					}
else
{
$expcolimage = "collapse.png";
$expthead = "";

					}
else
{
$expcolimage = "collapse.png";
$expthead = "";

 
						$expaltext = "[-]";

					}
}
eval("\$sections .= \"".$templates->get("misc_help_section")."\";");

					}
}
eval("\$sections .= \"".$templates->get("misc_help_section")."\";");

Zeile 577Zeile 585
			{
$bonline_alt = alt_trow();
eval("\$buddys['online'] .= \"".$templates->get("misc_buddypopup_user_online")."\";");

			{
$bonline_alt = alt_trow();
eval("\$buddys['online'] .= \"".$templates->get("misc_buddypopup_user_online")."\";");

			}

			}

			else
{
$boffline_alt = alt_trow();

			else
{
$boffline_alt = alt_trow();

Zeile 633Zeile 641
	if(($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted")) || ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || $thread['visible'] > 1)
{
error($lang->error_invalidthread);

	if(($thread['visible'] == -1 && !is_moderator($thread['fid'], "canviewdeleted")) || ($thread['visible'] == 0 && !is_moderator($thread['fid'], "canviewunapprove")) || $thread['visible'] > 1)
{
error($lang->error_invalidthread);

	}

	}


if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove"))
{


if(is_moderator($thread['fid'], "canviewdeleted") || is_moderator($thread['fid'], "canviewunapprove"))
{

Zeile 653Zeile 661
	else
{
$show_posts = "p.visible = 1";

	else
{
$show_posts = "p.visible = 1";

	}


	}


	// Does the thread belong to a valid forum?
$forum = get_forum($thread['fid']);
if(!$forum || $forum['type'] != "f")

	// Does the thread belong to a valid forum?
$forum = get_forum($thread['fid']);
if(!$forum || $forum['type'] != "f")

Zeile 768Zeile 776
			$extra_class = ' smilie_pointer';
foreach($smilies_cache as $smilie)
{

			$extra_class = ' smilie_pointer';
foreach($smilies_cache as $smilie)
{

 
				if($smilie['showclickable'] != 1)
{
continue;
}

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

Zeile 797Zeile 809
		}

if($e == 2)

		}

if($e == 2)

		{

		{

			eval("\$smilies .= \"".$templates->get("misc_smilies_popup_empty")."\";");
}


			eval("\$smilies .= \"".$templates->get("misc_smilies_popup_empty")."\";");
}


Zeile 807Zeile 819
		}

eval("\$smiliespage = \"".$templates->get("misc_smilies_popup", 1, 0)."\";");

		}

eval("\$smiliespage = \"".$templates->get("misc_smilies_popup", 1, 0)."\";");

		output_page($smiliespage);

		output_page($smiliespage);

	}
else
{

	}
else
{

Zeile 816Zeile 828
		$smilies_cache = $cache->read("smilies");

if(is_array($smilies_cache))

		$smilies_cache = $cache->read("smilies");

if(is_array($smilies_cache))

		{

		{

			$extra_class = $onclick = '';
foreach($smilies_cache as $smilie)
{

			$extra_class = $onclick = '';
foreach($smilies_cache as $smilie)
{

 
				if($smilie['showclickable'] != 1)
{
continue;
}

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);

				$smilie['image'] = str_replace("{theme}", $theme['imgdir'], $smilie['image']);
$smilie['image'] = htmlspecialchars_uni($mybb->get_asset_url($smilie['image']));
$smilie['name'] = htmlspecialchars_uni($smilie['name']);





				$smilie['find'] = nl2br(htmlspecialchars_uni($smilie['find']));
eval('$smilie_image = "'.$templates->get('smilie').'";');
eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");

				$smilie['find'] = nl2br(htmlspecialchars_uni($smilie['find']));
eval('$smilie_image = "'.$templates->get('smilie').'";');
eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");

Zeile 843Zeile 859
elseif($mybb->input['action'] == "imcenter")
{
$mybb->input['imtype'] = $mybb->get_input('imtype');

elseif($mybb->input['action'] == "imcenter")
{
$mybb->input['imtype'] = $mybb->get_input('imtype');

	if($mybb->input['imtype'] != "aim" && $mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo")

	if($mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo")

	{
$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");

	{
$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");

Zeile 852Zeile 868
	}

$uid = $mybb->get_input('uid', MyBB::INPUT_INT);

	}

$uid = $mybb->get_input('uid', MyBB::INPUT_INT);

	$user = get_user($uid);

	$user = get_user($uid);


if(!$user)
{


if(!$user)
{

Zeile 881Zeile 897

// Build IM navigation bar
$navigationbar = $navsep = $imtype = $imtype_lang = '';


// Build IM navigation bar
$navigationbar = $navsep = $imtype = $imtype_lang = '';

	if(!empty($user['aim']) && is_member($mybb->settings['allowaimfield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
{
$imtype = "aim";
$imtype_lang = $lang->aol_im;
eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";");
$navsep = ' - ';
}

 
	if(!empty($user['skype']) && is_member($mybb->settings['allowskypefield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
{
$imtype = "skype";

	if(!empty($user['skype']) && is_member($mybb->settings['allowskypefield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
{
$imtype = "skype";

Zeile 904Zeile 913

$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['yahoo'] = htmlspecialchars_uni($user['yahoo']);


$user['skype'] = htmlspecialchars_uni($user['skype']);
$user['yahoo'] = htmlspecialchars_uni($user['yahoo']);

	$user['aim'] = htmlspecialchars_uni($user['aim']);

 

$user['username'] = htmlspecialchars_uni($user['username']);



$user['username'] = htmlspecialchars_uni($user['username']);


Zeile 1091Zeile 1099
						$selecteddone = "1";
}


						$selecteddone = "1";
}


					if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && $mybb->cookies['forumpass'][$forum['fid']] === md5($mybb->user['uid'].$forum['password']))

					if($forum['password'] == '' && !in_array($forum['fid'], $unexp) || $forum['password'] && isset($mybb->cookies['forumpass'][$forum['fid']]) && my_hash_equals($mybb->cookies['forumpass'][$forum['fid']], md5($mybb->user['uid'].$forum['password'])))

					{
eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";");
}

					{
eval("\$forumlistbits .= \"".$templates->get("misc_syndication_forumlist_forum")."\";");
}