Esempio n. 1
0
<?php

require 'config/config.php';
require $path . 'controllers/loginController.php';
$controller = new loginController($path);
$controller->loginPage();
Esempio n. 2
0
		<div id="judul">
			HALAMAN LOGIN
		</div>
		<div id="inputan">
			<form method="POST" action="" onSubmit="return validasi(this)">
				<div>
					<input type="text" name="username" class="lg" placeholder="Username" />
				</div>
				<div style="margin-top:10px">
					<input type="password" name="password" class="lg" placeholder="Password" />
				</div>
				<div style="margin-top:10px">
					<input type="submit" name="login" class="btn" value="LOGIN" />
				</div>
			</form>
			<?php 
    include "controller/loginController.php";
    if (@$_POST['login']) {
        $main = new loginController();
        $main->login();
    }
    ?>
		</div>
	</div>
	</div>
</body>
</html>
<?php 
} else {
    header("location:index.php");
}
Esempio n. 3
0
$modulo = $separa[0];
$acao = $separa[1];
$id = $separa[2];
if ($modulo == "") {
    require_once "Controllers/loginController.php";
    $instancia = new loginController();
    $instancia->telaLogin();
    die;
} else {
    if ($acao == "") {
        die("Nenhuma acao definida");
    } else {
        $controlador = $modulo;
    }
}
if ($_SESSION["m80Usuario_nome"] == "" and ($controlador != "login" and $acao != "telaLogin")) {
    echo "<BR>Entrou";
    echo "<BR>" . $_SESSION["usuario_nome"] . "<BR>" . $controlador . "<BR>" . $acao;
    require_once "Controllers/loginController.php";
    $instancia = new loginController();
    $instancia->exibirTelaFalhaAutenticao();
}
$_SESSION["queries"] = "";
require_once "Controllers/" . $controlador . "Controller.php";
eval('$instancia = new ' . $controlador . 'Controller();');
if ($id == "") {
    eval('$instancia->' . $acao . '();');
} else {
    $param = $id;
    eval('$instancia->' . $acao . '(' . $param . ');');
}
<?php

session_start();
require_once '../model/login.php';
$controlador = new loginController();
@($proceso = $_REQUEST['petition']);
switch ($proceso) {
    case "inicioSession":
        $controlador->validalogin($_REQUEST['username'], $_REQUEST['password']);
        break;
    case "unlog":
        $controlador->unlog();
        break;
}
class loginController
{
    public function frmlogin()
    {
        include_once 'view/formularios/login/frmLogin.php';
    }
    public function validalogin()
    {
        $login = new login();
        $username = $_REQUEST['username'];
        $password = $_REQUEST['password'];
        $validar = $login->validacion($username, $password);
        if ($validar == 0) {
            echo "<script>alert('El usuario y contrasena son incorrectas')</script>";
            echo '<meta http-equiv="refresh" content="0; url="/>';
        } elseif ($validar == 1) {
            $informacion = $login->loadUsuario($username);
Esempio n. 5
0
<?php

include "controller/inputController.php";
include "controller/viewController.php";
include "controller/loginController.php";
$input = new inputController();
$view = new viewController();
$login = new loginController();
$page = @$_GET['page'];
$id = @$_GET['id'];
if ($page == '') {
    $input->view();
} else {
    if ($page == 'tambah_item') {
        $input->viewInsert();
    } else {
        if ($page == 'item') {
            $view->viewDetail($id);
        } else {
            if ($page == 'logout') {
                $login->logout();
            } else {
                if ($page == 'view_data') {
                    $input->viewLihat();
                } else {
                    if ($page == 'edit') {
                        $input->viewEdit($id);
                    } else {
                        if ($page == 'delete') {
                            $input->delete($id);
                        } else {
Esempio n. 6
0
<?php

session_start();
require 'core/loader.php';
// $_SESSION['username']='';
$controller = empty($_REQUEST['ctl']) ? 'main' : $_REQUEST['ctl'];
$value = empty($_REQUEST['value']) ? 'no-v' : $_REQUEST['value'];
$username = empty($_GET['username']) ? 'no-u' : $_GET['username'];
$password = empty($_GET['password']) ? 'no-p' : $_GET['password'];
$data = $_REQUEST['listener'];
if ($controller == 'main') {
    if ($username != 'no-u' && $password != 'no-p') {
        loginController::loginCheck($username, md5($password));
    } elseif ($value != 'no-v') {
        contentController::submit($value);
    } elseif ($data != '') {
        require 'core/data.php';
    } else {
        $ctl = $controller . 'Controller';
        $ctl::checkRender();
    }
} else {
    $ctl = $controller . 'Controller';
    $ctl::$controller();
    // loginController::login();
}
Esempio n. 7
0
<html>
<head>
<title>What's your name?</title>
</head>
<body>
<h1>Validating User</h1>
 <?php 
include "..\\..\\Controllers\\loginController.php";
?>
<script type="text\javascript"> alert("Validating User Credantials");</script>
<hr/>
<?php 
$userName = $_REQUEST["userName"];
$password = $_REQUEST["password"];
$gender = $_REQUEST["gender"];
$validator = new loginController();
$userIsValid = $validator->validLogins($userName, $password);
$gtype = $gender == "Male" ? "Boy" : "Girl";
if ($userIsValid) {
    echo "<script type='text/javascript'> alert('Success : Correct LOGIN Credentials');</script>";
    print "<div><span> Welcome to the site " . $userName . " " . $password . " You are a good" . $gtype . " </span></div>";
} else {
    echo "<script type='text/javascript'> alert('Error : Incorrect Credentials');</script>";
    print "Your Login Credentials are invalid, try again";
}
?>
			
			<hr/>
			
	</body>
</html>