Vergleich admin/index.php - 1.2.2 - 1.2.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: index.php 2469 2006-12-01 02:00:00Z Tikitiki $

 * $Id: index.php 3170 2007-06-29 03:15:31Z Tikitiki $

 */

define("IN_MYBB", 1);


 */

define("IN_MYBB", 1);


require_once "./global.php";;

require_once "./global.php";


// Load language packs for this section


// Load language packs for this section

global $lang;

 
$lang->load("index");

$plugins->run_hooks("admin_index_start");

$lang->load("index");

$plugins->run_hooks("admin_index_start");

Zeile 50Zeile 49
		$serverload = $lang->unknown;
}
// Get the number of users

		$serverload = $lang->unknown;
}
// Get the number of users

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS numusers");

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS numusers");

	$users = $db->fetch_array($query);

// Get the number of users awaiting validation

	$users = $db->fetch_array($query);

// Get the number of users awaiting validation

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS awaitingusers", "usergroup='5'");

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS awaitingusers", "usergroup='5'");

	$awaitingusers = $db->fetch_array($query);

// Get the number of new users for today
$timecut = time() - 86400;

	$awaitingusers = $db->fetch_array($query);

// Get the number of new users for today
$timecut = time() - 86400;

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS newusers", "regdate>'$timecut'");

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS newusers", "regdate>'$timecut'");

	$newusers = $db->fetch_array($query);

// Get the number of active users today

	$newusers = $db->fetch_array($query);

// Get the number of active users today

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(*) AS activeusers", "lastvisit>'$timecut'");

	$query = $db->simple_select(TABLE_PREFIX."users", "COUNT(uid) AS activeusers", "lastvisit>'$timecut'");

	$activeusers = $db->fetch_array($query);

// Get the number of threads

	$activeusers = $db->fetch_array($query);

// Get the number of threads

	$query = $db->simple_select(TABLE_PREFIX."threads", "COUNT(*) AS numthreads", "visible='1' AND closed NOT LIKE 'moved|%'");

	$query = $db->simple_select(TABLE_PREFIX."forums", "SUM(threads) AS numthreads");

	$threads = $db->fetch_array($query);

// Get the number of unapproved threads

	$threads = $db->fetch_array($query);

// Get the number of unapproved threads

	$query = $db->simple_select(TABLE_PREFIX."threads", "COUNT(*) AS numthreads", "visible='0' AND closed NOT LIKE 'moved|%'");

	$query = $db->simple_select(TABLE_PREFIX."forums", "SUM(unapprovedthreads) AS numthreads");

	$unapproved_threads = $db->fetch_array($query);

// Get the number of new threads for today

	$unapproved_threads = $db->fetch_array($query);

// Get the number of new threads for today

	$query = $db->simple_select(TABLE_PREFIX."threads", "COUNT(*) AS newthreads", "dateline>'$timecut' AND visible='1' AND closed NOT LIKE 'moved|%'");

	$query = $db->simple_select(TABLE_PREFIX."threads", "COUNT(tid) AS newthreads", "dateline>'$timecut' AND visible='1' AND closed NOT LIKE 'moved|%'");

	$newthreads = $db->fetch_array($query);

// Get the number of posts

	$newthreads = $db->fetch_array($query);

// Get the number of posts

	$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS numposts", "visible='1'");

	$query = $db->simple_select(TABLE_PREFIX."forums", "SUM(posts) AS numposts");

	$posts = $db->fetch_array($query);

// Get the number of unapproved posts

	$posts = $db->fetch_array($query);

// Get the number of unapproved posts

	$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS numposts", "visible='0'");

	$query = $db->simple_select(TABLE_PREFIX."forums", "SUM(unapprovedposts) AS numposts");

	$unapproved_posts = $db->fetch_array($query);

// Get the number of new posts for today

	$unapproved_posts = $db->fetch_array($query);

// Get the number of new posts for today

	$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(*) AS newposts", "dateline>'$timecut' AND visible='1'");

	$query = $db->simple_select(TABLE_PREFIX."posts", "COUNT(pid) AS newposts", "dateline>'$timecut' AND visible='1'");

	$newposts = $db->fetch_array($query);

// Get the number and total file size of attachments

	$newposts = $db->fetch_array($query);

// Get the number and total file size of attachments

	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(*) AS numattachs, SUM(filesize) as spaceused", "visible='1' AND pid>0");

	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(aid) AS numattachs, SUM(filesize) as spaceused", "visible='1' AND pid>0");

	$attachs = $db->fetch_array($query);
$attachs['spaceused'] = get_friendly_size($attachs['spaceused']);

// Get the number of unapproved attachments

	$attachs = $db->fetch_array($query);
$attachs['spaceused'] = get_friendly_size($attachs['spaceused']);

// Get the number of unapproved attachments

	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(*) AS numattachs", "visible='0' AND pid>0");

	$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(aid) AS numattachs", "visible='0' AND pid>0");

	$unapproved_attachs = $db->fetch_array($query);

// Fetch the last time an update check was run

	$unapproved_attachs = $db->fetch_array($query);

// Fetch the last time an update check was run

Zeile 112Zeile 111
	// If the update check contains information about a newer version, show an alert
if($update_check['latest_version_code'] > $mybb->version_code)
{

	// If the update check contains information about a newer version, show an alert
if($update_check['latest_version_code'] > $mybb->version_code)
{

		$lang->new_version_available = sprintf($lang->new_version_available, "MyBB {$mybb->version}", "<a href=\"http://www.mybboard.com/?fwlink=release_{$update_check['latest_version_code']}\" target=\"_new\">MyBB {$update_check['latest_version']}</a>");

		$lang->new_version_available = sprintf($lang->new_version_available, "MyBB {$mybb->version}", "<a href=\"http://www.mybboard.net/?fwlink=release_{$update_check['latest_version_code']}\" target=\"_new\">MyBB {$update_check['latest_version']}</a>");

		makewarning($lang->new_version_available);
}


		makewarning($lang->new_version_available);
}


Zeile 181Zeile 180
	tableheader($lang->mybb_credits);
tablesubheader($lang->contributed);
makelabelcode("<b>$lang->product_managers</b>", "<a href=\"http://www.surfionline.com\" target=\"_blank\">Chris Boulton</a>");

	tableheader($lang->mybb_credits);
tablesubheader($lang->contributed);
makelabelcode("<b>$lang->product_managers</b>", "<a href=\"http://www.surfionline.com\" target=\"_blank\">Chris Boulton</a>");

	makelabelcode("<b>$lang->developers</b>", "<a href=\"http://www.surfionline.com/\" target=\"_blank\">Chris Boulton</a><br /><a href=\"http://mods.mybboard.com/\" target=\"_blank\">Musicalmidget</a><br /><a href=\"http://www.dennistt.net/\" target=\"_blank\">DennisTT</a><br /><a href=\"http://www.peterakkies.com\" target=\"_blank\">Peter</a><br /><a href=\"http://www.tiki.rct3x.net\" target=\"_blank\">Tikitiki</a><br /><a href=\"http://www.decswxaqz.co.uk/\" target=\"_blank\">decswxaqz</a><br /><a href=\"http://www.mcdcpp.net/blog/\" target=\"_blank\">CraKteR</a>");

	makelabelcode("<b>$lang->developers</b>", "<a href=\"http://www.surfionline.com/\" target=\"_blank\">Chris Boulton</a><br /><a href=\"http://mods.mybboard.net/\" target=\"_blank\">Musicalmidget</a><br /><a href=\"http://www.dennistt.net/\" target=\"_blank\">DennisTT</a><br /><a href=\"http://www.peterakkies.com\" target=\"_blank\">Peter</a><br /><a href=\"http://www.tiki.rct3x.net\" target=\"_blank\">Tikitiki</a><br /><a href=\"http://www.decswxaqz.co.uk/\" target=\"_blank\">decswxaqz</a><br /><a href=\"http://www.mcdcpp.net/blog/\" target=\"_blank\">CraKteR</a>");

	makelabelcode("<b>$lang->graphics_and_style</b>", "<a href=\"http://www.surfionline.com\" target=\"_blank\">Chris Boulton</a><br /><a href=\"http://www.templatesforall.com\" target=\"_blank\">Scott Hough</a>");
endtable();


	makelabelcode("<b>$lang->graphics_and_style</b>", "<a href=\"http://www.surfionline.com\" target=\"_blank\">Chris Boulton</a><br /><a href=\"http://www.templatesforall.com\" target=\"_blank\">Scott Hough</a>");
endtable();


Zeile 219Zeile 218
	);

require_once MYBB_ROOT."inc/class_xml.php";

	);

require_once MYBB_ROOT."inc/class_xml.php";

	$contents = @implode("", @file("http://mybboard.com/version_check.php"));

	$contents = fetch_remote_file("http://mybboard.net/version_check.php");

	if(!$contents)
{
cperror($lang->vercheck_error);

	if(!$contents)
{
cperror($lang->vercheck_error);

Zeile 235Zeile 234
	{
$latest_version = "<span style=\"color: red\">".$latest_version."</font>";
$version_warn = 1;

	{
$latest_version = "<span style=\"color: red\">".$latest_version."</font>";
$version_warn = 1;

		$updated_cache = array(
"latest_version" => $latest_version,
"latest_version_code" => $latest_code
);

		$updated_cache['latest_version'] = $latest_version;
$updated_cache['latest_version_code'] = $latest_code;



	}

$cache->update("update_check", $updated_cache);

	}

$cache->update("update_check", $updated_cache);

Zeile 247Zeile 244

require_once MYBB_ROOT."inc/class_feedparser.php";
$feed_parser = new FeedParser();


require_once MYBB_ROOT."inc/class_feedparser.php";
$feed_parser = new FeedParser();

	$feed_parser->parse_feed("http://www.mybboard.com/latest_news.php");
echo $feed_parser->error;

	$feed_parser->parse_feed("http://www.mybboard.net/latest_news.php");


	cpheader();
starttable();
tableheader($lang->vercheck);

	cpheader();
starttable();
tableheader($lang->vercheck);

Zeile 307Zeile 303
echo "<html ".($lang->settings['rtl'] ? "dir=\"rtl\" " : "")."lang=\"".($lang->settings['htmllang'])."\">\n";
echo "<head>\n";
echo "<title>$lang->mybb_admin</title>\n";

echo "<html ".($lang->settings['rtl'] ? "dir=\"rtl\" " : "")."lang=\"".($lang->settings['htmllang'])."\">\n";
echo "<head>\n";
echo "<title>$lang->mybb_admin</title>\n";

 
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$lang->settings['charset']}\" />\n";

?>
<base target="body" />
<link type="text/css" rel="stylesheet" href="<?php echo $style; ?>" />

?>
<base target="body" />
<link type="text/css" rel="stylesheet" href="<?php echo $style; ?>" />

Zeile 493Zeile 490
	if(!empty($mybb->input['goto']))
{
// Strip session ID from goto

	if(!empty($mybb->input['goto']))
{
// Strip session ID from goto

		$goto = preg_replace("#adminsid=[a-zA-Z0-9]{32}#i", "", $mybb->input['goto']);









		$goto = $mybb->input['goto'];
if(strpos($goto, '&') !== false)
{
$goto = preg_replace('#(&?|&amp;?|\??)adminsid=([a-zA-Z0-9]{1,32})(&?|&amp;?)#i', '\\1', $goto);
}
else
{
$goto = preg_replace('#\?adminsid=([a-zA-Z0-9]{1,32})#i', '', $goto);
}

		$parsed_url = parse_url($goto);
$goto = htmlspecialchars_uni($goto);
if(!$parsed_url['query'])

		$parsed_url = parse_url($goto);
$goto = htmlspecialchars_uni($goto);
if(!$parsed_url['query'])