<?php
include("../ayarlar/konfig.inc.php");
include ("../ayarlar/konfigurasyon.php");
ob_start();
?>
<!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=utf-8" />
<link rel="stylesheet" type="text/css" href="css/yonetici.css" media="screen" />
<title><?php echo $siteadi; ?></title>
</head>
<body style="background:none;">
<div id="tasiyici">
<div id="giris">
<h1>Yönetici Paneli Girişi</h1>
<form action="" method="post" class="frm">
<span>Kullanıcı Adı</span>
<input class="mtn" type="text" name="kadi" tabindex="1" value="" />
<span>Şifre</span>
<input class="mtn" type="password" name="sfr" tabindex="2" value="" />
<input class="sbmt" type="submit" name="submit" value="Giriş" tabindex="3" />
</form>
</div>
<?php
$adres = $_SERVER['PHP_SELF'];
if (isset ($_POST['submit'])):
session_start();
$_SESSION['gsayi'] = 0;
if(empty($_POST['kadi']) || empty($_POST['sfr'])):
echo '<p>Kullanıcı Adı veya Şifre boş bırakılamaz.</p>';
else:
$ad=$_POST['kadi']; $s=sha1($_POST['sfr']);
$sonuc = mysql_query ("select * from yonetici where kadi = '$ad' and sifre = '$s'", $link);
if (mysql_num_rows($sonuc)== 0):
echo '<p>Böyle bir kullanıcı bulunmamaktadır. Tekrar deneyiniz !</p>';
header ("refresh: 3; url=$adres");
else:
$_SESSION['kgiris'] = $_POST['kadi'];
$_SESSION['ksifre'] = $_POST['sfr'];
$_SESSION['gsayi'] = 1;
header ("refresh:0; url=panel.php");
endif;
endif;
endif;
ob_end_flush();
?></div>
</body>
</html>