• 22-09-2007, 13:06:40
    #1
    merhaba ,elimdeki scriptte yönetim sayfasına
    (index.php) erişmek icin giris.php de k.adı ve şifreyi girmek zorundayım.aşağıda vereceğim giris.php kodundaki nereleri iptal yada değiştirerek index.php ye yani yönetime direk girebilirim.Teşekkürler

    giris.php kodları

    <?
    include "../ayar.php";
    if($dd == "giris"){
    session_start();
    
    
    $tablo = "select * from users where login='$kullaniciadi' and password='$sifre'";
    
    $sorgu = mysql_query($tablo);
    if (mysql_num_rows($sorgu) < 1 ) {
    
    Header("Location: index.php");
    }else{
    $msql_sifre = @mysql_result($sorgu,0,"login");
    $msql_password = @mysql_result($sorgu,0,"password");
    
    $msql_id = @mysql_result($sorgu,0,"id");
    $msql_durum = @mysql_result($sorgu,0,"status");
    
    if($msql_durum != "1"){
    session_register("msql_sifre");
    session_register("msql_password");
    session_register("msql_id");
    session_register("msql_durum");
    }
    
    $git = $HTTP_SERVER_VARS["HTTP_REFERER"];
    
    
    Header("Location: index.php");
    
    }
    }else{
    ?>
    
    <HTML><HEAD><TITLE><?=$title;?> ::. <?=$dil[123];?></TITLE>
    <META http-equiv=Content-Type content="text/html; charset=ISO-8859-9">
    <META http-equiv=Content-Type content="text/html; charset=windows-1254">
    <META http-equiv=Content-Language content=tr>
    <LINK href="img/style.css" type=text/css rel=stylesheet>
    <style type="text/css">
    <!--
    .style5 {font-size: 9px}
    .style7 {color: #FFFFFF}
    .style8 {font-family: Verdana, Arial, Helvetica, sans-serif}
    -->
    </style>
    </HEAD>
    <BODY leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
    <form name="form1" method="post" action="giris.php">
      <div align="center"><span class="style5"><br>
          <span class="style8"><?=$dil[124];?><br>
      </div>
      <table width="287" border="0" align="center">
        <tr>
          <th width="74" class="style5" scope="row"><div align="left" class="style8"><?=$dil[91];?></div></th>
          <td width="203">:
          <input name="kullaniciadi" type="text" class="small" id="kullaniciadi"></td>
        </tr>
        <tr>
          <th class="style5" scope="row"><div align="left" class="style8"><?=$dil[93];?></div></th>
          <td>:
          <input name="sifre" type="password" class="small" id="sifre"></td>
        </tr>
        <tr>
          <th class="style5" scope="row">&nbsp;</th>
          <td><div align="center">
            <input type="submit" name="Submit" value="       <?=$dil[171];?>       ">
            <span class="style7">-
            <input name="dd" type="hidden" id="dd" value="giris">
          </span></div></td>
        </tr>
      </table>
    </form>
    </BODY></HTML><?}?>
    Buda index.php

    <?
    session_start();
    include "../ayar.php";
    
    $tablo = "select * from users where login='$msql_sifre' and password='$msql_password' and status='$msql_durum'";
    $sorgu = mysql_query($tablo);
    if (mysql_num_rows($sorgu) < 1 ) {
    Header("Location: giris.php");
    exit();
    }
    
    
    if(($msql_durum != "9") and ($msql_durum != "5") and ($msql_durum != "4") and ($msql_durum != "3") and ($msql_durum != "7")){
    Header("Location: giris.php");
    }
    
    if($msql_sifre == ""){
    Header("Location: giris.php");
    }
    ?>
    <html>
    <head>
    <title><?=$title;?> ::. <?=$dil[123];?></title>
    <META http-equiv=Content-Type content="text/html; charset=ISO-8859-9">
    <META http-equiv=Content-Type content="text/html; charset=windows-1254">
    <META http-equiv=Content-Language content=tr>
    <style type="text/css">
    <!--
    .style1 {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 10px;
    }
    -->
    </style>
    </head>
    
    <body class="style1">
    <div align="center">
      <p><?=$dil[124];?> (<a href="cik.php"><?=$dil[247];?></a>) </p>
      <p><br>
      </p>
    </div>
    <?if($msql_durum == "7"){?>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th height="25" scope="row"><div align="center"><a href="onaylayazi.php"><?=$dil[248];?> (<?echo @mysql_num_rows(@mysql_query("select id from a_articles where status = 2"));?>)</a></div></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><div align="center"><a href="yorum.php"><?=$dil[249];?> (<?echo @mysql_num_rows(@mysql_query("select id from comments where status = 2"));?>)</a></div></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><div align="center">
            <hr>
        </div></th>
      </tr>
    </table>
    <br>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th width="49%" height="25" scope="row"><a href="haber.php"><?=$dil[250];?></a> </th>
        <th width="51%" height="25" scope="row"><a href="banner.php"><?=$dil[251];?> </a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="yazi.php"><?=$dil[252];?> </a></th>
        <th height="25" scope="row"><a href="anket.php"><?=$dil[253];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="uyeler.php"><?=$dil[254];?></a></th>
        <th height="25" scope="row"><a href="imaj.php"><?=$dil[255];?> </a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="sifre.php"><?=$dil[256];?></a></th>
        <th height="25" scope="row"><a href="arsiv.php"><?=$dil[257];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="kategori.php"><?=$dil[258];?> </a></th>
        <th height="25" scope="row"><a href="editor.php"><?=$dil[259];?> </a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="mesaj.php"><?=$dil[365];?></a></th>
        <th height="25" scope="row"><a href="linkler.php"><?=$dil[368];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="kaynak.php"><?=$dil[387];?></a></th>
        <th height="25" scope="row"><a href="yorumlar.php"><?=$dil[393];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href = "#" onClick="javascript:if(confirm('<?=$dil[395];?>'))window.location='reset.php'"><?=$dil[396];?></a></th>
        <th height="25" scope="row"><!--<a href="backup.php">BackUp--><a href="editor_ayar.php">Editör Ayarları </a></a></th>
      </tr>
    
    </table>
    <?}?>
    <?if($msql_durum == "9"){?>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th height="25" scope="row"><div align="center"><a href="onaylayazi.php">
          <?=$dil[248];?>
    (<?echo @mysql_num_rows(@mysql_query("select id from a_articles where status = 2"));?>)</a></div></th>
      </tr>
        <tr class="style1">
        <th height="25" scope="row"><div align="center"><a href="yorum.php">
          <?=$dil[249];?>
    (<?echo @mysql_num_rows(@mysql_query("select id from comments where status = 2"));?>)</a></div></th>
      </tr>
        <tr class="style1">
        <th height="25" scope="row"><div align="center">
          <hr></div></th>
      </tr>
    </table>
    <br>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th width="49%" height="25" scope="row"><a href="haber.php"><?=$dil[250];?></a> </th>
        <th width="51%" height="25" scope="row"><a href="anket.php"><?=$dil[253];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="yazi.php"><?=$dil[252];?> </a></th>
        <th height="25" scope="row"><a href="imaj.php"><?=$dil[255];?></a></th>
      </tr>
        <tr class="style1">
        <th height="25" scope="row"><a href="uyeler.php"><?=$dil[254];?></a></th>
        <th height="25" scope="row"><a href="arsiv.php"><?=$dil[257];?></a></th>
      </tr>
      <tr class="style1">
        <th height="25" scope="row"><a href="sifre.php"><?=$dil[256];?></a></th>
        <th height="25" scope="row"><a href="yorumlar.php"><?=$dil[393];?></a>&nbsp;</th>
      </tr>
      <tr class="style1">
        <th height="25" colspan="2" scope="row"><a href = "#" onClick="javascript:if(confirm('<?=$dil[395];?>'))window.location='reset.php'"><?=$dil[396];?></a></th>
      </tr>
    </table>
    <?}?>
    <?if($msql_durum == "5"){?>
    <div align="center"><br>
      <img src="../pictures/authors/<?=$msql_id;?>_2.gif" width="468" height="60">
      <br>
      <br>
      <br>
      <?=$dil[260];?>: <span class="black11b">
      <?
    // bu kodu alIp mesela tarih.inc olarak kaydedin ve include edin bu $ekilde
    // ugra$madan tarihi yazdIrIrsInIz.
    
    echo "<font size=1 face=verdana>";
     $a=date("F");
     $b=date("l");
     $c=date("d");
     $d=date("Y");
     echo "$c ";
     if($a=='January')
     { echo "Ocak ";} else
     if($a=='February')
     { echo "Şubat ";} else
     if($a=='March')
     { echo "Mart ";} else
     if($a=='April')
     { echo "Nisan ";} else
     if($a=='May')
     { echo "Mayıs ";} else
     if($a=='June')
     { echo "Haziran ";} else
     if($a=='July')
     { echo "Temmuz ";} else
     if($a=='August')
     { echo "A?ustos ";} else
     if($a=='September')
     { echo "Eylül ";} else
     if($a=='October')
     { echo "Ekim ";} else
     if($a=='November')
     { echo "Kasım ";} else
     if($a=='December')
     { echo "Aralık ";}
     echo "$d";
    
     if($b=='Monday')
     { echo " Pazartesi";} else
     if($b=='Tuesday')
     { echo " Saly";} else
     if($b=='Wednesday')
     { echo " Çar?amba";} else
     if($b=='Thursday')
     { echo " Per?embe";} else
     if($b=='Friday')
     { echo " Cuma";} else
     if($b=='Saturday')
     { echo " Cumartesi";} else
     if($b=='Sunday')
     { echo " Pazar";}
    ?>
      </span><br>
    </div>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th width="49%" height="25" scope="row"><a href="yazi.php"><?=$dil[252];?></a> </th>
        <th width="51%" height="25" scope="row"><a href="sifre.php"><?=$dil[261];?> </a></th>
      </tr>
    </table>
    <?}?>
    <?if($msql_durum == "4"){?>
    <br>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th width="49%" height="25" scope="row"><a href="haber.php"><?=$dil[250];?></a> </th>
        <th width="51%" height="25" scope="row"><a href="sifre.php"><?=$dil[261];?> </a></th>
      </tr>
    </table>
    <?}?>
    <?if($msql_durum == "3"){?>
    <br>
    <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="style1">
        <th width="49%" height="25" scope="row"><a href="banner.php"><?=$dil[251];?> </a></th>
        <th width="51%" height="25" scope="row"><a href="sifre.php"><?=$dil[261];?> </a></th>
      </tr>
    </table>
    <?}?>
    <p>&nbsp;</p>
    </body>
    </html>
  • 22-09-2007, 14:00:49
    #2
    Üyeliği durduruldu
    Sifresizmi Girmek istiyorsun ?
  • 22-09-2007, 14:12:49
    #3
    evet,şifre olayını başka bir şekilde halledeceğim.

    teşekkürler
  • 22-09-2007, 14:19:09
    #4
    Üyeliği durduruldu
    $msql_sifre = @mysql_result($sorgu,0,"login");
    $msql_password = @mysql_result($sorgu,0,"password");


    bunları kaldırmayı denermisin

    $tablo = "select * from users where login='$kullaniciadi' and password='$sifre'";
    olmazsa üsttekini kaldırmayı dene olur inş

    *yedek almayı unutma.
  • 22-09-2007, 14:21:43
    #5
    Üyeliği durduruldu
    yanlış kodu gosteriyorsun direk index.php yi yansıtman lazım. bu sanırsam giris.php
  • 22-09-2007, 14:26:17
    #6
    birinci satıra session_start(); fonksiyonunu koymayı denermisin?

    <?
    session_start();
    include "../ayar.php";
    if(
    $dd == "giris"
    ){
  • 22-09-2007, 14:28:00
    #7
    index.php kodları ekledim.
    Lonely denedim olmadı.
    Grafix denedim olmadı.

    tek isteğim index.php ye direk girmek istiyorum.
  • 22-09-2007, 15:33:37
    #8
    Üyeliği durduruldu
    $tablo = "select * from users where login='$msql_sifre' and password='$msql_password' and status='$msql_durum'";
    $sorgu = mysql_query($tablo);
    if (mysql_num_rows($sorgu) < 1 ) {
    Header("Location: giris.php");
    exit();
    }
    bunu sil tam üstüne
    $msql_durum = 9;
    yaz.
    Burada = 9; olan bölüm 9 nolu yetki demek orada farklı yetkiler var mesela
    9, 7, 5, 4

    hangi yetkiyi almak istiyorsan onu yazacaksın.
  • 22-09-2007, 15:44:07
    #9
    yazdıklarını aynen yaptım ve durum olarakta 9 ve 1 i denedim.index.php tıklanınca giris.php ye gidiyor.