CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <?php
- ############################################
- include '../core/dbconfig.php';
- ############################################
- if(isset($_POST['auth_submit']))
- {
- $login = $_POST['login'];
- $password = $_POST['password'];
- $login=mysql_real_escape_string($login);
- $password=mysql_real_escape_string($password);
- $query = "SELECT id, login, password FROM waqs_admins WHERE login ='{$login}' AND password='{$password}' LIMIT 1";
- $sql = mysql_query($query) or die(mysql_error());
- if (mysql_num_rows($sql) == 1)
- {
- include './astyle/login_good.tpl';
- }
- else
- {
- echo 'Неправильное имя или пароль';
- }
- }
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
- <title>WAQS CMS | Админ-панель</title>
- <!-- Стили -->
- <link rel="stylesheet" media="screen" href="./astyle/css/reset.css" />
- <link rel="stylesheet" media="screen" href="./astyle/css/grids.css" />
- <link rel="stylesheet" media="screen" href="./astyle/css/style.css" />
- <link rel="stylesheet" media="screen" href="./astyle/css/jquery.uniform.css" />
- <link rel="stylesheet" media="screen" href="./astyle/css/forms.css" />
- <link rel="stylesheet" media="screen" href="./astyle/css/style1.css" />
- <!-- JavaScript -->
- <script src="./astyle/js/html5.js"></script>
- <script type="text/javascript" src="./astyle/js/selectivizr.js"></script>
- </head>
- <body class="login" style="overflow: hidden;">
- <div class="login-box">
- <section class="portlet login-box-top">
- <header>
- <h2 class="ac">Вход в админ панель</h2>
- </header>
- <section>
- <form id="form" name="avt" class="has-validation" action="index.php" method="post" style="margin-top: 30px">
- <p style="margin-bottom: 30px">
- <input type="text" id="login" class="full" value="" name="login" required="required" placeholder="Имя пользователя" /></p>
- <p style="margin-bottom: 30px">
- <input type="password" id="password" class="full" value="" name="password" required="required" placeholder="Пароль" /></p>
- <footer class="ac">
- <button class="button" type="submit" name="into" value="Вход">Войти</button>
- </footer>
- <br>
- </section>
- </section>
- </div>
- </form>
- </body>
- </html>';
- ?>