Пример #1
0
require_once '../application/controllers/auth.php';
?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Регестрация</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
  </head>

  <body>
    <div style=" padding-top: 40px; padding-bottom: 40px;" class="container">
      <?php 
if (Controller_Auth::isAuthorized() and $_SESSION['group'] != 2) {
    ?>
      <h1>Добро пожаловать, вы уже зарегистрированы!</h1>
      <form class="ajax" method="post" action="ajax">
          <input type="hidden" name="act" value="logout">
          <div class="form-actions">
              <button class="btn btn-large btn-primary" type="submit">Выйти</button>
          </div>
      </form>

      <?php 
} else {
    ?>
      <form class="form-signin ajax" method="post" action="ajax">
        <div class="main-error alert alert-error hide"></div>
        <div class="form-center">
Пример #2
0
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Войти</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>

<body>

<div style="padding-top: 40px; padding-bottom: 40px;" class="container">

    <?php 
if (Controller_Auth::isAuthorized()) {
    ?>
        <h1>Добро пожаловать, вы авторизованы!</h1>
        <form class="ajax" method="post" action="ajax">
            <input type="hidden" name="act" value="logout">
            <div class="form-actions">
                <button class="btn btn-large btn-primary" type="submit">Выйти</button>
            </div>
        </form>
    <?php 
} else {
    ?>
        <form class="form-signin ajax" method="post" action="ajax">
            <div  class="main-error alert alert-error hide"></div>
                <div class="form-center">
                    <h3 class="form-signin-heading">Пожалуйста, авторизуйтесь!</h3>