<div id="panel" style="display: none;"  align="center">
<?php if(isset($_SESSION['yazar'])){ $kulID = $_SESSION['yazar']; $ozu = mysql_query("select * from uyeler where id='$kulID'"); while($kamil = mysql_fetch_array($ozu)){ ?>

<div align="center"><b><?php echo $kamil['adsoyad']; ?>, hoşgeldin.</b>&nbsp;&nbsp;-&nbsp;&nbsp; <a href="newspost.php">Yazı Gönder</a> &nbsp;&nbsp;-&nbsp;&nbsp; <?php if($print['seourl']==".php"){ ?> <a href="/djpanel.php">İstekler</a> <?php }elseif($print['seourl']==".html"){ ?> <a href="/djpanel.php">İstekler</a> <?php } ?> &nbsp;&nbsp;-&nbsp;&nbsp; <a href="sessionout.php">Çıkış</a></div>


<?php
}

}else{ 

if(isset($_POST['login'])){

$mail = $_POST['mail'];
$password = $_POST['password'];

$parola = md5($password);

if($mail==""||$password==""){

	echo '<script language=javascript>alert(\'Alanları boş geçemezsiniz.\')</script>'; }else{

$xlb = mysql_query("SELECT * FROM uyeler WHERE email='$mail'"); if(mysql_num_rows($xlb)=="0"){

	echo '<script language=javascript>alert(\'Girdiğiniz bilgiler hatalı.\')</script>'; }else{
		
while ($row = mysql_fetch_assoc($xlb)){

 $dbusername = $row['email'];
 $dbpassword = $row['password'];
 $yID = $row['id'];
 
 if($mail==$dbusername&&$parola==$dbpassword){

	$_SESSION['yazar']="$yID";
	echo '<script language=javascript>alert(\'Giriş Yapıldı.\')</script>';
	echo '<meta http-equiv="refresh" content="0">'; 
	
}else{

	echo '<script language=javascript>alert(\'E-Mail Adresi yada Şifre Hatalı!\')</script>';
	
 } } } } } ?>
  <p><form method="post"> Yayıncı Girişi :  <input style="background: #151515;
    border: 2px solid #313030;
    text-transform: lowercase;
    padding-left: 2px;
    padding-right: 2px;
    margin-right: 3px;"type="text" name="mail" onclick="if(this.value=='E-Mail'){this.value=''}" onblur="if(this.value==''){this.value='E-Mail'}" value="E-Mail" /> 
  <input style="background: #151515;
    border: 2px solid #313030;
    text-transform: lowercase;
    padding-left: 2px;
    padding-right: 2px;
    margin-right: 3px;" type="password" name="password" onclick="if(this.value=='Şifre'){this.value=''}" onblur="if(this.value==''){this.value='Şifre'}" value="Şifre" />
  <input style="background: #1D8D54;
    color: whitesmoke;
    border: none;
    padding-top: 2px;
    padding-bottom: 2px;
    border-radius: 2px;" type="submit" name="login" value="Giriş Yap" /> </form></p>
  <?php } ?>
</div>
