Example #1
0
function checkLogin()
{
    $login = getAdminContent();
    $message = $login->check();
    global $smarty;
    global $_LANG;
    if ($message[0] == "") {
        $smarty->assign("user", $_SESSION['user']);
        header("location:index.php");
    } else {
        if ($message[0] == 1) {
            $smarty->assign("login_name_error_message", $_LANG['ERROR_USER_PASSWORD_MESSAGE']);
        } else {
            if ($message[0] == 2) {
                $smarty->assign("password_error_message", $_LANG['ERROR_PASSWORD_MESSAGE']);
            }
        }
    }
}
Example #2
0
function update()
{
    $admin = getAdminContent();
    $message = $admin->updateAdmin();
    if ($message[0] == "") {
        header("location:admin.php");
    } else {
        global $smarty;
        global $_LANG;
        if ($message[0] == 1) {
            $smarty->assign("login_name_error_message", $_LANG['ERROR_USER_MESSAGE']);
        } else {
            if ($message[0] == 2) {
                $smarty->assign("password_error_message", $_LANG['ERROR_PASSWORD_MESSAGE']);
            }
        }
    }
}