• 24-07-2009, 19:24:06
    #1
    Üyeliği durduruldu
    <html>
    <head>
    <meta http-equiv="Content-Language" content="tr">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1254" charset="Windows-1251">
    <link href="style2.css" type="text/css" rel="stylesheet">
    <link href="img/center00.css" rel="stylesheet" type="text/css" />
    <title>Server Status</title>
    <center>
    <?php
         function l2j_encrypt($password) 
    	    {
    		    return base64_encode(pack("H*", sha1(utf8_encode($password))));
    	    }
             if(isset($_POST['odeslano']) && $_POST['odeslano'] == 1)
              {
    require_once ("ayar.php");
      $link = mysql_connect($L2J_config['mysql_host'], $L2J_config['mysql_login'], $L2J_config['mysql_password']); 
      if (!$link)
        die("Couldn't connect to MySQL");
      @mysql_select_db($L2J_config['mysql_db'], $link)
        or die ('Error '.mysql_errno().': '.mysql_error());
                mysql_connect($L2J_config['mysql_host'], $L2J_config['mysql_login'], $L2J_config['mysql_password']) or die("cannot connect to mysql server : ".mysql_error());
                mysql_select_db($L2J_config['mysql_db']);
                if($_POST['heslo'] == $_POST['heslo_2'])
                 {
                   if($_POST['email'] != "")
                    {
                    $username = mysql_real_escape_string($_POST['jmeno']);
                    $heslo = l2j_encrypt($_POST['heslo']);
                    $email = mysql_real_escape_string($_POST['email']);
                    mysql_query("INSERT INTO `accounts` (`login`,`password`,`lastactive`,`accessLevel`,`lastIP`,`lastServer`,`mail`,`created_time`) VALUES".
                                 " ('$username','$heslo', '0', '0', '127.0.0.1', '1', '$email', NOW())") or die("Account Id Alredy Using ".mysql_error());
       @session_start();
          if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) { 
          if(mysql_affected_rows() > 0)
          unset($_SESSION['security_code']);
        echo 'Registration successfully. Thank You "'.$_POST['jmeno'].'"';
       } else {
          echo 'Sorry, you have provided an invalid security code';
       }
                     }
                    else
                      echo "You must type email"; 
                 }
                 else
                   echo "written passwords dont match";
              }
             else
              {
         ?><table>
        <form method="POST" action="reg.php">
        <input type=hidden value=1 name=odeslano>  
        <tr><td><font color="#F7BF4D"><b>Account ID </b></font> </td> <td>
    		<font color="#F7BF4D"><input type="text" name="jmeno" size="18"> </font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Password </b></font> </td> <td>
    		<font color="#F7BF4D"><input type="password" name="heslo"size="18"></font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Password Again</b> </font> </td> <td>
    		<font color="#F7BF4D"><input type="password" name="heslo_2" size="18"></font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Your Email</b></font></td> <td>
    		<font color="#F7BF4D"><input type=text name="email" size="18"></font></td></tr>
        <tr><td colspan=2> 
    <p align="center"><font color="#F7BF4D">
            <img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /></font><tr><td colspan=2>
    		<p align="center"><font color="#F7BF4D">
    		<label for="security_code"><b>Security Code:</b> </label><input id="security_code" name="security_code" type="text" /><br />
    		<br>
    		<input type="submit" name="submit" value="Register" />
    		</font> </td> </tr>
        </form>
        </table> 
         <?php 
              }
         ?><br>
         <br>
         <center><b><a href="change.php"><font color="#F7BF4D">Change My 
    		Password</font></a></b></center>
       </center>  
       </center>  
    <h4>&nbsp;<center><img src="http://www.xxxx.com/img/logo.gif"></center></p>
    </html>
    Fazla PhP Bilgim yok fakat register yerine captcha eklemek istiyorum. Boyle Yaptım Fakat Guvenlik Kodu Yanlış Olsa Bile Uye Kaydı Gerçekleşiyor.
    Nereye Duzeltmem Gerekli_?
    Yardımcı Olan Arkadaslara Tşk.
  • 24-07-2009, 19:41:32
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    <html>
    <head>
    <meta http-equiv="Content-Language" content="tr">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1254" charset="Windows-1251">
    <link href="style2.css" type="text/css" rel="stylesheet">
    <link href="img/center00.css" rel="stylesheet" type="text/css" />
    <title>Server Status</title>
    <center>
    <?php
         function l2j_encrypt($password) 
            {
                return base64_encode(pack("H*", sha1(utf8_encode($password))));
            }
             if(isset($_POST['odeslano']) && $_POST['odeslano'] == 1)
              {
    require_once ("ayar.php");
      $link = mysql_connect($L2J_config['mysql_host'], $L2J_config['mysql_login'], $L2J_config['mysql_password']); 
      if (!$link)
        die("Couldn't connect to MySQL");
      @mysql_select_db($L2J_config['mysql_db'], $link)
        or die ('Error '.mysql_errno().': '.mysql_error());
                mysql_connect($L2J_config['mysql_host'], $L2J_config['mysql_login'], $L2J_config['mysql_password']) or die("cannot connect to mysql server : ".mysql_error());
                mysql_select_db($L2J_config['mysql_db']);
                if($_POST['heslo'] == $_POST['heslo_2'])
                 {
                   if($_POST['email'] != "")
                    {
                    $username = mysql_real_escape_string($_POST['jmeno']);
                    $heslo = l2j_encrypt($_POST['heslo']);
                    $email = mysql_real_escape_string($_POST['email']);
    
       @session_start();
          if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) { 
          if(mysql_affected_rows() > 0)
                         mysql_query("INSERT INTO `accounts` (`login`,`password`,`lastactive`,`accessLevel`,`lastIP`,`lastServer`,`mail`,`created_time`) VALUES".
                                 " ('$username','$heslo', '0', '0', '127.0.0.1', '1', '$email', NOW())") or die("Account Id Alredy Using ".mysql_error());
        echo 'Registration successfully. Thank You "'.$_POST['jmeno'].'"';
       } else {
          echo 'Sorry, you have provided an invalid security code';
       }
                     }
                    else
                      echo "You must type email"; 
                 }
                 else
                   echo "written passwords dont match";
              }
             else
              {
         ?><table>
        <form method="POST" action="reg.php">
        <input type=hidden value=1 name=odeslano>  
        <tr><td><font color="#F7BF4D"><b>Account ID </b></font> </td> <td>
            <font color="#F7BF4D"><input type="text" name="jmeno" size="18"> </font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Password </b></font> </td> <td>
            <font color="#F7BF4D"><input type="password" name="heslo"size="18"></font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Password Again</b> </font> </td> <td>
            <font color="#F7BF4D"><input type="password" name="heslo_2" size="18"></font> </td> </tr>
        <tr><td><font color="#F7BF4D"><b>Your Email</b></font></td> <td>
            <font color="#F7BF4D"><input type=text name="email" size="18"></font></td></tr>
        <tr><td colspan=2> 
    <p align="center"><font color="#F7BF4D">
            <img src="CaptchaSecurityImages.php?width=100&height=40&characters=5" /></font><tr><td colspan=2>
            <p align="center"><font color="#F7BF4D">
            <label for="security_code"><b>Security Code:</b> </label><input id="security_code" name="security_code" type="text" /><br />
            <br>
            <input type="submit" name="submit" value="Register" />
            </font> </td> </tr>
        </form>
        </table> 
         <?php 
              }
         ?><br>
         <br>
         <center><b><a href="change.php"><font color="#F7BF4D">Change My 
            Password</font></a></b></center>
       </center>  
       </center>  
    <h4>&nbsp;<center><img src="http://www.xxxx.com/img/logo.gif"></center></p>
    </html>
    böyle dene birde
  • 24-07-2009, 19:47:25
    #3
    Üyeliği durduruldu
    Yardımınız için Teşekkurler Fakat Bu Sefer Hiçbir Şekilde Üye Kaydı Gerçekleşmiyor.
  • 24-07-2009, 20:14:58
    #4
    Üyeliği durduruldu
    Tamam Duzelttim. Teşekkurler. Rep'ini Verdim
  • 24-07-2009, 20:22:18
    #5
    Üyeliği durduruldu
    Sizden Bir Konuda Daha Yardım Almak istiyorum. Bu Register Script'inde Kullanıcı Adı Ve Şifrede Türkçe Karakter Kullanılmasın. Bunu Nasıl Engelleyebilirim Ornek: ü,ğ,ç,ş Gibi Karakterler Kullanılmasın. Yada Yazıldıgında Otomatık ğ g Olsun. Gibi.
  • 24-07-2009, 21:16:06
    #6
    if ( !eregi( "[^öçşiğüİı]", $_POST['jmeno'] ) )
    {
    echo "Türkçe Karakter Kullanamazsınız";
    }
    Böyle Birşey Eklersen olur


    Buda otomatik degişme.
    function trx($q) {
    $q = str_replace("ç","c",$q);
    $q = str_replace("ş","s",$q);
    return $q;
    }

    trx($_POST['jmeno']) buda kullanımı.
  • 24-07-2009, 23:14:09
    #7
    Üyeliği durduruldu
    FoReVeR adlı üyeden alıntı: mesajı görüntüle
    if ( !eregi( "[^öçşiğüİı]", $_POST['jmeno'] ) )
    {
    echo "Türkçe Karakter Kullanamazsınız";
    }
    Böyle Birşey Eklersen olur
    Buda otomatik degişme.
    function trx($q) {
    $q = str_replace("ç","c",$q);
    $q = str_replace("ş","s",$q);
    return $q;
    }
    trx($_POST['jmeno']) buda kullanımı.
    OFF Sana Nekadar Teşekkur Etsem Az Ya