Пример #1
0
<?php

require_once 'classes/authorization.class.php';
$user = $_POST['username'];
$password = $_POST['password'];
$ext = $_POST['ext'];
$login = new Authorization();
$login->set_ext($ext);
$login->set_username($user);
$login->set_password($password);
$check = $login->checklogin();
if ($check) {
    $login->ip();
    $login->savelogin();
    $login->expire(36000);
    echo '<meta http-equiv=refresh content="0; URL=index.php">';
} else {
    ?>
		<html>
			<head>
				<meta charset="utf-8">
				<title>ავტორიზაცია</title>
				<link rel="stylesheet" type="text/css" href="media/css/login/style.css" />
			</head>
			<body>
				<div class="container">
					<section id="content">
						<form action="" method="post">
							<h1>ავტორიზაცია</h1>
							<div>
								<input name="username" type="text" placeholder="მომხმარებელი" required="" id="username" autocomplete="off"/>