This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if(! defined('BASEPATH') ){ exit('Unable to view file.'); } | |
$mesaj = '<div class="message info">Connect to Admin Panel</div>'; | |
if(isset($_POST['logare'])) { | |
$name = $db->EscapeString($_POST['login']); | |
$pass = $db->EscapeString($_POST['pass']); | |
$sql = $db->Query("SELECT id FROM `admins` WHERE `login`='".$name."' AND `pass`=MD5('".$pass."')"); | |
$num = $db->GetNumRows($sql); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// старт сессии | |
session_start(); | |
// если были отправлены данные | |
if(!empty($_POST)){ | |
// Сравниваем введенную капчу с тем, что храниться в сессии | |
if($_SESSION['capcha'] == $_POST['capcha']){ | |
echo 'Капча верная'; | |
}else { | |
echo 'Капча не верная'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once "recaptchalib.php"; | |
?> | |
<? | |
if(! defined('BASEPATH') ){ exit('Unable to view file.'); } | |
$mesaj = '<div class="message info">Connect to Admin Panel</div>'; | |
if(isset($_POST['logare'])) { | |
$name = $db->EscapeString($_POST['login']); |