示例#1
0
}
/**
 * Error Checking
 *
 * Displays error and success messages
 *
 * @package GetSimple
 *
 * You can pass $update(global) directly if not using a redirrect and querystring
 *
 */
// do not use these alerts if ajax requests as they will not be seen, and interfere with other alerts
if (!requestIsAjax() && file_exists(GSUSERSPATH . _id($USR) . ".xml.reset") && get_filename_id() != 'index' && get_filename_id() != 'resetpassword') {
    doNotify(sprintf(i18n_r('ER_PWD_CHANGE'), 'profile.php'), 'error');
}
if (!requestIsAjax() && (!defined('GSNOAPACHECHECK') || GSNOAPACHECHECK == false) and !server_is_apache()) {
    doNotify(i18n_r('WARNING') . ': <a href="health-check.php">' . i18n_r('SERVER_SETUP') . ' non-Apache</a>', 'info');
}
if (!isset($update)) {
    $update = '';
}
if (isset($_GET['upd'])) {
    $update = var_in($_GET['upd']);
}
if (isset($_GET['success'])) {
    $success = var_in($_GET['success']);
}
if (isset($_GET['error'])) {
    $error = var_in($_GET['error']);
}
// if(isset($_GET['err'])) 	$err     = var_in($_GET['err']); // deprecated not used
示例#2
0
if (in_arrayi('gd', $php_modules)) {
    echo '<tr><td>GD Library</td><td><span class="OKmsg" >' . i18n_r('INSTALLED') . ' - ' . i18n_r('OK') . '</span></td></tr>';
} else {
    echo '<tr><td>GD Library</td><td><span class="WARNmsg" >' . i18n_r('NOT_INSTALLED') . ' - ' . i18n_r('WARNING') . '</span></td></tr>';
}
if (in_arrayi('zip', $php_modules)) {
    echo '<tr><td>ZipArchive</td><td><span class="OKmsg" >' . i18n_r('INSTALLED') . ' - ' . i18n_r('OK') . '</span></td></tr>';
} else {
    echo '<tr><td>ZipArchive</td><td><span class="WARNmsg" >' . i18n_r('NOT_INSTALLED') . ' - ' . i18n_r('WARNING') . '</span></td></tr>';
}
if (!in_arrayi('SimpleXML', $php_modules)) {
    echo '<tr><td>SimpleXML Module</td><td><span class="ERRmsg" >' . i18n_r('NOT_INSTALLED') . ' - ' . i18n_r('ERROR') . '</span></td></tr>';
} else {
    echo '<tr><td>SimpleXML Module</td><td><span class="OKmsg" >' . i18n_r('INSTALLED') . ' - ' . i18n_r('OK') . '</span></td></tr>';
}
if (server_is_apache()) {
    echo '<tr><td>Apache web server</td><td><span class="OKmsg" >' . $_SERVER['SERVER_SOFTWARE'] . ' - ' . i18n_r('OK') . '</span></td></tr>';
    if (function_exists('apache_get_modules')) {
        if (!in_arrayi('mod_rewrite', apache_get_modules())) {
            echo '<tr><td>Apache Mod Rewrite</td><td><span class="WARNmsg" >' . i18n_r('NOT_INSTALLED') . ' - ' . i18n_r('WARNING') . '</span></td></tr>';
        } else {
            echo '<tr><td>Apache Mod Rewrite</td><td><span class="OKmsg" >' . i18n_r('INSTALLED') . ' - ' . i18n_r('OK') . '</span></td></tr>';
        }
    } else {
        echo '<tr><td>Apache Mod Rewrite</td><td><span class="OKmsg" >' . i18n_r('INSTALLED') . ' - ' . i18n_r('OK') . '</span></td></tr>';
    }
} else {
    if (!getDef('GSNOAPACHECHECK') || GSNOAPACHECHECK == false) {
        echo '<tr><td>Apache web server</td><td><span class="ERRmsg" >' . $_SERVER['SERVER_SOFTWARE'] . ' - <b>' . i18n_r('ERROR') . '</b></span></td></tr>';
    }
}
示例#3
0
 * Error Checking
 *
 * Displays error and success messages	
 *
 * @package GetSimple
 *  
 * Modified by Jorge H. [ http://www.jorgehoya.es ] on 07/09/2011
 *
 * Modified by Shawn_a 8/01/2012
 * You can pass $update(global) directly if not using a redirrect and querystring
 *
 */
if (file_exists(GSUSERSPATH . _id($USR) . ".xml.reset") && get_filename_id() != 'index' && get_filename_id() != 'resetpassword') {
    echo '<div class="error"><p>' . i18n_r('ER_PWD_CHANGE') . '</p></div>';
}
if (!defined('GSNOAPACHECHECK') || GSNOAPACHECHECK == false and !server_is_apache()) {
    echo '<div class="error">' . i18n_r('WARNING') . ': <a href="health-check.php">' . i18n_r('SERVER_SETUP') . ' non-Apache</a></div>';
}
if (!isset($update)) {
    $update = '';
}
$err = '';
$restored = '';
if (isset($_GET['upd'])) {
    $update = function_exists("filter_var") ? filter_var($_GET['upd'], FILTER_SANITIZE_SPECIAL_CHARS) : htmlentities($_GET['upd']);
}
if (isset($_GET['success'])) {
    $success = function_exists("filter_var") ? filter_var($_GET['success'], FILTER_SANITIZE_SPECIAL_CHARS) : htmlentities($_GET['success']);
}
if (isset($_GET['error'])) {
    $error = function_exists("filter_var") ? filter_var($_GET['error'], FILTER_SANITIZE_SPECIAL_CHARS) : htmlentities($_GET['error']);