Xin nhờ code lại để sử dụng với pass có md5
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 3 của 3
  1. #1
    Thành Viên
    Ngày tham gia
    Jun 2009
    Bài viết
    19
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Xin nhờ code lại để sử dụng với pass có md5

    Bạn nào có thể giúp mình code lại cái này (file đính kèm) vì hiện nó chỉ chạy với password là NO MD5, nhưng db của mình lại dùng md5 (ở chổ Password. Hiện mình đang sử dụng web của BCS) - Cám ơn nhiều:

    - Dĩ nhiên nếu được BCS giúp thì tốt quá !!!

    <?
    $conection = mssql_connect("ServerName","UerName","Password") or die("SQL connection fail, verify your connection config.");
    mssql_select_db("MuOnline",$conection);
    function anti_injection( $mensaje )
    {
    $banlist = array
    ("insert","select","drop","update","delete","disti nct","having","truncate","replace",
    "handler","like","procedure","limit","order by","group by","<",">","/","'"," ","=","*",",","-");
    if ( eregi ( "[a-zA-Z0-9]+", $mensaje ) )
    {
    $mensaje = trim ( str_replace ( $banlist, '', strtolower ( $mensaje ) ) );
    }
    else
    {
    $mensaje = NULL;
    }
    return $mensaje;
    }
    if(trim($HTTP_POST_VARS["id"]) != "" && trim($HTTP_POST_VARS["clave"]) != "")
    {
    $sql = "SELECT memb___id FROM MEMB_INFO WHERE memb___id='".anti_injection($HTTP_POST_VARS["id"])."' and memb__pwd='".anti_injection($HTTP_POST_VARS["clave"])."'";
    $result = mssql_query($sql);
    if($row = mssql_fetch_array($result))
    {
    $sqlexiste = "SELECT AccountID FROM EXTWAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'";
    $resultexiste = mssql_query($sqlexiste);
    if($rowexiste = mssql_fetch_array($resultexiste))
    {
    $sqlchar = mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='".anti_injection($HTTP_POST_VARS["id"])."'");
    $rschar = mssql_fetch_array($sqlchar);
    if(($rschar['ConnectStat'])==0)
    {
    $sqlbaul = mssql_query("SELECT number FROM WAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'");
    $rsbaul = mssql_fetch_array($sqlbaul);
    if(($rsbaul['number'])==1)
    {
    /* If I want my original vault */
    /* Save 2nd vault in extwarehouse table */
    $sql ="update extwarehouse set items=(select items from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    $sql ="update extwarehouse set money=(select money from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    /* Update main vault to original content */
    $sql ="update warehouse set items=(select items from charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    $sql ="update warehouse set money=(select money from charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    /* Set vault number */
    $sql ="update warehouse set number=0 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    /* Clean main vault last data */
    $sql ="delete charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    }
    if(($rsbaul['number'])==0)
    {
    /* If I want 2nd vault */
    /* Save main vault data into charbaul table */
    $sql ="insert into charbaul(accountid, items, money)(select accountid, items, money from warehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."')";
    mssql_query($sql);
    /* Update main vault to 2nd vault data */
    $sql ="update warehouse set items=(select items from extwarehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    $sql ="update warehouse set money=(select money from extwarehouse where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    /* Set vault number */
    $sql ="update warehouse set number=1 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
    mssql_query($sql);
    }
    echo "-".anti_injection($HTTP_POST_VARS["id"])." vault changed successfully !!!";
    }
    else
    {
    echo "You must be off line, vault change not proceed !!!";
    }
    }
    else
    {
    echo "You don't have extravault, contact your administrator !!!";
    }
    }
    else
    {
    echo "Login fail !!!";
    }
    mssql_free_result($result);
    }
    else
    {
    echo "You must to complete all field to login ok !!!";
    }
    mssql_close();
    ?>
    -----------------------------------------------------------------------------
    Khách viếng thăm hãy cùng chiencpt xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #2
    Thành Viên
    Ngày tham gia
    May 2010
    Bài viết
    358
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Ðề: Xin nhờ code lại để sử dụng với pass có md5

    Đính kèm File kiểu này thì bố thằng tây mà code được.

    Không Upload được nó vào đâu thì cũng phải đưa nó vào thẻ PHP chứ.
    Khách viếng thăm hãy cùng MrAaa xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. #3
    Thành Viên
    Ngày tham gia
    May 2010
    Bài viết
    358
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Ðề: Xin nhờ code lại để sử dụng với pass có md5

    PHP Code:
    <?
    $conection 
    mssql_connect("ServerName","UerName","Password") or die("SQL connection fail, verify your connection config.");
    mssql_select_db("MuOnline",$conection);
    function 
    anti_injection$mensaje )
    {
    $banlist = array
    (
    "insert","select","drop","update","delete","disti  nct","having","truncate","replace",
    "handler","like","procedure","limit","order by","group by","<",">","/","'"," ","=","*",",","-");
    if ( 
    eregi "[a-zA-Z0-9]+"$mensaje ) )
    {
    $mensaje trim str_replace $banlist''strtolower $mensaje ) ) );
    }
    else
    {
    $mensaje NULL;
    }
    return 
    $mensaje;
    }
    if(
    trim($HTTP_POST_VARS["id"]) != "" && trim($HTTP_POST_VARS["clave"]) != "")
    {
    $sql "SELECT memb___id FROM MEMB_INFO WHERE  memb___id='".anti_injection($HTTP_POST_VARS["id"])."' and  memb__pwd='".anti_injection($HTTP_POST_VARS["clave"])."'";
    $result mssql_query($sql);
    if(
    $row mssql_fetch_array($result))
    {
      
    $sqlexiste "SELECT AccountID FROM EXTWAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'";
      
    $resultexiste mssql_query($sqlexiste);
      if(
    $rowexiste mssql_fetch_array($resultexiste))
      {
       
    $sqlchar mssql_query("SELECT ConnectStat FROM MEMB_STAT WHERE memb___id='".anti_injection($HTTP_POST_VARS["id"])."'");
       
    $rschar mssql_fetch_array($sqlchar);
       if((
    $rschar['ConnectStat'])==0)
       {
        
    $sqlbaul mssql_query("SELECT number FROM WAREHOUSE WHERE AccountID='".anti_injection($HTTP_POST_VARS["id"])."'");
        
    $rsbaul mssql_fetch_array($sqlbaul);
        if((
    $rsbaul['number'])==1)
        {
         
    /* If I want my original vault */
         /* Save 2nd vault in extwarehouse table */
         
    $sql ="update extwarehouse set items=(select items from warehouse  where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    $sql ="update extwarehouse set money=(select money from warehouse  where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    /* Update main vault to original content */
         
    $sql ="update warehouse set items=(select items from charbaul where  accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    $sql ="update warehouse set money=(select money from charbaul where  accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    /* Set vault number */
         
    $sql ="update warehouse set number=0 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    /* Clean main vault last data  */
         
    $sql ="delete charbaul where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
        }
        if((
    $rsbaul['number'])==0)
        {
         
    /* If I want 2nd vault */
         /* Save main vault data into charbaul table */
         
    $sql ="insert into charbaul(accountid, items, money)(select  accountid, items, money from warehouse where  accountid='".anti_injection($HTTP_POST_VARS["id"])."')";
         
    mssql_query($sql);
         
    /* Update main vault to 2nd vault data */
         
    $sql ="update warehouse set items=(select items from extwarehouse  where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    $sql ="update warehouse set money=(select money from extwarehouse  where accountid='".anti_injection($HTTP_POST_VARS["id"])."') where  accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
         
    /* Set vault number */
         
    $sql ="update warehouse set number=1 where accountid='".anti_injection($HTTP_POST_VARS["id"])."'";
         
    mssql_query($sql);
        }
        echo 
    "-".anti_injection($HTTP_POST_VARS["id"])." vault changed successfully !!!";
       }
       else
       {
        echo 
    "You must be off line, vault change not proceed !!!";
       }
      }
      else
      {
       echo 
    "You don't have extravault, contact your administrator !!!";
      }
    }
    else
    {
      echo 
    "Login fail !!!";
    }
    mssql_free_result($result);
    }
    else
    {
    echo 
    "You must to complete all field to login ok !!!";
    }
    mssql_close();
    ?>
    Khách viếng thăm hãy cùng MrAaa xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Các Chủ đề tương tự

  1. đặt pass cho NPC
    Bởi kidangel trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 1
    Bài viết cuối: 11-08-10, 03:56 PM
  2. Id và pass web nmh!
    Bởi DamMe trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 9
    Bài viết cuối: 21-07-10, 09:33 PM
  3. pass xóa nhân vật tìm ở đâu !!
    Bởi thephuoc32 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 6
    Bài viết cuối: 22-07-07, 09:19 AM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 12:16 AM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.