Location: PHPKode > projects > DantoBB > DantoBB_1-0/sources/admin_index.php
<?php

/*
	Copyright (C) 2009 DantoBB Team
	http://www.dantobb.com
*/

/**
 * ACP index
 *
 * Shows the ACP index with general information.
 *
 * @author	DantoBB Team
 * @link	http://www.dantobb.com
 * @license	GPL-2
 * @version	$Revision: 1.0 $
 * @copyright	Copyright (C) 2009 DantoBB Team
 * @package	DantoBB
 * @subpackage	ACP
 */

//
// Die when called directly in browser
//
if ( !defined('INCLUDED') )
	exit();

$content = '<p>'.$lang['IndexWelcome'].'</p>';

if ( !is_writable(ROOT_PATH.'config.php') ) {
	
	$content .= '<h2>'.$lang['IndexWarning'].'</h2>';
	$content .= '<p>'.sprintf($lang['IndexUnwritableConfig'], '<code>config.php</code>').'</p>';
	
}

$content .= '<h2><a href="'.$functions->make_url('admin.php', array('act' => 'activate_members')).'">'.$lang['IndexUnactiveMembers'].'</a></h2>';
$result = $db->query("SELECT COUNT(id) as count FROM ".TABLE_PREFIX."members WHERE active = 0 AND active_key = ''");
$out = $db->fetch_result($result);
switch ( $out['count'] ) {
	
	case 0:
		$content .= '<p>'.$lang['IndexNoUnactiveMembers'].'</p>';
		break;
	case 1:
		$content .= '<p><strong>'.$lang['IndexOneUnactiveMember'].'</strong></p>';
		break;
	default:
		$content .= '<p><strong>'.sprintf($lang['IndexMoreUnactiveMembers'], $out['count']).'</strong></p>';
	
}

if ( ( $server_load = $functions->get_server_load('all') ) == true )
	$server_load = sprintf('%.2f, %.2f, %.2f', $server_load[0], $server_load[1], $server_load[2]);
else	
	$server_load = $lang['Unknown'];

$content .= '<h2>'.$lang['IndexSystemInfo'].'</h2>
<ul>
	<li>'.$lang['IndexDantoBBVersion'].': '.DANTOBB_VERSION.' (<a href="'.$functions->make_url('admin.php', array('act' => 'version')).'">'.$lang['Item-version'].'</a>)</li>
	<li>'.$lang['IndexPHPVersion'].': '.PHP_VERSION.'</li>
	<li>'.$lang['IndexSQLServer'].': '.join('/', $db->get_server_info()).'</li>
	<li>'.$lang['IndexHTTPServer'].': '.$_SERVER['SERVER_SOFTWARE'].'</li>
	<li>'.$lang['IndexOS'].': '.( ( array_key_exists('OS', $_ENV) ) ? $_ENV['OS'] : PHP_OS ).'</li>
	<li>'.$lang['IndexServerLoad'].': '.$server_load.'</li>
</ul>

<h2>'.$lang['IndexLinks'].'</h2>
<ul>
	<li><a href="http://www.dantobb.com/">DantoBB.Com</a></li>
	<li><a href="http://www.dantobb.com/forums/">Support Forums</a></li>
	<li><a href="http://dev.dantobb.com/">DantoBB Development</a></li>
</ul>
<p id="admincopyright">Copyright &copy; 2009 DantoBB Team - Released under the GNU General Public License.</p>';

$admin_functions->create_body('index', $content);

?>
Return current item: DantoBB