예제 #1
0
 public function testLangSwitch()
 {
     if ($_SESSION['LANG'] == 'french') {
         langSwitch();
         $this->assertEquals('english', $_SESSION['LANG']);
     } else {
         langSwitch();
         $this->assertEquals('french', $_SESSION['LANG']);
     }
 }
예제 #2
0
        } else {
            if (isset($_POST['return'])) {
                unset($_POST['return']);
                $_SESSION['PAGENAME'] = 'AM-VS TaskManager';
                $_SESSION['PAGE'] = 'main.php';
            }
        }
    }
    //Locks on the login page
} else {
    $_SESSION['PAGENAME'] = 'AM-VS Login';
    $_SESSION['PAGE'] = 'signin.php';
}
//Language switch
if (isset($_POST['otherLang'])) {
    langSwitch();
    unset($_POST['otherLang']);
}
//Cookie remember
if (isset($_SESSION['AUTH']) && $_SESSION['AUTH'] == 1 && isset($_POST['remember'])) {
    setcookie('NAME', $_POST['inputUser'], time() + 10);
}
//Disconnection handler
if (isset($_POST['disconnect'])) {
    session_destroy();
    header("Refresh:0");
    exit;
}
//Refresher
if (isset($_POST['refresh'])) {
    unset($_POST['refresh']);