Example #1
0
                $userQ->close();
                $_SESSION = array();
                // deregister all current session variables
                FlashMsg::add(_("Your user account has been suspended. Contact with administrator to resolve this problem."), OPEN_MSG_WARNING);
                header("Location: ../home/index.php");
                exit;
            }
        }
    }
    $userQ->close();
}
/**
 * Redirect back to form if an error occurred
 */
if ($errorFound) {
    Form::setSession(Check::safeArray($_POST), $formError);
    $_SESSION['auth']['last_login'] = $loginSession;
    if (isset($sessLoginAttempts)) {
        $_SESSION['auth']['login_attempts'] = $sessLoginAttempts;
    }
    header("Location: ../auth/login_form.php");
    exit;
}
/**
 * Redirect to index page if suspended
 */
if (!$user->isActived()) {
    $_SESSION = array();
    // deregister all current session variables
    FlashMsg::add(_("Your user account has been suspended. Contact with administrator to resolve this problem."), OPEN_MSG_WARNING);
    header("Location: ../home/index.php");
Example #2
0
require_once "../config/i18n.php";
$locale = I18n::languageList();
// end i18n l10n
/**
 * XHTML Start (XML prolog, DOCTYPE, title page and meta data)
 */
$title = _("OpenClinic Install Wizard");
require_once "../layout/xhtml_start.php";
echo HTML::start('link', array('rel' => 'stylesheet', 'href' => '../css/wizard.css', 'type' => 'text/css'), true);
echo HTML::insertScript('wizard.js');
echo HTML::end('head');
echo HTML::start('body');
//echo "<!-- Header -->\n";
echo HTML::start('form', array('method' => 'post', 'action' => $_SERVER['PHP_SELF'], 'onsubmit' => 'return validateInstall();'));
//Error::debug($_POST);
$_POST = Check::safeArray($_POST);
echo Form::hidden("alreadyVisited", 1, array('id' => 'h_alreadyVisited'));
echo Form::hidden("buttonPressed", null, array('id' => 'h_buttonPressed'));
echo Form::hidden("dbHost", preg_replace("/ /", "", $_POST['dbHost']), array('id' => 'h_dbHost'));
echo Form::hidden("dbUser", preg_replace("/ /", "", $_POST['dbUser']), array('id' => 'h_dbUser'));
echo Form::hidden("dbPasswd", $_POST['dbPasswd'], array('id' => 'h_dbPasswd'));
echo Form::hidden("dbName", preg_replace("/ /", "", $_POST['dbName']), array('id' => 'h_dbName'));
echo Form::hidden("clinicLanguage", $_POST['clinicLanguage'], array('id' => 'h_clinicLanguage'));
echo Form::hidden("clinicName", $_POST['clinicName'], array('id' => 'h_clinicName'));
echo Form::hidden("clinicHours", $_POST['clinicHours'], array('id' => 'h_clinicHours'));
echo Form::hidden("clinicAddress", $_POST['clinicAddress'], array('id' => 'h_clinicAddress'));
echo Form::hidden("clinicPhone", $_POST['clinicPhone'], array('id' => 'h_clinicPhone'));
echo Form::hidden("timeout", intval($_POST['timeout']), array('id' => 'h_timeout'));
echo Form::hidden("itemsPage", intval($_POST['itemsPage']), array('id' => 'h_itemsPage'));
echo Form::hidden("clinicTheme", $_POST['clinicTheme'], array('id' => 'h_clinicTheme'));
echo Form::hidden("firstName", $_POST['firstName'], array('id' => 'h_firstName'));