function josSecurityCheck($width='95%') {
$wrongSettingsTexts = array();
if ( ini_get('magic_quotes_gpc') != '1' ) {
$wrongSettingsTexts[] = 'PHP magic_quotes_gpc setting is `OFF` instead of `ON`';
}
if ( ini_get('register_globals') == '1' ) {
$wrongSettingsTexts[] = 'PHP register_globals setting is `ON` instead of `OFF`';
}
if ( RG_EMULATION != 0 ) {
$wrongSettingsTexts[] = 'Joomla! RG_EMULATION setting is `ON` instead of `OFF` in file globals.php <br /><span style="font-weight: normal; font-style: italic; color: #666;">`ON` by default for compatibility reasons</span>';
}
if ( count($wrongSettingsTexts) ) {
?>
<div style="clear: both; margin: 3px; margin-top: 10px; padding: 5px 15px; display: block; float: left; border: 1px solid #cc0000; background: #ffffcc; text-align: left; width: <?php echo $width;?>;">
<p style="color: #CC0000;">
Following PHP Server Settings are not optimal for <strong>Security</strong> and it is recommended to change them:
</p>
<ul style="margin: 0px; padding: 0px; padding-left: 15px; 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>
<p style="color: #666;">
Please check <a href="http://forum.joomla.org/index.php/topic,81058.0.html" target="_blank" style="color: blue; text-decoration: underline">the Official Joomla! Server Security post</a> for more information.
</p>
</div>
<?php
}
}
Lesezeichen