Example #1
0
			<td>
				<?php 
echo HTML_admin_misc::get_php_setting('register_globals');
?>
			</td>
		</tr>
		<tr>
			<td>
				<?php 
echo JText::_('Output Buffering');
?>
:
			</td>
			<td>
				<?php 
echo HTML_admin_misc::get_php_setting('output_buffering');
?>
			</td>
		</tr>
		<tr>
			<td>
				<?php 
echo JText::_('Session Save Path');
?>
:
			</td>
			<td>
				<?php 
echo ($sp = ini_get('session.save_path')) ? $sp : JText::_('none');
?>
			</td>
    public static function system_info($version)
    {
        global $mosConfig_absolute_path, $database, $mosConfig_cachepath, $mainframe;
        $width = 400;
        // width of 100%
        $tabs = new mosTabs(0);
        ?>

		<table class="adminheading">
		<tr>
			<th class="info">
				Information
			</th>
		</tr>
		</table>

		<?php 
        $tabs->startPane("sysinfo");
        $tabs->startTab("System Info", "system-page");
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					System Information
				</th>
			</tr>
			<tr>
				<td colspan="2">
					<?php 
        // show security setting check
        josSecurityCheck();
        ?>
				</td>
			</tr>
			<tr>
				<td valign="top" width="250">
					<strong>PHP built On:</strong>
				</td>
				<td>
					<?php 
        echo php_uname();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Database Version:</strong>
				</td>
				<td>
					<?php 
        echo $database->getVersion();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>PHP Version:</strong>
				</td>
				<td>
					<?php 
        echo phpversion();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Web Server:</strong>
				</td>
				<td>
					<?php 
        echo HTML_admin_misc::get_server_software();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>WebServer to PHP interface:</strong>
				</td>
				<td>
					<?php 
        echo php_sapi_name();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Joomla! Version:</strong>
				</td>
				<td>
					<?php 
        echo $version;
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>User Agent:</strong>
				</td>
				<td>
					<?php 
        echo phpversion() <= '4.2.1' ? getenv('HTTP_USER_AGENT') : $_SERVER['HTTP_USER_AGENT'];
        ?>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="height: 10px;">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<strong>Relevant PHP Settings:</strong>
				</td>
				<td>
					<table cellspacing="1" cellpadding="1" border="0">
					<tr>
						<td width="250">
							Joomla! Register Globals Emulation:
						</td>
						<td style="font-weight: bold;" width="50">
							<?php 
        echo RG_EMULATION ? '<span style="color: red;">ON</span>' : '<span style="color: green;">OFF</span>';
        ?>
						</td>
						<td>
							<?php 
        $img = RG_EMULATION ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Register Globals:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('register_globals', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('register_globals') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Magic Quotes:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('magic_quotes_gpc', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('magic_quotes_gpc') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Safe Mode:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('safe_mode', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('safe_mode') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							File Uploads:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('file_uploads', 1, 1);
        ?>
						</td>
						<td>
							<?php 
        $img = !ini_get('file_uploads') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Session auto start:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('session.auto_start', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('session.auto_start') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Session save path:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($sp = ini_get('session.save_path')) ? $sp : 'none';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Short Open Tags:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('short_open_tag');
        ?>
						</td>
						<td>
						</td>
					</tr>
					<tr>
						<td>
							Output Buffering:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('output_buffering');
        ?>
						</td>
						<td>
						</td>
					</tr>
					<tr>
						<td>
							Open basedir:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($ob = ini_get('open_basedir')) ? $ob : 'none';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Display Errors:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo HTML_admin_misc::get_php_setting('display_errors');
        ?>
						</td>
					</tr>
					<tr>
						<td>
							XML enabled:
						</td>
						<td style="font-weight: bold;" colspan="2">
						<?php 
        echo extension_loaded('xml') ? 'Yes' : 'No';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Zlib enabled:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo extension_loaded('zlib') ? 'Yes' : 'No';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Disabled Functions:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($df = ini_get('disable_functions')) ? $df : 'none';
        ?>
						</td>
					</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="height: 10px;">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<strong>Configuration File:</strong>
				</td>
				<td>
				<?php 
        $cf = file($mosConfig_absolute_path . '/configuration.php');
        foreach ($cf as $k => $v) {
            if (preg_match('/mosConfig_host/i', $v)) {
                $cf[$k] = '$mosConfig_host = \'xxxxxx\'';
            } elseif (preg_match('/mosConfig_user/i', $v)) {
                $cf[$k] = '$mosConfig_user = \'xxxxxx\'';
            } elseif (preg_match('/mosConfig_password/i', $v)) {
                $cf[$k] = '$mosConfig_password = \'xxxxxx\'';
            } elseif (preg_match('/mosConfig_db /i', $v)) {
                $cf[$k] = '$mosConfig_db = \'xxxxxx\'';
            }
        }
        foreach ($cf as $k => $v) {
            $k = htmlspecialchars($k);
            $v = htmlspecialchars($v);
            $cf[$k] = $v;
        }
        echo implode("<br />", $cf);
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab("PHP Info", "php-page");
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					PHP Information
				</th>
			</tr>
			<tr>
				<td>
				<?php 
        ob_start();
        phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
        $phpinfo = ob_get_contents();
        ob_end_clean();
        preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
        $output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
        $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
        $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
        $output = preg_replace('#<hr />#', '', $output);
        echo $output;
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab('Permissions', 'perms');
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					Directory Permissions
				</th>
			</tr>
			<tr>
				<td>
					<strong>For all Joomla! functions and features to work ALL of the following directories should be writeable:</strong>
					<?php 
        $sp = ini_get('session.save_path');
        mosHTML::writableCell('administrator/backups');
        mosHTML::writableCell('administrator/components');
        mosHTML::writableCell('administrator/modules');
        mosHTML::writableCell('administrator/templates');
        mosHTML::writableCell('components');
        mosHTML::writableCell('images');
        mosHTML::writableCell('images/banners');
        mosHTML::writableCell('images/stories');
        mosHTML::writableCell('language');
        mosHTML::writableCell('mambots');
        mosHTML::writableCell('mambots/content');
        mosHTML::writableCell('mambots/editors');
        mosHTML::writableCell('mambots/editors-xtd');
        mosHTML::writableCell('mambots/search');
        mosHTML::writableCell('mambots/system');
        mosHTML::writableCell('media');
        mosHTML::writableCell('modules');
        mosHTML::writableCell('templates');
        mosHTML::writableCell($mosConfig_cachepath, 0, '<strong>Cache Directory</strong> ');
        mosHTML::writableCell($sp, 0, '<strong>Session Directory</strong> ');
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
		<?php 
    }
Example #3
0
function gantryDiagPHPSettings()
{
    $db =& JFactory::getDBO();
    $infop = array();
    $infop[] = JText::_('Safe Mode') . " - " . HTML_admin_misc::get_php_setting('safe_mode');
    $infop[] = JText::_('Open basedir') . " - " . (($ob = ini_get('open_basedir')) ? $ob : JText::_('none'));
    $infop[] = JText::_('Display Errors') . " - " . HTML_admin_misc::get_php_setting('display_errors');
    $infop[] = JText::_('Short Open Tags') . " - " . HTML_admin_misc::get_php_setting('short_open_tag');
    $infop[] = JText::_('File Uploads') . " - " . HTML_admin_misc::get_php_setting('file_uploads');
    $infop[] = JText::_('Magic Quotes') . " - " . HTML_admin_misc::get_php_setting('magic_quotes_gpc');
    $infop[] = JText::_('Register Globals') . " - " . HTML_admin_misc::get_php_setting('register_globals');
    $infop[] = JText::_('Output Buffering') . " - " . HTML_admin_misc::get_php_setting('output_buffering');
    $infop[] = JText::_('Session Save Path') . " - " . (($sp = ini_get('session.save_path')) ? $sp : JText::_('none'));
    $infop[] = JText::_('Session Auto Start') . " - " . intval(ini_get('session.auto_start'));
    $infop[] = JText::_('XML Enabled') . " - " . (extension_loaded('xml') ? JText::_('Yes') : JText::_('No'));
    $infop[] = JText::_('Zlib Enabled') . " - " . (extension_loaded('zlib') ? JText::_('Yes') : JText::_('No'));
    $infop[] = JText::_('Disabled Functions') . " - " . (($df = ini_get('disable_functions')) ? $df : JText::_('none'));
    $infop[] = JText::_('Mbstring Enabled') . " - " . (extension_loaded('mbstring') ? JText::_('Yes') : JText::_('No'));
    $infop[] = JText::_('Iconv Available') . " - " . (function_exists('iconv') ? JText::_('Yes') : JText::_('No'));
    $query = 'SELECT name FROM #__plugins' . ' WHERE folder="editors" AND published="1"';
    $db->setQuery($query, 0, 1);
    $editor = $db->loadResult();
    $infop[] = JText::_('WYSIWYG Editor') . " - " . $editor;
    return implode("\n", $infop);
}
			<td>
				<?php 
echo phpversion();
?>
			</td>
		</tr>
		<tr>
			<td>
				<strong><?php 
echo JText::_('Web Server');
?>
:</strong>
			</td>
			<td>
				<?php 
echo HTML_admin_misc::get_server_software();
?>
			</td>
		</tr>
		<tr>
			<td>
				<strong><?php 
echo JText::_('WebServer to PHP Interface');
?>
:</strong>
			</td>
			<td>
				<?php 
echo php_sapi_name();
?>
			</td>
Example #5
0
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
require_once JApplicationHelper::getPath('admin_html');
switch ($task) {
    case 'sysinfo':
        HTML_admin_misc::system_info();
        break;
    case 'changelog':
        HTML_admin_misc::changelog();
        break;
    case 'help':
        HTML_admin_misc::help();
        break;
    case 'version':
        HTML_admin_misc::version();
        break;
    case 'preview':
        HTML_admin_misc::preview();
        break;
    case 'preview2':
        HTML_admin_misc::preview(1);
        break;
    case 'keepalive':
        return;
        break;
}
            exit;
        }
        $goto = str_replace("'", '', $goto);
        mosRedirect($goto);
        break;
    case 'listcomponents':
        HTML_admin_misc::ListComponents();
        break;
    case 'sysinfo':
        HTML_admin_misc::system_info($version, $option);
        break;
    case 'changelog':
        HTML_admin_misc::changelog();
        break;
    case 'help':
        HTML_admin_misc::help();
        break;
    case 'version':
        HTML_admin_misc::version();
        break;
    case 'preview':
        HTML_admin_misc::preview();
        break;
    case 'preview2':
        HTML_admin_misc::preview(1);
        break;
    case 'cpanel':
    default:
        HTML_admin_misc::controlPanel();
        break;
}
Example #7
0
    function system_info($version)
    {
        global $mosConfig_absolute_path, $database;
        //$tab = mosGetParam( $_REQUEST, 'tab', 'tab1' );
        $width = 400;
        // width of 100%
        $tabs = new mosTabs(0);
        ?>

		<table class="adminheading">
		<tr>
			<th class="info">
			<?php 
        echo T_('Information');
        ?>
			</th>
		</tr>
		</table>
		<?php 
        $tabs->startPane("sysinfo");
        $tabs->startTab(T_("System Info"), "system-page");
        ?>
		<table class="adminform">
		<tr>
			<th colspan="2">
			<?php 
        echo T_('System Information');
        ?>
			</th>
		</tr>
		<tr>
			<td valign="top" width="250">
			<strong>
			<?php 
        echo T_('PHP built On:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo php_uname();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('Database Version:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo mysql_get_server_info();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('PHP Version:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo phpversion();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('Web Server:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo HTML_admin_misc::get_server_software();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('WebServer to PHP interface:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo php_sapi_name();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('Mambo Version:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo $version;
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<strong>
			<?php 
        echo T_('User Agent:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        echo phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
        ?>
			</td>
		</tr>
		<tr>
			<td valign="top">
			<strong>
			<?php 
        echo T_('Relevant PHP Settings:');
        ?>
			</strong>
			</td>
			<td>
				<table cellspacing="1" cellpadding="1" border="0">
				<tr>
					<td>
					<?php 
        echo T_('Safe Mode:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('safe_mode');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Open basedir:');
        ?>
					</td>
					<td>
					<?php 
        echo ($ob = ini_get('open_basedir')) ? $ob : 'none';
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Display Errors:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('display_errors');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Short Open Tags:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('short_open_tag');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('File Uploads:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('file_uploads');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Magic Quotes');
        ?>
:
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('magic_quotes_gpc');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Register Globals:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('register_globals');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Output Buffering:');
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('output_buffering');
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Session save path:');
        ?>
					</td>
					<td>
					<?php 
        echo ($sp = ini_get('session.save_path')) ? $sp : 'none';
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Session auto start:');
        ?>
					</td>
					<td>
					<?php 
        echo intval(ini_get('session.auto_start'));
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('XML enabled:');
        ?>
					</td>
					<td>
					<?php 
        echo extension_loaded('xml') ? 'Yes' : 'No';
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Zlib enabled:');
        ?>
					</td>
					<td>
					<?php 
        echo extension_loaded('zlib') ? 'Yes' : 'No';
        ?>
					</td>
				</tr>
				<tr>
					<td>
					<?php 
        echo T_('Disabled Functions:');
        ?>
					</td>
					<td>
					<?php 
        echo ($df = ini_get('disable_functions')) ? $df : 'none';
        ?>
					</td>
				</tr>
				<?php 
        $query = "SELECT name FROM #__mambots" . "\nWHERE folder='editors' AND published='1'" . "\nLIMIT 1";
        $database->setQuery($query);
        $editor = $database->loadResult();
        ?>
				<tr>
					<td>
					<?php 
        echo T_('WYSIWYG Editor:');
        ?>
					</td>
					<td>
					<?php 
        echo $editor;
        ?>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top">
			<strong>
			<?php 
        echo T_('Configuration File:');
        ?>
			</strong>
			</td>
			<td>
			<?php 
        $cf = file($mosConfig_absolute_path . '/configuration.php');
        foreach ($cf as $k => $v) {
            if (eregi('mosConfig_host', $v)) {
                $cf[$k] = '$mosConfig_host = \'xxxxxx\'';
            } else {
                if (eregi('mosConfig_user', $v)) {
                    $cf[$k] = '$mosConfig_user = \'xxxxxx\'';
                } else {
                    if (eregi('mosConfig_password', $v)) {
                        $cf[$k] = '$mosConfig_password = \'xxxxxx\'';
                    } else {
                        if (eregi('mosConfig_db ', $v)) {
                            $cf[$k] = '$mosConfig_db = \'xxxxxx\'';
                        } else {
                            if (eregi('<?php', $v)) {
                                $cf[$k] = '&lt;?php';
                            }
                        }
                    }
                }
            }
        }
        echo implode("<br />", $cf);
        ?>
			</td>
		</tr>
		</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab(T_("PHP Info"), "php-page");
        ?>
		<table class="adminform">
		<tr>
			<th colspan="2">
			<?php 
        echo T_('PHP Information');
        ?>
			</th>
		</tr>
		<tr>
			<td>
			<?php 
        ob_start();
        phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
        $phpinfo = ob_get_contents();
        ob_end_clean();
        preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
        $output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
        $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
        $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
        $output = preg_replace('#<hr />#', '', $output);
        echo $output;
        ?>
			</td>
		</tr>
		</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab(T_('Permissions'), 'perms');
        ?>
		<table class="adminform">
          <tr>
            <th colspan="2"> <?php 
        echo T_('Directory Permissions');
        ?>
</th>
          </tr>
          <tr>
            <td>
        <strong><?php 
        echo T_('For all Mambo functions and features to work ALL of the following directories should be writeable:');
        ?>
</strong>
			<?php 
        mosHTML::writableCell('administrator/backups');
        mosHTML::writableCell('administrator/components');
        mosHTML::writableCell('administrator/modules');
        mosHTML::writableCell('administrator/templates');
        mosHTML::writableCell('cache');
        mosHTML::writableCell('components');
        mosHTML::writableCell('images');
        mosHTML::writableCell('images/banners');
        mosHTML::writableCell('images/stories');
        mosHTML::writableCell('language');
        mosHTML::writableCell('mambots');
        mosHTML::writableCell('mambots/content');
        mosHTML::writableCell('mambots/editors');
        mosHTML::writableCell('mambots/editors-xtd');
        mosHTML::writableCell('mambots/search');
        mosHTML::writableCell('media');
        mosHTML::writableCell('modules');
        mosHTML::writableCell('templates');
        ?>

            </td>
          </tr>
        </table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
		<?php 
    }
    function system_info($version)
    {
        global $mosConfig_absolute_path, $database, $mosConfig_cachepath, $mainframe;
        $width = 400;
        // width of 100%
        $tabs = new mosTabs(0);
        ?>

		<table class="adminheading">
		<tr>
			<th class="info">
				Informações do Sistema
			</th>
		</tr>
		</table>

		<?php 
        $tabs->startPane("sysinfo");
        $tabs->startTab("Sistema Info", "system-page");
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					Informações do Sistema
				</th>
			</tr>
			<tr>
				<td colspan="2">
					<?php 
        // show security setting check
        josSecurityCheck();
        ?>
				</td>
			</tr>
			<tr>
				<td valign="top" width="250">
					<strong>Instalação do PHP:</strong>
				</td>
				<td>
					<?php 
        echo php_uname();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Versão da Base de Dados:</strong>
				</td>
				<td>
					<?php 
        echo $database->getVersion();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Versão do PHP:</strong>
				</td>
				<td>
					<?php 
        echo phpversion();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Servidor Web:</strong>
				</td>
				<td>
					<?php 
        echo HTML_admin_misc::get_server_software();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Interface de Servidor para PHP:</strong>
				</td>
				<td>
					<?php 
        echo php_sapi_name();
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Versão do Joomla!: </strong>
				</td>
				<td>
					<?php 
        echo $version;
        ?>
				</td>
			</tr>
			<tr>
				<td>
					<strong>Navegador Utilizado:</strong>
				</td>
				<td>
					<?php 
        echo phpversion() <= '4.2.1' ? getenv('HTTP_USER_AGENT') : $_SERVER['HTTP_USER_AGENT'];
        ?>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="height: 10px;">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<strong>Configurações PHP relevantes:</strong>
				</td>
				<td>
					<table cellspacing="1" cellpadding="1" border="0">
					<tr>
						<td width="250">
							Emulação Joomla! para Registo de Globais:
						</td>
						<td style="font-weight: bold;" width="50">
							<?php 
        echo RG_EMULATION ? '<span style="color: red;">Ligado</span>' : '<span style="color: green;">Desligado</span>';
        ?>
						</td>
						<td>
							<?php 
        $img = RG_EMULATION ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Registros Globais:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('register_globals', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('register_globals') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Citações Mágicas:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('magic_quotes_gpc', 1, 1);
        ?>
						</td>
						<td>
							<?php 
        $img = !ini_get('magic_quotes_gpc') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Modo Seguro:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('safe_mode', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('safe_mode') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Envio de arquivos:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('file_uploads', 1, 1);
        ?>
						</td>
						<td>
							<?php 
        $img = !ini_get('file_uploads') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Início automático de sessão:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('session.auto_start', 1, 0);
        ?>
						</td>
						<td>
							<?php 
        $img = ini_get('session.auto_start') ? 'publish_x.png' : 'tick.png';
        ?>
							<img src="../images/<?php 
        echo $img;
        ?>
" />
						</td>
					</tr>
					<tr>
						<td>
							Caminho para Sessão:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($sp = ini_get('session.save_path')) ? $sp : 'nenhum';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Tags de abertura abreviadas:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('short_open_tag');
        ?>
						</td>
						<td>
						</td>
					</tr>
					<tr>
						<td>
							Memória temporária de saída:
						</td>
						<td style="font-weight: bold;">
							<?php 
        echo HTML_admin_misc::get_php_setting('output_buffering');
        ?>
						</td>
						<td>
						</td>
					</tr>
					<tr>
						<td>
							Diretório base de abertura:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($ob = ini_get('open_basedir')) ? $ob : 'nenhum';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Exibir Erros:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo HTML_admin_misc::get_php_setting('display_errors');
        ?>
						</td>
					</tr>
					<tr>
						<td>
							XML ativado:
						</td>
						<td style="font-weight: bold;" colspan="2">
						<?php 
        echo extension_loaded('xml') ? 'Sim' : 'Não';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Zlib ativado:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo extension_loaded('zlib') ? 'Sim' : 'Não';
        ?>
						</td>
					</tr>
					<tr>
						<td>
							Funcionalidades desativadas:
						</td>
						<td style="font-weight: bold;" colspan="2">
							<?php 
        echo ($df = ini_get('disable_functions')) ? $df : 'nenhuma';
        ?>
						</td>
					</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="height: 10px;">
				</td>
			</tr>
			<tr>
				<td valign="top">
					<strong>Arquivo de configuração:</strong>
				</td>
				<td>
				<?php 
        $cf = file($mosConfig_absolute_path . '/configuration.php');
        foreach ($cf as $k => $v) {
            if (eregi('mosConfig_host', $v)) {
                $cf[$k] = '$mosConfig_host = \'xxxxxx\'';
            } else {
                if (eregi('mosConfig_user', $v)) {
                    $cf[$k] = '$mosConfig_user = \'xxxxxx\'';
                } else {
                    if (eregi('mosConfig_password', $v)) {
                        $cf[$k] = '$mosConfig_password = \'xxxxxx\'';
                    } else {
                        if (eregi('mosConfig_db ', $v)) {
                            $cf[$k] = '$mosConfig_db = \'xxxxxx\'';
                        }
                    }
                }
            }
        }
        foreach ($cf as $k => $v) {
            $k = htmlspecialchars($k);
            $v = htmlspecialchars($v);
            $cf[$k] = $v;
        }
        echo implode("<br />", $cf);
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab("PHP Info", "php-page");
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					Informações PHP
				</th>
			</tr>
			<tr>
				<td>
				<?php 
        ob_start();
        phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
        $phpinfo = ob_get_contents();
        ob_end_clean();
        preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
        $output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
        $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
        $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
        $output = preg_replace('#<hr />#', '', $output);
        echo $output;
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab('Permissões', 'perms');
        ?>
			<table class="adminform">
			<tr>
				<th colspan="2">
					Permissões dos Diretórios
				</th>
			</tr>
			<tr>
				<td>
					<strong>Para todas as funções e características do Joomla! funcionem, TODOS os diretórios a seguir devem ter permissão de escrita</strong>
					<?php 
        $sp = ini_get('session.save_path');
        mosHTML::writableCell('administrator/backups');
        mosHTML::writableCell('administrator/components');
        mosHTML::writableCell('administrator/modules');
        mosHTML::writableCell('administrator/templates');
        mosHTML::writableCell('components');
        mosHTML::writableCell('images');
        mosHTML::writableCell('images/banners');
        mosHTML::writableCell('images/stories');
        mosHTML::writableCell('language');
        mosHTML::writableCell('mambots');
        mosHTML::writableCell('mambots/content');
        mosHTML::writableCell('mambots/editors');
        mosHTML::writableCell('mambots/editors-xtd');
        mosHTML::writableCell('mambots/search');
        mosHTML::writableCell('mambots/system');
        mosHTML::writableCell('media');
        mosHTML::writableCell('modules');
        mosHTML::writableCell('templates');
        mosHTML::writableCell($mosConfig_cachepath, 0, '<strong>Cache Directory</strong> ');
        mosHTML::writableCell($sp, 0, '<strong>Session Directory</strong> ');
        ?>
				</td>
			</tr>
			</table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
        ?>
		<?php 
    }
Example #9
0
    function system_info($version, $option)
    {
        global $mosConfig_absolute_path, $database, $adminLanguage;
        //$tab = mosGetParam( $_REQUEST, 'tab', 'tab1' );
        $width = 400;
        // width of 100%
        $tabs = new mosTabs(0);
        ?>

		<table class="adminheading">
		<tr>
			<th class="info">
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_INFO;
        ?>
			</th>
		</tr>
		</table>
		<?php 
        $tabs->startPane("sysinfo");
        $tabs->startTab($adminLanguage->A_MENU_SYSTEM_INFO, "system-page");
        ?>
		<table class="adminform">
		<tr>
			<th colspan="2">
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_SYSTEM;
        ?>
			</th>
		</tr>
		<tr>
			<td valign="top" width="250">
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_PHP_BUILT_ON;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo php_uname();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_DB;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo mysql_get_server_info();
        ?>
 
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_PHP_VERSION;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo phpversion();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_SERVER;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo HTML_admin_misc::get_server_software();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_SERVER_TO_PHP;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo php_sapi_name();
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_VERSION;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo $version;
        ?>
			</td>
		</tr>
		<tr>
			<td>
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_AGENT;
        ?>
			</b>
			</td>
			<td>
			<?php 
        echo phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
        ?>
			</td>
		</tr>
		<tr>
			<td valign="top">
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_SETTINGS;
        ?>
			</b>
			</td>
			<td> 
				<table cellspacing="1" cellpadding="1" border="0">
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_MODE;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('safe_mode');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_BASEDIR;
        ?>
					</td>
					<td>
					<?php 
        echo ($ob = ini_get('open_basedir')) ? $ob : 'none';
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_ERRORS;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('display_errors');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_OPEN_TAGS;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('short_open_tag');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_FILE_UPLOADS;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('file_uploads');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_QUOTES;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('magic_quotes_gpc');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_REG_GLOBALS;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('register_globals');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_OUTPUT_BUFF;
        ?>
					</td>
					<td>
					<?php 
        echo HTML_admin_misc::get_php_setting('output_buffering');
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_S_SAVE_PATH;
        ?>
					</td>
					<td>
					<?php 
        echo ($sp = ini_get('session.save_path')) ? $sp : 'none';
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_S_AUTO_START;
        ?>
					</td>
					<td>
					<?php 
        echo intval(ini_get('session.auto_start'));
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_XML;
        ?>
					</td>
					<td>
					<?php 
        echo extension_loaded('xml') ? 'Yes' : 'No';
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_ZLIB;
        ?>
					</td>
					<td>
					<?php 
        echo extension_loaded('zlib') ? 'Yes' : 'No';
        ?>
					</td>
				</tr>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_DISABLED;
        ?>
					</td>
					<td>
					<?php 
        echo ($df = ini_get('disable_functions')) ? $df : 'none';
        ?>
					</td>
				</tr>
				<?php 
        $query = "SELECT name FROM #__mambots" . "\nWHERE folder='editors' AND published='1'" . "\nLIMIT 1";
        $database->setQuery($query);
        $editor = $database->loadResult();
        ?>
				<tr>
					<td>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_WYSIWYG;
        ?>
					</td>
					<td>
					<?php 
        echo $editor;
        ?>
					</td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top">
			<b>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_CONF_FILE;
        ?>
			</b>
			</td>
			<td>
			<?php 
        $cf = file("{$mosConfig_absolute_path}/configuration.php");
        foreach ($cf as $k => $v) {
            if (eregi('mosConfig_host', $v)) {
                $cf[$k] = '$mosConfig_host = \'xxxxxx\'';
            } else {
                if (eregi('mosConfig_user', $v)) {
                    $cf[$k] = '$mosConfig_user = \'xxxxxx\'';
                } else {
                    if (eregi('mosConfig_password', $v)) {
                        $cf[$k] = '$mosConfig_password = \'xxxxxx\'';
                    } else {
                        if (eregi('mosConfig_db ', $v)) {
                            $cf[$k] = '$mosConfig_db = \'xxxxxx\'';
                        } else {
                            if (eregi('<?php', $v)) {
                                $cf[$k] = '&lt;?php';
                            }
                        }
                    }
                }
            }
        }
        echo implode("<br />", $cf);
        ?>
			</td>
		</tr>
		</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_ADMIN_PHP_INFO2, "php-page");
        ?>
		<table class="adminform">
		<tr>
			<th colspan="2">
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_PHP_INFO;
        ?>
			</th>
		</tr>
		<tr>
			<td>
			<?php 
        ob_start();
        phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES);
        $phpinfo = ob_get_contents();
        ob_end_clean();
        preg_match_all('#<body[^>]*>(.*)</body>#siU', $phpinfo, $output);
        $output = preg_replace('#<table#', '<table class="adminlist" align="center"', $output[1][0]);
        $output = preg_replace('#(\\w),(\\w)#', '\\1, \\2', $output);
        $output = preg_replace('#border="0" cellpadding="3" width="600"#', 'border="0" cellspacing="1" cellpadding="4" width="95%"', $output);
        $output = preg_replace('#<hr />#', '', $output);
        echo $output;
        ?>
			</td>
		</tr>
		</table>
		<?php 
        $tabs->endTab();
        $tabs->startTab($adminLanguage->A_COMP_ADMIN_PERMISSIONS, "perms");
        ?>
		<table class="adminform">
          <tr>
            <th colspan="2">
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_DIR_PERM;
        ?>
            </th>
          </tr>
          <tr>
            <td>
        <strong>
    <?php 
        echo $adminLanguage->A_COMP_ADMIN_FOR_ALL;
        ?>
        </strong>
			<?php 
        mosHTML::writableCell('administrator/backups');
        mosHTML::writableCell('administrator/components');
        mosHTML::writableCell('administrator/modules');
        mosHTML::writableCell('administrator/templates');
        mosHTML::writableCell('cache');
        mosHTML::writableCell('components');
        mosHTML::writableCell('images');
        mosHTML::writableCell('images/banners');
        mosHTML::writableCell('images/stories');
        mosHTML::writableCell('language');
        mosHTML::writableCell('mambots');
        mosHTML::writableCell('mambots/content');
        mosHTML::writableCell('mambots/search');
        mosHTML::writableCell('media');
        mosHTML::writableCell('modules');
        mosHTML::writableCell('templates');
        ?>
		
            </td>
          </tr>
        </table>
		<?php 
        $tabs->endTab();
        $tabs->endPane();
    }
     License for the specific language governing rights and limitations
     under the License.

------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------
Author: Mambo Dev Team
	  Soeren

Comment:
	Have Fun...
------------------------------------------------------------------------------*/
//------------------------------------------------------------------------------
/**
* @package joomlaXplorer
*/
HTML_admin_misc::system_info();
class HTML_admin_misc
{
    function get_php_setting($val)
    {
        $r = ini_get($val) == '1' ? 1 : 0;
        return $r ? JText::_('ON') : JText::_('OFF');
    }
    function get_server_software()
    {
        if (isset($_SERVER['SERVER_SOFTWARE'])) {
            return $_SERVER['SERVER_SOFTWARE'];
        } else {
            if ($sf = getenv('SERVER_SOFTWARE')) {
                return $sf;
            } else {