File: //home/posscale/public_html/jts/joomla_hisa.php
<?php
/**
* @version $Id: index.php 9 2006-09-16 15:06:10Z RussW $
* @package Joomla! Tools Suite
*/
// No Direct Access, Redirect To Index
if (!defined( '_VALID_JTS' )) {
$host = $_SERVER['HTTP_HOST'];
$uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\');
header("Location: http://$host$uri/");
exit;
}
// Set flag that this is a parent file
define( '_VALID_MOS', 1 );
view();
function view() {
$sp = ini_get( 'session.save_path' );
define ( 'noGlobal', 0);
if (file_exists( '../configuration.php' )) {
include( '../configuration.php' );
} else {
$noConfig = "1";
}
if (file_exists( '../globals.php' )) {
require( '../globals.php' );
} else {
$noGlobal = "1";
}
// Checking for J1 v1.0
if (file_exists( '../includes/version.php' )) {
require_once( '../includes/version.php' );
$isV1 = "1";
$_VERSION = new joomlaVersion();
$versioninfo = $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS;
$version = $_VERSION->PRODUCT .' '. $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL .' '. $_VERSION->DEV_STATUS.' [ '.$_VERSION->CODENAME .' ] '. $_VERSION->RELDATE .' '. $_VERSION->RELTIME .' '. $_VERSION->RELTZ;
$thisVersion = $_VERSION->RELEASE .'.'. $_VERSION->DEV_LEVEL;
$thisDevLevel = $_VERSION->DEV_LEVEL;
} else { // If J! v1.0 not installed (installation check maybe) or user is running v1.5
$notV1 = "<h1>"._HISA_PREINST_TITLE."</h1><div style='text-align: left;' class='installCheckMsg'>"._HISA_PREINST_MSG1."<br>";
$notV1 .= "</div>";
$notV1Post = "<div style='text-align: left;' class='installCheckMsg'>"._HISA_PREINST_MSG2." ";
$notV1Post .= ""._HISA_JOOMLA_DLLINK."</div>";
}
// Current Release Information
$currentPHP = '5.2.3';
$isWin = (substr(PHP_OS, 0, 3) == 'WIN');
$currentRelease = '1.0';
$currentDevLevel = '13';
$currentVersion = $currentRelease.'.'.$currentDevLevel;
// $isWin = (substr(PHP_OS, 0, 3) == 'WIN');
// Check if $mocConfig_absolute_path matches the actual Absolute Path
$actualPath = dirname(__FILE__) . '/';
$actualPath = str_replace('\\', '/', $actualPath);
$upDir = substr( $actualPath, 0, strrpos( $actualPath, '/') );
$actualPath = substr( $upDir, 0, strrpos( $upDir, '/') );
?>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<table border='0' width='170px' cellspadding='1' cellspacing='0' align='center'><tr><td class='advisor' style='background-image: none;' valign="middle"><img src='images/hisa.gif' width='102' height='32' alt='Joomla! HISA'></td></tr></table><br />
<div class="vflist">
<?php echo _HISA_INSTASSESS_TITLE; ?>
</div>
<div class="vflist">
<?php echo _HISA_HOSTENV; ?>
</div>
<div class="vflist">
<?php echo _HISA_WEBSVRENV; ?>
</div>
<div class="vflist">
<?php echo _HISA_PHPENV; ?>
</div>
<div class="vflist">
<?php echo _HISA_MYSQLENV; ?>
</div>
<div class="vflist">
<?php echo _HISA_JENV; ?>
</div>
<div class="vflist">
<?php echo _HISA_INSTENV; ?>
</div>
<br>
<b><?php echo _REPORTDATE; ?>:</b><br>
<?php// echo date('l dS \of F Y'); ?>
<?php echo date(''. _DATE .''); ?>
<br />
<br />
<table border='0' width='170px' cellspadding='1' cellspacing='0' align='center'><tr><td class='advisor' height="23px" valign="middle">
<?php
echo "<b>". _VERNAME ." ". _HISA_VERSION ." : ". _LANGUAGE ."</b><br />";
// echo "<b>". _HISA_TRANSLATEDBY.":</b><br />"._HISA_TRANSLATEDWHO ."<br />";
?>
</td></tr></table>
<p>
<?php echo _HISA_SIDE_MSG1; ?><br />
</p>
<p>
<?php echo _HISA_SIDE_MSG2; ?><br />
</p>
<p>
<?php
if (!function_exists('shell_exec')) {
echo "<table border='0' width='170px' cellspadding='1' cellspacing='0' align='center'><tr><td class='warn-message' height='23px' valign='top'>";
echo _HISA_SHELLEXEC_DISABLED;
echo "</td></tr></table>";
}
?><br />
</p>
<!--//
<div onClick="expandcontent('hostenvDetail')" style="cursor:hand; cursor:pointer" align="left">
<img src="images/install.png" width="16" height="16" alt="Host Environment"> Show/Hide
</div>
//-->
</div>
<div id="right">
<div id="step">
<?php echo _JOOMLA ."<br>". _HISA_TITLE; ?>
</div>
<h1 style="text-align: center; border-bottom: 0px; color=#666666;">
<?php
if ($isV1 == "1") {
echo $version;
?>
<br><br>
<div class="form-block">
<table class="content" border="0" width="95%" cellspadding="2" cellspacing="3" align="center">
<tr>
<?php
// if ($thisVersion == $currentVersion) {
if ($thisVersion == _JOOMLA_LATEST) {
echo "<td colspan='2' class='good-message'>". _HISA_JOOMLA_UPTODATE ."</td>";
} else {
echo "<td width='50%' class='bad-message'>". _HISA_JOOMLA_OUTOFDATE ."</td>";
echo "<td width='50%' class='advisor'>". _HISA_JOOMLA_UPGRADE ." ( ". _JOOMLA_LATEST ." )</td>";
if ($thisDevLevel <= 10) { echo "<tr><td width='50%' class='bad-message'>". _HISA_JOOMLA_BELOW11 ."</td><td width='50%' class='advisor'>". _HISA_JOOMLA_UPGRADE ."</td></tr>"; }
}
if ($_VERSION->DEV_STATUS != "Stable") {
echo "<tr><td width='50%' class='warn-message'>". _HISA_JOOMLA_NOTSTABLE1 ." <b>".$_VERSION->DEV_STATUS."</b> ". _HISA_JOOMLA_NOTSTABLE2 ."</td><td width='50%' class='advisor'>". _HISA_JOOMLA_UPGRADE ." ( ". _JOOMLA_LATEST ." Stable )</td>";
}
?>
</tr>
</table>
</div>
<?php
}
// } else {
// echo $notV1; ?>
<br>
<a name="INSTASSESS"></a>
<div class="clr"></div>
<h1><?php echo _HISA_INSTASSESS_TITLE; ?>:</h1>
<div class="form-block">
<table border="0" cellspacing="0" cellpadding="0" width="70%" align="center">
<tr>
<td align="center" valign="top">
<table border="0" cellspacing="2" cellpadding="0" width="100%" height="100%" align="center">
<?php
$colorOnNone = "#b22222";
$colorOnLow = "#990099";
$colorOnMed = "#0033ff";
$colorOnGood = "#33ffff";
$colorOnHigh = "#66cc00";
$colorOff = "#ffffff";
$tally = 13;
$total = 0;
if (is_writable( $sp )) { ($total++); } else { $installNote .= "<b>save_session.path</b> "._SAVE_SESSIONPATH_INSTALLNOTE."<br>"; }
if (ini_get('display_errors')) { ($total++); }
if (!ini_get('register_globals')) { ($total++); } else { ($total--); $installNote .= "<b><font color=#C64934>register_globals</b> ". _REGISTER_GLOBALS_INSTALLNOTE ."<br>";}
if (!ini_get('safe_mode')) { ($total++); } else { $installNote .= "<b>safe_mode</b> ". _SAFE_MODE_INSTALLNOTE ."<br>"; }
if (ini_get('file_uploads')) { ($total++); } else { $installNote .= "<b>file_uploads</b> ". _FILE_UPLOADS_INSTALLNOTE ."<br>"; }
if (ini_get('magic_quotes_gpc')) { ($total++); } else { $installNote .= "<b>magic_quotes</b> ". _MAGIC_QUOTES_INSTALLNOTE ."<br>"; }
if (!ini_get('magic_quotes_runtime')) { ($total++); }
if (!ini_get('output_buffering')) { ($total++); }
if (!ini_get('session_autostart')) { ($total++); } else { $installNote .= "<b>session_autostart</b> ". _SESSION_AUTOSTART_INSTALLNOTE ."<br>"; }
// ShowStoppers - Sets Installation Assessment to 0%, not possible.
if (extension_loaded('zlib')) { ($total++); } else { ($total = 0); $installNote .= "". _ZLIB_INSTALLNOTE ."<br>"; }
if (extension_loaded('xml')) { ($total++); } else { ($total = 0); $installNote .= "". _XML_INSTALLNOTE ."<br>"; }
if (function_exists( 'mysql_connect' )) { ($total++); } else { ($total = 0); $installNote .= "". _MYSQL_INSTALLNOTE ."<br>"; }
if (phpversion() > '4.1') { ($total++); } else { ($total = 0); $installNote .= "". _PHP_LEVEL_INSTALLNOTE ."<br>"; }
echo "<tr><td class='title' colspan='15'>". _HISA_INSTASSESS_TITLE ."</td></tr>";
echo "<tr>";
if ($total === 0) {
echo "<td bgcolor='#ffffff' class='scale' style='border-left: 2px solid ".$colorOnNone.";'> </td>";
for ($n=0; $n<($total-1); $n++) {
// for ($n=0; $n<13; $n++) {
echo "<td class='scale' bgcolor='#ffffff'> </td>";
}
} else {
for ($i=0; $i<$total; $i++) {
if ($i < 3) {
echo "<td class='scale' bgcolor='". $colorOnNone ."'> </td>";
} elseif ($i < 6) {
echo "<td class='scale' bgcolor='". $colorOnLow ."'> </td>";
} elseif ($i < 9) {
echo "<td class='scale' bgcolor='". $colorOnMed ."'> </td>";
} elseif ($i <= 11) {
echo "<td class='scale' bgcolor='". $colorOnGood ."'> </td>";
} elseif ($i <= $total) {
echo "<td class='scale' bgcolor='". $colorOnHigh ."'> </td>";
}
}
for ($i=$total; $i<$tally; $i++) {
echo "<td class='scale' bgcolor='". $colorOff ."'> </td>";
}
}
echo "</tr>";
$scaleSuccess = number_format(($total/$tally)*100,0);
echo "<tr><td colspan='15' class='rate' bgcolor='". $colorOff ."'>". $scaleSuccess ."%</td></tr>";
if ($scaleSuccess <= 20) { $installMsg .= "". _INSTALL_SCALE_20 .""; }
elseif ($scaleSuccess <= 30) { $installMsg = "". _INSTALL_SCALE_30 .""; }
elseif ($scaleSuccess <= 40) { $installMsg = "". _INSTALL_SCALE_40 .""; }
elseif ($scaleSuccess <= 50) { $installMsg = "". _INSTALL_SCALE_50 .""; }
elseif ($scaleSuccess <= 60) { $installMsg = "". _INSTALL_SCALE_60 .""; }
elseif ($scaleSuccess <= 70) { $installMsg = "". _INSTALL_SCALE_70 .""; }
elseif ($scaleSuccess <= 80) { $installMsg = "". _INSTALL_SCALE_80 .""; }
elseif ($scaleSuccess <= 90) { $installMsg = "". _INSTALL_SCALE_90 .""; }
elseif ($scaleSuccess <= 95) { $installMsg = "". _INSTALL_SCALE_95 .""; }
elseif ($scaleSuccess > 95) { $installMsg = "". _INSTALL_SCALE_GT95 .""; }
echo "<tr><td colspan='15' class='advisor' style='color: #404040;'>". $installMsg ."</td></tr>";
if ($total != $tally) {
echo "<tr><td colspan='15' class='warn-message'><b>". _HISA_ADVISORIES .":</b><br>".$installNote."</td></tr>";
}
?>
</table>
</td>
</tr>
</table>
</div>
<?php
echo $notV1Post;
// } // end NotV1
?>
</h1>
<div class="clr"></div>
<h1><?php echo _HISA_HOSTENV; ?>:</h1>
<!--// <div id="hostenvDetail" class="switchcontent"> //-->
<div class="install-text">
<p><?php echo _HISA_HOSTENV_DESC; ?></p>
</div>
<div class="install-form">
<div class="form-block">
<table class="content" border="0">
<tr>
<td class="item" width="35%"><b><?php echo _HOSTNAME; ?></b></td>
<td class="item" width="65%"><?php echo @php_uname(n); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _HOST_IP; ?></td>
<td class="item">
<?php //echo @gethostbyname(trim(`hostname`)); ?>
<?php //if (function_exists( 'shell_exec' )) { echo "shell_exec enabled"; } ?>
<?php if (function_exists( 'shell_exec' )) { echo @gethostbyname(trim(`hostname`)); } else { echo $_SERVER['SERVER_ADDR'] ." <b><font color='red'>*</font></b>"; } ?>
</td>
</tr>
<tr>
<td class="item"> - <?php echo _PLATFORM; ?></td>
<td class="item"><?php echo @php_uname(s); ?> <?php echo @php_uname(r); ?> <?php echo @php_uname(v); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _ARCHITECTURE; ?></td>
<td class="item"><?php echo @php_uname(m); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _USERNAME; ?></td>
<td class="item"><?php echo get_current_user (); echo " ( UiD: ". getmyuid() .", GiD: ". getmygid() ." )";?></td>
</tr>
<tr>
<td class="item"> - <?php echo _CURRENT_PATH; ?></td>
<td class="item"><?php echo getcwd (); ?></td>
</tr>
</table>
<!--// </div> //-->
</div>
</div>
</div>
<div class="clr"></div>
</div>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('webenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('webenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/globe1.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="webenvMessage" class="switchcontent">
<p>
<?php
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _WEBSVR_IP_ADV1 ." ( ". $_SERVER['SERVER_ADDR'] ." ) ". _WEBSVR_IP_ADV2."</td></tr></table>";
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _WEBSVR_DOCROOT_ADV ."</td></tr></table>";
if (function_exists( 'exec' )) {
$ApacheAcc = exec("whoami");
$UserAcc = get_current_user ();
if ($ApacheAcc != $UserAcc) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='warn-message'>". _WEBSVR_OWNERSHIP_MSG ."</td></tr></table>";
}
}
?>
</p>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1><?php echo _HISA_WEBSVRENV; ?>:</h1>
<div id="webenvDetail" class="switchcontent">
<div class="install-text">
<p><?php echo _HISA_WEBSVRENV_DESC; ?></p>
</div>
<div class="install-form">
<div class="form-block">
<table class="content" border="0">
<tr>
<td class="item" width="35%"><b><?php echo _SVRVER; ?></b></td>
<td class="item" width="65%"><?php echo $_SERVER['SERVER_SOFTWARE']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _HOSTNAME; ?></td>
<td class="item"><?php echo $_SERVER['HTTP_HOST']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _DOCROOT; ?></td>
<td class="item"><?php echo $_SERVER['DOCUMENT_ROOT']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SITE_IP; ?></td>
<td class="item"><?php echo $_SERVER['SERVER_ADDR']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRPORT; ?></td>
<td class="item"><?php echo $_SERVER['SERVER_PORT']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRUSR; ?></td>
<td class="item">
<?php
if (function_exists( 'passthru' )) {
$UserAcc = get_current_user ();
if ($ApacheAcc != $UserAcc) { $AccColor = "blue"; } else { $AccColor = "black"; }
echo "<font color=\"". $AccColor ."\">";
$ApacheAcc = passthru("whoami");
echo "</font>";
} else {
echo "<i>". _SVRUSR_ERR ."</i>";
}
?>
</td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRADMIN; ?></td>
<td class="item"><?php echo $_SERVER['SERVER_ADMIN']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRSIG; ?></td>
<td class="item"><?php echo $_SERVER['SERVER_SIGNATURE']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRPROT; ?></td>
<td class="item"><?php echo $_SERVER['SERVER_PROTOCOL']; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _SVRINTF; ?></td>
<td class="item"><?php echo $_SERVER['GATEWAY_INTERFACE']; ?></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<p class="pageBreak"></p>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('phpenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('phpenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/sysinfo.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="phpenvMessage" class="switchcontent">
<p>
<?php
// if (version_compare(phpversion(), $currentPHP, "<")) {
if (version_compare(phpversion(), _PHP_LATEST, "<")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _PHP_ADV1 ." ". _PHP_LATEST ."</td></tr></table>"; }
if (version_compare(phpversion(), 5.0, "<")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _PHP_BELOW5 ."</td></tr></table>"; }
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _PHP_PARAMS_MSG ."</td></tr></table>";
?>
</p>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1><?php echo _HISA_PHPENV; ?>:</h1>
<div id="phpenvDetail" class="switchcontent">
<div class="install-text">
<p><?php echo _HISA_PHPENV_DESC; ?></p>
</div>
<div class="install-form">
<div class="form-block">
<table class="content" border="0">
<tr>
<td class="item" width="35%"><b><?php echo _PHPVER; ?></b></td>
<td class="item" width="65%"><?php echo phpversion(); ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _PHP_FILEUPLOADS; ?></td>
<td class="item" width="65%"><?php if (ini_get('file_uploads') == "1") { echo _ON; } else { echo _OFF; } ?></td>
</tr>
<!--// START Andys' Suggestions //-->
<tr>
<td class="item" width="35%"> - <?php echo _PHP_MAXUPLOADSIZE; ?></td>
<td class="item" width="65%"><?php echo ini_get('upload_max_filesize'); ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _PHP_MAXPOSTSIZE; ?></td>
<td class="item" width="65%"><?php echo ini_get('post_max_size'); ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _PHP_MAXEXETIME; ?></td>
<td class="item" width="65%"><?php echo ini_get('max_execution_time') ." "._SECONDS; ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _PHP_MAXINPTIME; ?></td>
<td class="item" width="65%"><?php echo ini_get('max_input_time') ." "._SECONDS; ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _PHP_MEMLIM; ?></td>
<td class="item" width="65%"><?php echo ini_get('memory_limit'); ?></td>
</tr>
<!--// END Andys' Suggestions //-->
<tr>
<td class="item"> - <?php echo _PHPINC; ?></td>
<td class="item"><?php echo ini_get('include_path'); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _PHPAPI; ?></td>
<td class="item"><?php echo php_sapi_name(); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _ZENDVER; ?></td>
<td class="item"><?php echo zend_version(); ?>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<?php
if ($isV1 == "1") { // Only display the rest of the pages if Joomla! v1.0 installed.
?>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('mysqlenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('mysqlenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/db.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="mysqlenvMessage" class="switchcontent">
<p>
<?php
if ((($noConfig == "1") && ($noGlobal == "1")) || ($isV1 != "1")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='warn-message'>". _HISA_JNOTINSTALLED ."</td></tr></table>"; }
if (($noConfig == "1") && ($noGlobal != "1") && ($isV1 == "1")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_NODBDETAILS ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_NOCFGFILE ."</td></tr></table>"; }
if ((function_exists( 'mysql_connect' )) AND ($noConfig == "1")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='good-message'>". _HISA_FOUNDMYSQL ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_NOCFGFILE ."</td></tr></table>"; }
?>
</p>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1><?php echo _HISA_MYSQLENV; ?>:</h1>
<div id="mysqlenvDetail" class="switchcontent">
<div class="install-text">
<p><?php echo _HISA_MYSQLENV_DESC; ?></p>
</div>
<div class="install-form">
<div class="form-block">
<?php
// I suppose this could a remote SQL server, maybe should be using $mosConfig_db instead of localhost ??
$link = @mysql_connect('localhost', $mosConfig_user, $mosConfig_password);
$sqlErr = mysql_errno();
if ((!$link) && (function_exists( 'mysqli_connect' ))) {
$link = @mysqli_connect('localhost', $mosConfig_user, $mosConfig_password);
$sqlErr = mysqli_connect_errno();
}
// echo $sqlErr;
if (($sqlErr == "2013") || ($sqlErr == "2003") || ($sqlErr == "10061")) {
echo "<font color='blue'>". _SQLERR20XX ."</font>";
}
if (($sqlErr == "1045") || ($sqlErr == "1130")) {
echo "". _SQLERR1XXX ."";
}
?>
<table class="content" border="0">
<tr>
<td class="item" width="35%"><b><?php echo _SVRVER; ?></b></td>
<td class="item" width="65%"><?php echo @mysql_get_server_info(); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _CLIENTVER; ?></td>
<td class="item"><?php echo @mysql_get_client_info(); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _HOSTINFO; ?></td>
<td class="item"><?php echo @mysql_get_host_info(); ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _PROTVER; ?></td>
<td class="item"><?php echo @mysql_get_proto_info(); ?></td>
</tr>
</table>
</div>
<?php
if ((function_exists( 'mysql_connect' )) AND ($noConfig == "1")) {
echo "<p class=warn-message>". _HISA_MYSQLOK_NOCFG ."</p>";
}
?>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('jenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('jenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/joomla_16x16.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="jenvMessage" class="switchcontent">
<p>
<?php
if ($noConfig == "1") {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_JNOTINSTALLED ."</td></tr></table>"; }
if ($mosConfig_offline == "1") {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _HISA_JOFFLINE_ADV ."</td></tr></table>";
}
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _HISA_JLIVESITE_ADV ."</td></tr></table>";
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _HISA_JABSPATH_ADV ."</td></tr></table>";
if ($isWin == 'WIN') {
if (strcasecmp($actualPath, $mosConfig_absolute_path) != 0) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_ABSPATH_ERROR_MSG ."</td></tr></table>";
}
} else {
if ($actualPath != $mosConfig_absolute_path) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_ABSPATH_ERROR_MSG ."</td></tr></table>";
}
}
if (file_exists('../htaccess.txt')) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_HTACCESS_TXT ."</td></tr></table>";
}
if ((!file_exists('../.htaccess')) && ($mosConfig_sef == "1")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_SEF_NOHTACCESS ."</td></tr></table>";
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _HISA_SEF_NOHTACCESS_MSG ."</td></tr></table>";
}
if (file_exists('../.htaccess')) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='advisor'>". _HISA_SEF_500 ."</td></tr></table>";
}
?>
</p>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1><?php echo _HISA_JENV; ?>:</h1>
<div id="jenvDetail" class="switchcontent">
<div class="install-text">
<p><?php echo _HISA_JENV_DESC; ?></p>
</div>
<div class="install-form">
<div class="form-block">
<table class="content" border="0">
<tr>
<td class="item" width="35%"><b><?php echo _HISA_JSITENAME; ?></b></td>
<td class="item" width="65%"><?php echo $mosConfig_sitename; ?></td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _HISA_JSITESTAT; ?></td>
<td class="item" width="65%">
<?php
if ($mosConfig_offline == "1") {
echo _HISA_SITEIS ." <font color='red'>". _OFFLINE ."</font>";
} else { echo _HISA_SITEIS ." <font color='green'>". _ONLINE ."</font>"; }
?>
</td>
</tr>
<tr>
<td class="item" width="35%"> - <?php echo _HISA_JSITEVER; ?></td>
<td class="item" width="65%"><?php echo $version; ?></td>
</tr>
<tr>
<td class="item"> - <?php echo _HISA_JLIVESITE; ?></td>
<td class="item"><font color="navy"><?php echo $mosConfig_live_site; ?></font></td>
</tr>
<tr>
<td class="item"> - <?php echo _HISA_JABSPATH; ?></td>
<td class="item">
<?php
//echo $actualPath;
if ($isWin == 'WIN') {
if (strcasecmp($actualPath, $mosConfig_absolute_path) != 0) {
// if ($actualPath != $mosConfig_absolute_path) {
echo "<font color='navy'>".$mosConfig_absolute_path."</font><br /><font color='red'>". _HISA_ABSPATH_ERROR ."</font>";
echo "<br /><font color='green'>". $actualPath ."</font>";
} else {
echo "<font color='navy'>". $mosConfig_absolute_path."</font>";
}
} else {
// if (strcasecmp($actualPath, $mosConfig_absolute_path) == 1) {
if ($actualPath != $mosConfig_absolute_path) {
echo "<font color='red'>".$mosConfig_absolute_path."<br />". _HISA_ABSPATH_ERROR ."</font>";
echo "<br /><font color='blue'>". $actualPath ."</font>";
} else {
echo "<font color='blue'>". $mosConfig_absolute_path."</font>";
}
}
?>
</td>
</tr>
<tr>
<td class="item"> - <?php echo _HISA_JCACHESET; ?></td>
<td class="item">
<?php
if ($mosConfig_caching == "1") {
echo "<font color='blue'>". _ENABLED."</font>";
if (!is_writable( $mosConfig_cachepath )) {
echo " ( <font color='red'>". _NOWRITE ."</font> )";
} else {
echo " ( <font color='green'>". _WRITE ."</font> )";
}
echo "<br>".$mosConfig_cachepath;
} else { echo "". _DISABLED.""; }
?>
</td>
</tr>
<tr>
<td class="item"> - <?php echo _HISA_JSEFSET; ?></td>
<td class="item">
<?php
if ($mosConfig_sef == "1") {
if (!file_exists('../.htaccess')) {
echo "<font color='red'>". _ENABLED."</font>";
} else {
echo "<font color='blue'>". _ENABLED."</font>";
}
} else {
echo "". _DISABLED."";
}
?>
</td>
</table>
</div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<?php } // end isV1 only ?>
<p class="pageBreak"></p>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('setenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('setenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/content.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="setenvMessage" class="switchcontent">
<?php
if (version_compare(phpversion(), 4.1, "<")) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_PHP_BELOWMIN1 ." ( ". phpversion() ." ) "._HISA_PHP_BELOWMIN2 ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_PHP_BELOWMIN_ADV ."</td></tr></table>"; }
if ( (!extension_loaded('zlib')) || (!extension_loaded('xml')) || (!extension_loaded('mysql')) ) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_PHP_EXTMISSING ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_PHP_EXTMISSING_ADV ."</td></tr></table>"; }
if (!$sp) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_PHP_SSNOTSET ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_PHP_SSNOTSET_ADV ."</td></tr></table>"; }
if (!is_writable( $sp )) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_PHP_SSNOWRITE ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_PHP_SSNOWRITE_ADV ."</td></tr></table>"; }
if ($noConfig == "1"){
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_JNOTINSTALLED ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_NOCFGFILE ."</td></tr></table>"; }
if (@file_exists( '../configuration.php' )) {
if (!is_writable( '../configuration.php' )) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td class='advisor'>". _HISA_CFG_NOWRITE ."</td></tr></table>"; }
if (is_writable( '../configuration.php' )) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _HISA_CFG_ISWRITE ."</td></tr><tr><td width='50%' class='advisor'>". _HISA_CFG_ISWRITE_ADV ."</td></tr></table>"; }
}
if (ini_get('register_globals')) {
echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _REGGLOB_ON ."</td></tr><tr><td width='50%' class='advisor'>". _REGGLOB_ON_ADV ."</td></tr></table>"; }
?>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1>
<?php echo _HISA_REQD_SETTINGS; ?>:
</h1>
<div id="setenvDetail" class="switchcontent">
<div class="install-text">
<p>
<?php echo _HISA_REQD_SETTINGS_DESC1; ?>
</p>
<p>
<?php echo _HISA_REQD_SETTINGS_DESC2; ?>
</p>
<div class="ctr"></div>
</div>
<div class="install-form">
<div class="form-block">
<table class="content">
<tr>
<td class="item">
<?php echo _HISA_PHPVER_CHK; ?>
</td>
<td align="left">
<?php echo phpversion() < '4.1' ? '<b><font color="red">'. _NO .'</font></b>' : '<b><font color="green">'. _YES .'</font></b>';?>
</td>
</tr>
<tr>
<td>
- <?php echo _HISA_ZLIB_CHK; ?>
</td>
<td align="left">
<?php echo extension_loaded('zlib') ? '<b><font color="green">'. _AVAIL .'</font></b>' : '<b><font color="red">'. _UNAVAIL .'</font></b>';?>
</td>
</tr>
<tr>
<td>
- <?php echo _HISA_XML_CHK; ?>
</td>
<td align="left">
<?php echo extension_loaded('xml') ? '<b><font color="green">'. _AVAIL .'</font></b>' : '<b><font color="red">'. _UNAVAIL .'</font></b>';?>
</td>
</tr>
<tr>
<td>
- <?php echo _HISA_MYSQL_CHK; ?>
</td>
<td align="left">
<?php echo function_exists( 'mysql_connect' ) ? '<b><font color="green">'. _AVAIL .'</font></b>' : '<b><font color="red">'. _UNAVAIL .'</font></b>';?>
</td>
</tr>
<tr>
<td valign="top" class="item">
<?php echo _HISA_JCFG_CHK; ?>
</td>
<td align="left">
<?php
if (@file_exists('../configuration.php') && @is_writable( '../configuration.php' )){
echo '<b><font color="red">'. _WRITE .'</font></b>';
} else if (is_writable( '..' )) {
echo '<b><font color="red">'. _WRITE .'</font></b>';
} else {
echo '<b><font color="green">'. _NOWRITE .'</font></b>';
}
?>
</td>
</tr>
<tr>
<td class="item">
<?php echo _HISA_SSPATH_CHK; ?>
</td>
<td align="left" valign="top">
<?php echo is_writable( $sp ) ? '<b><font color="green">'. _WRITE .'</font></b>' : '<b><font color="red">'. _NOWRITE .'</font></b>';?>
</td>
</tr>
<tr>
<td class="item" colspan="2">
<b>(</b> <?php echo $sp ? $sp : ''. _NOTSET .''; ?> <b>)</b>
</td>
</tr>
</table>
</div>
</div>
<div class="clr"></div>
<?php
$wrongSettingsTexts = array();
if ( ini_get('magic_quotes_gpc') != '1' ) {
$wrongSettingsTexts[] = ''. _HISA_MAGICQ_ON_CHK .'';
}
if ( ini_get('register_globals') == '1' ) {
$wrongSettingsTexts[] = ''. _HISA_REGGLOBALS_ON_CHK .'';
}
if ($noGlobal != "1") {
if ( RG_EMULATION != 0 ) {
$wrongSettingsTexts[] = ''. _RG_EMU_ON_CHK1 .' <br /><span style="font-weight: normal; font-style: italic; color: #666;">'. _RG_EMU_ON_CHK2 .'</span>';
}
}
if ( count($wrongSettingsTexts) ) {
?>
<h1>
<?php echo _HISA_SECURITYCHK; ?>:
</h1>
<div class="install-text">
<p>
<?php echo _HISA_SECURITYCHK_DESC1; ?>
</p>
<p>
<?php echo _HISA_SECURITYCHK_DESC2; ?>
</p>
<div class="ctr"></div>
</div>
<div class="install-form">
<div class="form-block" style=" border: 1px solid #cc0000; background: #ffffcc;">
<table class="content">
<tr>
<td class="item">
<ul style="margin: 0px; padding: 0px; padding-left: 5px; text-align: left; padding-bottom: 0px; list-style: none;">
<?php
foreach ($wrongSettingsTexts as $txt) {
?>
<li style="min-height: 25px; padding-bottom: 5px; padding-left: 25px; color: red; font-weight: bold; background-image: url(../includes/js/ThemeOffice/warning.png); background-repeat: no-repeat; background-position: 0px 2px;" >
<?php
echo $txt;
?>
</li>
<?php
}
?>
</ul>
</td>
</tr>
</table>
</div>
</div>
<div class="clr"></div>
<?php
}
?>
<h1>
<?php echo _HISA_RECSETTINGS; ?>:
</h1>
<div class="install-text">
<p>
<?php echo _HISA_RECSETTINGS_DESC1; ?>
</p>
<p>
<?php echo _HISA_RECSETTINGS_DESC2; ?>
</p>
<div class="ctr"></div>
</div>
<div class="install-form">
<div class="form-block">
<table class="content">
<tr>
<td class="toggle" width="500px">
<?php echo _HISA_RECDIRECTIVE; ?>
</td>
<td class="toggle">
<?php echo _HISA_RECREC; ?>
</td>
<td class="toggle">
<?php echo _HISA_RECACTUAL; ?>
</td>
</tr>
<?php
$php_recommended_settings = array(array (_PHP_SAFEMODE,'safe_mode',_OFF),
array (_PHP_DISPLAYERRORS,'display_errors',_ON),
array (_PHP_FILEUPLOADS,'file_uploads',_ON),
array (_PHP_MAGICQUOTESGPC,'magic_quotes_gpc',_ON),
array (_PHP_MAGICQUOTESRT,'magic_quotes_runtime',_OFF),
array (_PHP_REGISTERGLOBALS,'register_globals',_OFF),
array (_PHP_OUTPUTBUFFERING,'output_buffering',_OFF),
array (_PHP_SESSIONAUTOSTART,'session.auto_start',_OFF),
);
foreach ($php_recommended_settings as $phprec) {
?>
<tr>
<td class="item">
<?php echo $phprec[0]; ?>:
</td>
<td class="toggle">
<?php echo $phprec[2]; ?>:
</td>
<td>
<b>
<?php
if ( get_php_setting($phprec[1]) == $phprec[2] ) {
?>
<font color="green">
<?php
} else {
?>
<font color="red">
<?php
}
echo get_php_setting($phprec[1]);
?>
</font>
</b>
<td>
</tr>
<?php
}
?>
<tr>
<td class="item">
<?php echo _REGISTERGLOBALS_EMU; ?>:
</td>
<td class="toggle">
<?php echo _OFF; ?>:
</td>
<td>
<?php
if ($noGlobal != "1") {
if ( RG_EMULATION ) {
?>
<font color="red"><b>
<?php
} else {
?>
<font color="green"><b>
<?php
}
echo ((RG_EMULATION) ? "". _ON ."" : "". _OFF ."");
} else { echo "<b>". _NA ."</b>"; }
?>
</b>
</font>
<td>
</tr>
<?php if ($noGlobal == "1") { ?>
<tr><td colspan="3" class="advisor"><i><?php echo _JREGGLOBALS_MSG; ?></i></td></tr>
<?php } ?>
</table>
</div>
</div>
</div>
</div>
<div class="clr"></div>
</div>
<?php if ($isV1 == "1") { // Only display the rest of the pages if Joomla! v1.0 installed. ?>
<div id="ctr" align="center">
<div class="install">
<div id="stepbar">
<div onClick="expandcontent('permenvMessage')" style="cursor:hand; cursor:pointer" width="25">
<div onClick="expandcontent('permenvDetail')" style="cursor:hand; cursor:pointer">
<img src="images/edit.png" width="16" height="16" alt=""> Show/Hide
</div></div>
<div id="permenvMessage" class="switchcontent">
<br>
<table border="0" align="center" width="90%">
<tr>
<td colspan="2" style="font-size: 9px; vertical-align: top;"><b><?php echo _MODE_SECURITY; ?>:</b></td>
</tr>
<tr>
<td width="20%" style="color: red; font-size: 9px; vertical-align: top;"><?php echo _MODE_RED; ?></td>
<td width="80%" style="font-size: 9px; vertical-align: top;"><?php echo _MODE_RED_NOTE; ?></td>
</tr>
<tr>
<td width="20%" style="color: blue; font-size: 9px; vertical-align: top;"><?php echo _MODE_BLUE; ?></td>
<td width="80%" style="font-size: 9px;" vertical-align: top;><?php echo _MODE_BLUE_NOTE; ?></td>
</tr>
<tr>
<td width="20%" style="color: green; font-size: 9px; vertical-align: top;"><?php echo _MODE_GREEN; ?></td>
<td width="80%" style="font-size: 9px; vertical-align: top;"><?php echo _MODE_GREEN_NOTE; ?></td>
</tr>
<tr>
<td colspan="2" style="font-size: 8px; vertical-align: top;">
<br /><b><?php echo _REF; ?>:</b><br />
<a href="http://forum.joomla.org/index.php/topic,102558.0.html" target="_new"><?php echo _REF_SECFAQ_URL; ?></a><br />
<a href="http://forum.joomla.org/index.php/topic,81058.0.html" target=_new"><?php echo _REF_SECADM_URL; ?></a><br />
<a href="http://forum.joomla.org/index.php/topic,121470.0.html" target="_new"><?php echo _REF_PERMFAQ_URL; ?></a>
</td>
</tr>
</table>
<?php
// if (ini_get('register_globals')) {
// echo "<table border='0' width='96%' cellspadding='2' cellspacing='3' align='center'><tr><td width='50%' class='bad-message'>". _REGGLOB_ON ."</td></tr><tr><td width='50%' class='advisor'>". _REGGLOB_ON_ADV ."</td></tr></table>"; }
?>
</div>
</div>
<div id="right">
<div class="clr"></div>
<h1>
<?php echo _HISA_DIRPERM; ?>:
</h1>
<div id="permenvDetail" class="switchcontent">
<div class="install-text">
<p>
<?php echo _HISA_DIRPERM_DESC1; ?>
</p>
<p>
<?php echo _HISA_DIRPERM_DESC2; ?>
</p>
<div class="clr"> </div>
<div class="ctr"></div>
</div>
<div class="install-form">
<div class="form-block">
<table class="content" cellspacing="0">
<tr>
<td class="toggle"><?php echo _DIR; ?></td>
<td class="toggle" align="right"><?php echo _WEBSVR; ?> </td>
<td class="toggle" align="center"><?php echo _MODE; ?></td>
</tr>
<?php
writableCell( 'administrator/backups' );
writableCell( 'administrator/components' );
writableCell( 'administrator/modules' );
writableCell( 'administrator/templates' );
writableCell( 'cache' );
writableCell( 'components' );
writableCell( 'images' );
writableCell( 'images/banners' );
writableCell( 'images/stories' );
writableCell( 'language' );
writableCell( 'mambots' );
writableCell( 'mambots/content' );
writableCell( 'mambots/editors' );
writableCell( 'mambots/editors-xtd' );
writableCell( 'mambots/search' );
writableCell( 'mambots/system' );
writableCell( 'media' );
writableCell( 'modules' );
writableCell( 'templates' );
?>
</table>
</div>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
</div>
<div class="error" style="width: 755px; padding: 2px; font-size: 11px; font-weight: normal; background-color: yellow; text-align: center; background-image: url(../includes/js/ThemeOffice/warning.png); background-position: 4px 4px; background-repeat: no-repeat; border: 1px solid #cc0000;">
<?php echo _WARN_SECURITY; ?>
</div>
<br>
<div class="clr"></div>
<?php } // Close the Joomla! v1.0 display check ?>
<br /><br />
<?php echo _JUST_LINK; ?><br />
<?php echo _OSM_LINK; ?>
<br /><br />
<div class="ctr">
<?php echo _JOOMLA_LINK; ?>
</div>
</body>
</html>
<?php
}
function get_php_setting($val) {
$r = (ini_get($val) == '1' ? 1 : 0);
return $r ? ''._ON.'' : ''._OFF.'';
}
function writableCell( $folder, $relative=1, $text='' ) {
$writeable = '<b><font color="green">'. _WRITE .'</font></b> ';
$unwriteable = '<b><font color="red">'. _NOWRITE .'</font></b> ';
echo '<tr>';
echo '<td class="item">' . $folder . '/</td>';
echo '<td align="right" style="border-right: 1px solid #c0c0c0;">';
if ( $relative ) {
echo is_writable( "../$folder" ) ? $writeable : $unwriteable;
} else {
echo is_writable( "$folder" ) ? $writeable : $unwriteable;
}
echo '</td>';
echo '<td class="item" align="center">';
if ( $relative ) {
if (substr(sprintf('%o', @fileperms("../".$folder)), -1) == '7')
{ echo "<font color='red'>"; }
elseif (substr(sprintf('%o', @fileperms("../".$folder)), -1) <= '4')
{ echo "<font color='blue'>"; }
else { echo "<font color='green'>"; }
} else {
if (substr(sprintf('%o', @fileperms($folder)), -1) == '7')
{ echo "<font color='red'>"; }
elseif (substr(sprintf('%o', @fileperms($folder)), -1) <= '4')
{ echo "<font color='blue'>"; }
else { echo "<font color='green'>"; }
}
if ( $relative ) {
echo "". substr(sprintf('%o', @fileperms("../".$folder)), -4) ."";
} else {
echo "". substr(sprintf('%o', @fileperms($folder)), -4) ."";
}
echo '</font>';
echo '</td>';
echo '</tr>';
}
?>