merhaba
özel yazılan haber sitemizin kullanıcı bilgileri unuttum nasıl öğrenirim
login.php kodları aşağıda
<?php
session_start();
ob_start();
include("../settings.php");
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Yönetici Paneli</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!--base css styles-->
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/font-awesome/css/font-awesome.min.css">
<!--page specific css styles-->
<!--flaty css styles-->
<link rel="stylesheet" href="css/flaty.css">
<link rel="stylesheet" href="css/flaty-responsive.css">
<link rel="shortcut icon" href="img/favicon.png">
</head>
<body class="login-page">
<?php
if($onemsoft->escape($_POST["Tip"]) == "yonetici" and $_POST['token'] == $_SESSION['token']){
$Kullanici = $onemsoft->escape($_POST['KullaniciAdi']);
$Sor = $onemsoft->get_row("SELECT * FROM yonetici WHERE KullaniciAdi='$Kullanici'");
if($onemsoft->escape($_POST["KullaniciAdi"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen kullanıcı adınızı girin.</div>';
}else{
if($onemsoft->escape($_POST["KullaniciSifre"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen şifrenizi girin.</div>';
}else{
if($onemsoft->escape($_POST["KullaniciMail"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen mail adresinizi girin.</div>';
}else{
if(isset($_POST["KullaniciAdi"]))
{
if (($_POST["KullaniciAdi"] == $Sor->KullaniciAdi) and (md5($_POST["KullaniciSifre"]) == $Sor->KullaniciSifre) and ($_POST["KullaniciMail"] == $Sor->KullaniciMail))
{
$_SESSION["token"] = md5(uniqid(mt_rand(), true));
$_SESSION["Giris"] = "true";
$_SESSION["KullaniciAdi"] = $onemsoft->escape($_POST["KullaniciAdi"]);
$_SESSION["KullaniciSifre"] = $onemsoft->escape($_POST["KullaniciSifre"]);
$_SESSION["AdSoyad"] = $Sor->AdSoyad;
$_SESSION["Id"] = $Sor->Id;
header("Location: index.php?onemsoft=home&token=".$_SESSION["token"]."");
exit;
} else {
$status = '<div class="alert alert-warning">Böyle bir yönetici bulunmuyor.</div>';
}
}
}
}
}
}
?>
<?php
if($onemsoft->escape($_POST["Tip"]) == "yazar" and $_POST['token'] == $_SESSION['token']){
$Kullanici = $_POST['KullaniciAdi'];
$Sor2 = $onemsoft->get_row("SELECT * FROM yazarlar WHERE KullaniciAdi='$Kullanici'");
if($onemsoft->escape($_POST["KullaniciAdi"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen kullanıcı adınızı girin.</div>';
}else{
if($onemsoft->escape($_POST["KullaniciSifre"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen şifrenizi girin.</div>';
}else{
if($onemsoft->escape($_POST["KullaniciMail"]) == "")
{
$status = '<div class="alert alert-warning">Lütfen mail adresinizi girin.</div>';
}else{
if(isset($_POST["KullaniciAdi"]))
{
if (($_POST["KullaniciAdi"] == $Sor2->KullaniciAdi) and (md5($_POST["KullaniciSifre"]) == $Sor2->KullaniciSifre) and ($_POST["KullaniciMail"] == $Sor2->KullaniciMail))
{
$_SESSION["token"] = md5(uniqid(mt_rand(), true));
$_SESSION["Giris"] = "true";
$_SESSION["KullaniciAdi"] = $onemsoft->escape($_POST["KullaniciAdi"]);
$_SESSION["KullaniciSifre"] = $onemsoft->escape($_POST["KullaniciSifre"]);
$_SESSION["Tip"] = "yazar";
header("Location: index.php?onemsoft=articles&token=".$_SESSION["token"]."");
exit;
} else {
$status = '<div class="alert alert-warning">Lütfen bilgilerinizi kontrol edin.</div>';
}
}
}
}
}
}
?>
<!-- BEGIN Main Content -->
<div class="login-wrapper">
<!-- BEGIN Login Form -->
<form id="form-login" method="post">
<input type="hidden" name="token" value="<?php echo $_SESSION['token'];?>" />
<h3>Yönetim Paneli Giriş</h3>
<?php
if(isset($status)){
echo $status;
}
?>
<hr/>
<div class="form-group">
<div class="controls">
<input type="text" name="KullaniciAdi" value="<?php echo @$_POST[KullaniciAdi];?>" placeholder="Kullanıcı Adı" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="controls">
<input type="password" name="KullaniciSifre" value="<?php echo @$_POST[KullaniciSifre];?>" placeholder="Şifre" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="controls">
<input type="text" name="KullaniciMail" value="<?php echo @$_POST[KullaniciMail];?>" placeholder="E-Mail Adresi" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="controls">
<label class="radio-inline">
<input type="radio" value="yonetici" name="Tip" checked=""> Yönetici Girişi
</label>
<label class="radio-inline">
<input type="radio" value="yazar" name="Tip"> Yazar Girişi
</label>
</div>
</div>
<div class="form-group">
<div class="controls">
<button type="submit" class="btn btn-primary form-control">Giriş Yap</button>
</div>
</div>
<hr/>
<p class="clearfix">
<a href="#" class="goto-forgot pull-left">Şifremi Unuttum</a>
</p>
</form>
<!-- END Login Form -->
<!-- BEGIN Forgot Password Form -->
<form id="form-forgot" action="../index.html" method="get" style="display:none">
<h3>Şifremi Unuttum</h3>
<hr/>
<div class="form-group">
<div class="controls">
<input type="text" placeholder="E-Mail Adresi" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="controls">
<button type="submit" class="btn btn-primary form-control">Gönder</button>
</div>
</div>
<hr/>
<p class="clearfix">
<a href="#" class="goto-login pull-left">← Giriş ekranına dön</a>
</p>
</form>
<!-- END Forgot Password Form -->
<!-- BEGIN Register Form -->
</div>
<!-- END Main Content -->
<!--basic scripts-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/jquery/jquery-2.1.1.min.js"><\/script>')</script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
function goToForm(form)
{
$('.login-wrapper > form:visible').fadeOut(500, function(){
$('#form-' + form).fadeIn(500);
});
}
$(function() {
$('.goto-login').click(function(){
goToForm('login');
});
$('.goto-forgot').click(function(){
goToForm('forgot');
});
});
</script>
</body>
</html>