Location: PHPKode > projects > Netautor Professional > netautor/napro4/admin/database/perform/db_header.php
<?php
	/* @version $Revision: 1.5 $ */

	require_once('../../../include/init.inc');
	if(!$USER->check_feature('Admin') && !$USER->check_feature('ac_database'))
	{
		$USER->login_call();
	}

	error_reporting(E_ALL);
	@ob_end_flush();

	include_once ('./common.php');
	$CFG_STATEMENT			=  ( empty($CFG_STATEMENT) 		? 'SELECT user_name,user_pass FROM users' : strval($CFG_STATEMENT));
	$CFG_TABLESPACE			=  ( empty($CFG_TABLESPACE) 	? 'rwa_digiconcept_net' : strval($CFG_TABLESPACE));
	$CFG_PROFILE			=  (empty($CFG_PROFILE) ? false : true );
	$SHOW_RESULT			=  (empty($SHOW_RESULT) ? false : true );
	$times	=	array	('connect'		=>	array(),
						 'query'		=>	array(),
						 'read'			=>	array(),
						 'disconnect'	=>	array());

	$CFG_REPETITIONS	= (empty($CFG_REPETITIONS) ? 1 : intval($CFG_REPETITIONS));
	$CFG_REPETITIONS	= min(max(0,$CFG_REPETITIONS),10000);

	$CFG_PERSISTENT	=  (empty($CFG_PERSISTENT) ? false : true );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>	<title>/digiconcept/netautor/database performance - <?php echo $CFG_DB_TYPE; ?></title>
</head>
<link href="style.css" rel="stylesheet" type="text/css">
<body onLoad="window.focus();">
<font class="text">
<?php 
	echo "Testing DB {$CFG_DB_TYPE} on <i>{$CFG_DSN}</i>, running on <i>{$_SERVER['SERVER_NAME']}</i><br>";
	echo "Make <b>$CFG_REPETITIONS</b> ".($CFG_PERSISTENT?'persistent':'non-persistent')." connection(s) ";
	echo "for SQL-statement<br><br><b>".htmlspecialchars($CFG_STATEMENT)."</b><br>";

	$times	= array();
	$text	= '';

	if (file_exists("./db_{$CFG_DB_TYPE}.php"))
	{
		echo '<br> Test is running ';
		include ("./db_{$CFG_DB_TYPE}.php");
		echo '<br>';
		$times['meta'] = array	(	'start' => $start_time,
									'end'	=> $end_time,
									'env'	=>	array(	'php'	=> phpversion(),
														'os'	=> php_uname(),
														'sapi'	=> php_sapi_name (),
														'optimizer'=>'n.a.',
														'cache'	=>'n.a.'
													 )
								);
		if (extension_loaded('Zend Optimizer')) $times['meta']['env']['optimizer'] = 'ZEND';

		foreach ($FIELDS as $idx => $data)	$times['meta']['config'][ $data ] = $$data;
		include ('./db_footer.php');
	}
	else
	{
		echo "<br><font class='error'>ERROR : Undefined test <br></font>";
	}
?>
Return current item: Netautor Professional