Vergleich misc.php - 1.8.20 - 1.8.34

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 15Zeile 15
$templatelist = "misc_rules_forum,misc_help_helpdoc,misc_whoposted_poster,misc_whoposted,misc_smilies_popup_smilie,misc_smilies_popup,misc_smilies_popup_empty,misc_smilies_popup_row,multipage_start";
$templatelist .= ",misc_buddypopup,misc_buddypopup_user,misc_buddypopup_user_none,misc_buddypopup_user_online,misc_buddypopup_user_offline,misc_buddypopup_user_sendpm,misc_syndication_forumlist";
$templatelist .= ",misc_smilies,misc_smilies_smilie,misc_help_section_bit,misc_help_section,misc_help,forumdisplay_password_wrongpass,forumdisplay_password,misc_helpresults,misc_helpresults_bit";

$templatelist = "misc_rules_forum,misc_help_helpdoc,misc_whoposted_poster,misc_whoposted,misc_smilies_popup_smilie,misc_smilies_popup,misc_smilies_popup_empty,misc_smilies_popup_row,multipage_start";
$templatelist .= ",misc_buddypopup,misc_buddypopup_user,misc_buddypopup_user_none,misc_buddypopup_user_online,misc_buddypopup_user_offline,misc_buddypopup_user_sendpm,misc_syndication_forumlist";
$templatelist .= ",misc_smilies,misc_smilies_smilie,misc_help_section_bit,misc_help_section,misc_help,forumdisplay_password_wrongpass,forumdisplay_password,misc_helpresults,misc_helpresults_bit";

$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,misc_imcenter_error";
$templatelist .= ",misc_smilies_popup_no_smilies,misc_smilies_no_smilies,misc_syndication,misc_help_search,misc_helpresults_noresults,misc_syndication_forumlist_forum,misc_syndication_feedurl,misc_whoposted_page";

$templatelist .= ",multipage,multipage_end,multipage_jump_page,multipage_nextpage,multipage_page,multipage_page_current,multipage_page_link_current,multipage_prevpage,misc_whoposted_page";
$templatelist .= ",misc_smilies_popup_no_smilies,misc_smilies_no_smilies,misc_syndication,misc_help_search,misc_helpresults_noresults,misc_syndication_forumlist_forum,misc_syndication_feedurl";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";


require_once "./global.php";
require_once MYBB_ROOT."inc/functions_post.php";

Zeile 405Zeile 405
				$langnamevar = "d".$helpdoc['hid']."_name";
$langdescvar = "d".$helpdoc['hid']."_desc";
$langdocvar = "d".$helpdoc['hid']."_document";

				$langnamevar = "d".$helpdoc['hid']."_name";
$langdescvar = "d".$helpdoc['hid']."_desc";
$langdocvar = "d".$helpdoc['hid']."_document";

				if($lang->$langnamevar)

				if(isset($lang->$langnamevar))

				{
$helpdoc['name'] = $lang->$langnamevar;

				{
$helpdoc['name'] = $lang->$langnamevar;

				}
if($lang->$langdescvar)
{

				}
if(isset($lang->$langdescvar))
{

					$helpdoc['description'] = $lang->$langdescvar;
}

					$helpdoc['description'] = $lang->$langdescvar;
}

				if($lang->$langdocvar)

				if(isset($lang->$langdocvar))

				{
$helpdoc['document'] = $lang->$langdocvar;

				{
$helpdoc['document'] = $lang->$langdocvar;

				}
}


				}
}


			if($helpdoc['hid'] == 3)
{
$helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code);
}

			if($helpdoc['hid'] == 3)
{
$helpdoc['document'] = $lang->sprintf($helpdoc['document'], $mybb->post_code);
}





			add_breadcrumb($helpdoc['name']);

			add_breadcrumb($helpdoc['name']);





			$plugins->run_hooks("misc_help_helpdoc_end");

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

			$plugins->run_hooks("misc_help_helpdoc_end");

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

		}

		}

		else
{
error($lang->error_invalidhelpdoc);

		else
{
error($lang->error_invalidhelpdoc);

		}

		}

	}
else
{

	}
else
{

Zeile 476Zeile 476
							{
$langnamevar = "d".$helpdoc['hid'].'_name';
$langdescvar = "d".$helpdoc['hid'].'_desc';

							{
$langnamevar = "d".$helpdoc['hid'].'_name';
$langdescvar = "d".$helpdoc['hid'].'_desc';

								if($lang->$langnamevar)

								if(isset($lang->$langnamevar))

								{
$helpdoc['name'] = $lang->$langnamevar;

								{
$helpdoc['name'] = $lang->$langnamevar;

								}
if($lang->$langdescvar)

								}
if(isset($lang->$langdescvar))

								{
$helpdoc['description'] = $lang->$langdescvar;
}

								{
$helpdoc['description'] = $lang->$langdescvar;
}

Zeile 488Zeile 488
							$altbg = alt_trow();
eval("\$helpbits .= \"".$templates->get("misc_help_section_bit")."\";");
}

							$altbg = alt_trow();
eval("\$helpbits .= \"".$templates->get("misc_help_section_bit")."\";");
}

					}

					}

					$expdisplay = '';

					$expdisplay = '';

					$sname = "sid_".$section['sid']."_c";
if(isset($collapsed[$sname]) && $collapsed[$sname] == "display: show;")

					$sname = "sid_".$section['sid']."_e";
if(isset($collapsed[$sname]) && $collapsed[$sname] == "display: none;")

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

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

						$expaltext = "[+]";

						$expaltext = $lang->expcol_expand;

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

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

						$expaltext = "[-]";

						$expaltext = $lang->expcol_collapse;

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

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

Zeile 510Zeile 510
		}

if($mybb->settings['helpsearch'] == 1)

		}

if($mybb->settings['helpsearch'] == 1)

		{

		{

			eval("\$search = \"".$templates->get("misc_help_search")."\";");
}

			eval("\$search = \"".$templates->get("misc_help_search")."\";");
}





		$plugins->run_hooks("misc_help_section_end");

eval("\$help = \"".$templates->get("misc_help")."\";");
output_page($help);

		$plugins->run_hooks("misc_help_section_end");

eval("\$help = \"".$templates->get("misc_help")."\";");
output_page($help);

	}

	}

}
elseif($mybb->input['action'] == "buddypopup")
{

}
elseif($mybb->input['action'] == "buddypopup")
{

Zeile 527Zeile 527
	if($mybb->user['uid'] == 0)
{
error_no_permission();

	if($mybb->user['uid'] == 0)
{
error_no_permission();

	}

	}





	if(isset($mybb->input['removebuddy']) && verify_post_check($mybb->input['my_post_key']))

	if(isset($mybb->input['removebuddy']) && verify_post_check($mybb->get_input('my_post_key')))

	{
$buddies = $mybb->user['buddylist'];
$namesarray = explode(",", $buddies);

	{
$buddies = $mybb->user['buddylist'];
$namesarray = explode(",", $buddies);

Zeile 555Zeile 555
	{
$buddys = array('online' => '', 'offline' => '');
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];

	{
$buddys = array('online' => '', 'offline' => '');
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];





		$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array('order_by' => 'lastactive'));

		$query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array('order_by' => 'lastactive'));





		while($buddy = $db->fetch_array($query))
{
$buddy['username'] = htmlspecialchars_uni($buddy['username']);
$buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
$profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');

		while($buddy = $db->fetch_array($query))
{
$buddy['username'] = htmlspecialchars_uni($buddy['username']);
$buddy_name = format_name($buddy['username'], $buddy['usergroup'], $buddy['displaygroup']);
$profile_link = build_profile_link($buddy_name, $buddy['uid'], '_blank', 'if(window.opener) { window.opener.location = this.href; return false; }');





			$send_pm = '';
if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $groupscache[$buddy['usergroup']]['canusepms'] != 0)
{

			$send_pm = '';
if($mybb->user['receivepms'] != 0 && $buddy['receivepms'] != 0 && $groupscache[$buddy['usergroup']]['canusepms'] != 0)
{

Zeile 598Zeile 598
		{
$error = $lang->online_none;
eval("\$buddys['online'] = \"".$templates->get("misc_buddypopup_user_none")."\";");

		{
$error = $lang->online_none;
eval("\$buddys['online'] = \"".$templates->get("misc_buddypopup_user_none")."\";");

		}


		}


		if(empty($buddys['offline']))
{
$error = $lang->offline_none;

		if(empty($buddys['offline']))
{
$error = $lang->offline_none;

Zeile 626Zeile 626
{
$numposts = 0;
$altbg = alt_trow();

{
$numposts = 0;
$altbg = alt_trow();

	$whoposted = '';

	$whoposted = '';

	$tid = $mybb->get_input('tid', MyBB::INPUT_INT);
$thread = get_thread($tid);
$modal = $mybb->get_input('modal', MyBB::INPUT_INT);

	$tid = $mybb->get_input('tid', MyBB::INPUT_INT);
$thread = get_thread($tid);
$modal = $mybb->get_input('modal', MyBB::INPUT_INT);

Zeile 721Zeile 721
			$profile_link = build_profile_link($poster_name, $poster['uid']);
}
$numposts += $poster['posts'];

			$profile_link = build_profile_link($poster_name, $poster['uid']);
}
$numposts += $poster['posts'];

 
		$poster['posts'] = my_number_format($poster['posts']);

		eval("\$whoposted .= \"".$templates->get("misc_whoposted_poster")."\";");
$altbg = alt_trow();
}
$numposts = my_number_format($numposts);

		eval("\$whoposted .= \"".$templates->get("misc_whoposted_poster")."\";");
$altbg = alt_trow();
}
$numposts = my_number_format($numposts);

	$poster['posts'] = my_number_format($poster['posts']);

 
	if($modal)
{
eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";");

	if($modal)
{
eval("\$whop = \"".$templates->get("misc_whoposted", 1, 0)."\";");

Zeile 836Zeile 836
				eval('$smilie_image = "'.$templates->get('smilie').'";');
eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");
$class = alt_trow();

				eval('$smilie_image = "'.$templates->get('smilie').'";');
eval("\$smilies .= \"".$templates->get("misc_smilies_smilie")."\";");
$class = alt_trow();

			}
}


			}
}


		if(!$smilies)
{
eval("\$smilies = \"".$templates->get("misc_smilies_no_smilies")."\";");

		if(!$smilies)
{
eval("\$smilies = \"".$templates->get("misc_smilies_no_smilies")."\";");

Zeile 848Zeile 848
		output_page($smiliespage);
}
}

		output_page($smiliespage);
}
}

elseif($mybb->input['action'] == "imcenter")
{
$mybb->input['imtype'] = $mybb->get_input('imtype');
if($mybb->input['imtype'] != "skype" && $mybb->input['imtype'] != "yahoo")
{
$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}

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

if(!$user)
{
$message = $lang->error_invaliduser;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}

if(empty($user[$mybb->input['imtype']]))
{
$message = $lang->error_invalidimtype;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}

$settingkey = 'allow'.$mybb->input['imtype'].'field';
if(!is_member($mybb->settings[$settingkey], $user))
{
$message = $lang->error_nopermission_user_ajax;
eval("\$error = \"".$templates->get("misc_imcenter_error", 1, 0)."\";");
echo $error;
exit;
}

// Build IM navigation bar
$navigationbar = $navsep = $imtype = $imtype_lang = '';
if(!empty($user['skype']) && is_member($mybb->settings['allowskypefield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
{
$imtype = "skype";
$imtype_lang = $lang->skype;
eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";");
$navsep = ' - ';
}
if(!empty($user['yahoo']) && is_member($mybb->settings['allowyahoofield'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])))
{
$imtype = "yahoo";
$imtype_lang = $lang->yahoo_im;
eval("\$navigationbar .= \"".$templates->get("misc_imcenter_nav")."\";");
}

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

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

$lang->chat_on_skype = $lang->sprintf($lang->chat_on_skype, $user['username']);
$lang->call_on_skype = $lang->sprintf($lang->call_on_skype, $user['username']);

 




	$imtemplate = "misc_imcenter_".$mybb->input['imtype'];
eval("\$imcenter = \"".$templates->get($imtemplate, 1, 0)."\";");
echo $imcenter;
exit;
}

 
elseif($mybb->input['action'] == "syndication")
{
$plugins->run_hooks("misc_syndication_start");

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

elseif($mybb->input['action'] == "syndication")
{
$plugins->run_hooks("misc_syndication_start");

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

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

 
	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$forums = $mybb->get_input('forums', MyBB::INPUT_ARRAY);

	$limit = 15;
if(!empty($new_limit) && $new_limit != $limit)
{
$limit = $new_limit;
}
$feedurl = '';
$add = false;


	$limit = $mybb->get_input('limit', MyBB::INPUT_INT);
$url = $mybb->settings['bburl']."/syndication.php";
$syndicate = $urlquery = array();






	add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();

	add_breadcrumb($lang->nav_syndication);
$unviewable = get_unviewable_forums();
$inactiveforums = get_inactive_forums();

	$unexp1 = explode(',', $unviewable);
$unexp2 = explode(',', $inactiveforums);
$unexp = array_merge($unexp1, $unexp2);

if(is_array($forums))

	$unexp = explode(',', $unviewable . ',' . $inactiveforums);

if(is_array($forums) && !in_array('all', $forums))



	{

	{

		foreach($unexp as $fid)
{
$unview[$fid] = true;
}

$syndicate = '';
$comma = '';
$all = false;

 
		foreach($forums as $fid)
{

		foreach($forums as $fid)
{

			if($fid == "all")

			if(ctype_digit($fid) && !in_array($fid, $unexp))

			{

			{

				$all = true;
break;
}
elseif(ctype_digit($fid))
{
if(!isset($unview[$fid]))
{
$syndicate .= $comma.$fid;
$comma = ",";
$flist[$fid] = true;
}
}
}
$url = $mybb->settings['bburl']."/syndication.php";
if(!$all)
{
$url .= "?fid=$syndicate";
$add = true;
}

// If the version is not RSS2.0, set the type to Atom1.0.
if($version != "rss2.0")
{
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
$url .= "type=atom1.0";
$add = true;
}
if((int)$limit > 0)
{
if($limit > 50)
{
$limit = 50;
}
if(!$add)
{
$url .= "?";
}
else
{
$url .= "&";
}
if(is_numeric($limit))
{
$url .= "limit=$limit";

				$syndicate[] = $fid;
$flist[$fid] = true;


















































			}
}

			}
}

		eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");
}
unset($GLOBALS['forumcache']);





if(!empty($syndicate))
{
$urlquery[] = "fid=". implode(",", $syndicate);
}
}


// If there is no version in the input, check the default (RSS2.0).


// If there is no version in the input, check the default (RSS2.0).

	if($version == "atom1.0")







	$json1check = $atom1check = $rss2check = "";
if($version == "json")
{
$json1check = "checked=\"checked\"";
$urlquery[] = "type=".$version;
}
elseif($version == "atom1.0")

	{
$atom1check = "checked=\"checked\"";

	{
$atom1check = "checked=\"checked\"";

		$rss2check = '';

		$urlquery[] = "type=".$version;

	}
else
{

	}
else
{

		$atom1check = '';

 
		$rss2check = "checked=\"checked\"";
}

		$rss2check = "checked=\"checked\"";
}

 
	// Evaluate, reset and set limit (Drive through settings?)
$limit = empty($limit) ? 15 : (($limit > 50) ? 50 : $limit);
$urlquery[] = "limit=" . $limit;

// Generate feed url
if(!empty($urlquery)){
$url .= "?" . implode('&', $urlquery);
}
eval("\$feedurl = \"".$templates->get("misc_syndication_feedurl")."\";");

unset($GLOBALS['forumcache']);


	$forumselect = makesyndicateforums();

$plugins->run_hooks("misc_syndication_end");

	$forumselect = makesyndicateforums();

$plugins->run_hooks("misc_syndication_end");

Zeile 1088Zeile 977
					if(isset($flist[$forum['fid']]))
{
$optionselected = 'selected="selected"';

					if(isset($flist[$forum['fid']]))
{
$optionselected = 'selected="selected"';

						$selecteddone = "1";

 
					}

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'])))

					}

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'])))

Zeile 1100Zeile 988
					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

					{
$newdepth = $depth."    ";
$forumlistbits .= makesyndicateforums($forum['fid'], '', 0, $newdepth);

 
					}
}
else
{
if(isset($flist[$forum['fid']]))
{
unset($flist[$forum['fid']]);

					}
}
}

					}
}
}

Zeile 1108Zeile 1003

if($addselect)
{


if($addselect)
{

		$addsel = '';
if(empty($selecteddone))
{
$addsel = ' selected="selected"';
}


		$addsel = empty($flist) ? ' selected="selected"' : '';






		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}


		eval("\$forumlist = \"".$templates->get("misc_syndication_forumlist")."\";");
}