* [gentoo-commits] gentoo-projects commit in forums/htdocs: status.php
@ 2010-07-23 6:48 Dean Stephens (desultory)
0 siblings, 0 replies; only message in thread
From: Dean Stephens (desultory) @ 2010-07-23 6:48 UTC (permalink / raw
To: gentoo-commits
desultory 10/07/23 06:48:38
Added: status.php
Log:
Status script, basic front end function is implied by it working, in place since 2009-08-08.
Revision Changes Path
1.1 forums/htdocs/status.php
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/status.php?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/forums/htdocs/status.php?rev=1.1&content-type=text/plain
Index: status.php
===================================================================
<?php
if( !isset($_REQUEST) ){
die( 'Unrecognized environment settings.' );
}
if( isset($_REQUEST['GLOBALS']) || (isset($_SESSION) && !is_array($_SESSION)) ){
die( 'Invalid execution parameters.' );
}
include( './config.php' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<header><title>Site Status</title></header>
<body><h1>Site Status</h1>
<hr>
Database status:
<?php
if( $dbms != 'mysql' ){
$dbstatus = 'Unknown DB type.';
}
if( !isset($dbstatus) && !$connectId = mysql_connect( $dbhost, $dbuser, $dbpasswd )){
$dbstatus = mysql_errno().' : '.mysql_error();
}
if( !isset($dbstatus) && !mysql_select_db($dbname) ){
$dbstatus = mysql_errno().' : '.mysql_error();
}
if( !isset($dbstatus) && !$results = mysql_query( 'SELECT * FROM phpbb_config;', $connectId )){
$dbstatus = mysql_errno().' : '.mysql_error();
}
if( !isset($dbstatus) && !mysql_free_result($results) ){
$dbstatus = mysql_errno().' : '.mysql_error();
}
if( !isset($dbstatus) && !mysql_close($connectId) ){
$dbstatus = mysql_errno().' : '.mysql_error();
}
if( !isset($dbstatus) ){
$dbstatus = 'OK';
}
unset( $dbms, $dbhost, $dbname, $dbuser, $dbpasswd, $table_prefix, $connectId, $results );
print $dbstatus ?>
</body>
</html>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-23 6:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-23 6:48 [gentoo-commits] gentoo-projects commit in forums/htdocs: status.php Dean Stephens (desultory)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox