Lavalair Mods...

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • something else
    replied
    Maybe: http://coding-talk.com/forum/main-fo...ased-mods-lava but it does show errors until you get some data in the forums because of null mysql fetch arrays

    Leave a comment:


  • stefan998
    replied
    I have my version that I edited completely but its not in english,do you have some recommendations of some working versions on english because i dont have time to translate mine ?

    Leave a comment:


  • something else
    replied
    They are all undeclared string notices and won't stop it from working.

    I have noticed there is multiple errors in your registration function also, I think coding-talk is screwing up your code when you post it.
    (You can check this by looking at your script and looking at your post on here to see they will be different)

    Getting these problems with a script at such an early stage and also there is security holes I can see where registration can be hacked easily with sql injection makes me think you are better off trying a more secure version of Lava rather than messing about with a unsecure version with problems in it.

    Leave a comment:


  • stefan998
    replied
    This is what i get
    Notice: Undefined index: uid in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 16

    Notice: Undefined index: pwd in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 17

    Notice: Undefined index: cpw in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 18

    Notice: Undefined index: email in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 19

    Notice: Undefined index: browserm in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 20

    Notice: Undefined index: usx in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 21

    Notice: Undefined index: bdy in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 22

    Notice: Undefined index: ulc in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 23

    Notice: Undefined index: info in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 24

    Notice: Undefined index: brws in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 25

    Notice: Undefined index: usex in /home/vol15_6/byethost3.com/b3_20561234/htdocs/web/register.php on line 26
    Those are lines 16-26
    PHP Code:
     $uid $_POST["uid"];
        
    $pwd $_POST["pwd"];
        
    $cpw $_POST["cpw"];
        
    $email $_POST["email"];
        
    $ubr $_POST["browserm"];
        
    $usx $_POST["usx"];
        
    $bdy $_POST["bdy"];
        
    $ulc $_POST["ulc"];
        
    $info $_POST["info"];
        
    $brws $_POST["brws"];
        
    $usex $_POST["usex"]; 
    Last edited by stefan998; 25.08.17, 13:26. Reason: Added more info

    Leave a comment:


  • something else
    replied
    Try putting these 2 lines at the top of your register page after "<?php" to see if php gives you any error messages:
    PHP Code:
    error_reporting  (E_ALL);
    ini_set ('display_errors'true); 

    Leave a comment:


  • stefan998
    replied
    This is what I after clicking register
    Last edited by stefan998; 25.08.17, 00:16.

    Leave a comment:


  • something else
    replied
    There is multiple php errors on your registration page...

    I think I have fixed them with this:
    PHP 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">';

        
    $uid $_POST["uid"];
        
    $pwd $_POST["pwd"];
        
    $cpw $_POST["cpw"];
        
    $email $_POST["email"];
        
    $ubr $_POST["browserm"];
        
    $usx $_POST["usx"];
        
    $bdy $_POST["bdy"];
        
    $ulc $_POST["ulc"];
        
    $info $_POST["info"];
        
    $brws $_POST["brws"];
        
    $usex $_POST["usex"];

        
    connectdb();
        
    $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
        
    $sitename $sitename[0];
        
    $brws explode("/",$_SERVER['HTTP_USER_AGENT']);
        
    $ubr $brws[0];
        echo 
    '<head><title>'.$sitename.'</title><link rel="stylesheet" type="text/css" href="../themes/black_medium.css"></head><body>';
        
    $ipr getip();
        
    $uip explode(".",$ipr);

        
    //if((!canreg())||(isipbanned($ipr,$ubr)))
        
    if(!canreg())
        {
            echo 
    '<p><img src="../images/notok.gif" border="0" alt="X"/>Registration is closed at the moment</p>';
        }
        else
        {
    ?>
            <p>
            <img src="../images/point.gif" alt="!"/>
            Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>
            <img src="../images/point.gif" alt="!"/>
            No vulgar words are accepted in Username<br/>
            <img src="../images/point.gif" alt="!"/>
            Username and Password must contain at least 4 characters<br/>
            <img src="../images/point.gif" alt="!"/>
            Username must begin with a letter and cannot contain capitals<br/>
            <img src="../images/point.gif" alt="!"/>
            Password will be case sensitive<br/>
    <?php
            $tolog 
    false;
            if(
    trim($uid)=="")
            {
                echo 
    registerform(1);
            }
            else if(
    trim($pwd)=="")
            {
                echo 
    registerform(2);
            }
            else if(
    trim($cpw)=="")
            {
                echo 
    registerform(3);
            }
            else if(
    spacesin($uid)||scharin($uid))
            {
                echo 
    registerform(4);
            }
            else if(
    spacesin($pwd)||scharin($pwd))
            {
                echo 
    registerform(5);
            }
            else if(
    $pwd!=$cpw)
            {
                echo 
    registerform(6);
            }
            else if(
    strlen($uid)<4)
            {
                echo 
    registerform(7);
            }
            else if(
    strlen($pwd)<4)
            {
                echo 
    registerform(8);
            }else if(
    isdigitf($uid))
            {
                echo 
    registerform(11);
            }
            else if(
    checknick($uid)==1)
            {
                echo 
    registerform(12);

            }
            else if(
    checknick($uid)==2)
            {
                echo 
    registerform(13);

            }
            else if(
    trim($email)=="")
            {
                echo 
    registerform(14);

            }
            else if(
    register($uid,$pwd,$usx,$bday,$ulc,$email,$info,$ubr)==1)
            {
                echo 
    registerform(9);
            }
            else if(
    register($uid,$pwd,$usx,$bday,$ulc,$email,$info,$ubr)==2)
            {
                echo 
    registerform(10);
            }
            else
            {
                
    $brws explode("/",$_SERVER['HTTP_USER_AGENT']);
                
    $ubr $brws[0];
                
    //$fp = fopen("gallery/info.txt","a+");
                //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");
                //fclose($fp);

                
    echo "Registration completed successfully!<br/>";
                
    // echo "<br/><b>Username: </b>$uid<br/>";
                // echo "<b>Password: </b>$pwd<br/><br/>";
                
    if(validation())
                {
                    echo 
    "Please give us up to 12hrs to validate you (normally it be done within an hour)";
                }
                
    $tolog true;
            }
            echo 
    "</p>";
        }
        echo 
    "<p>";
        if(
    $tolog)
        {
            
    /*
            $msg = "\n Username: ".$uid." \n Password: ".$pwd." \n\n ".$sitename." is a nice friendly chat community we are glad to hav u with us :o) pls feel free to bring ya m8s along \n\n Thank You\n".$sitename;
            $subj = "Registration details for ".$sitename;
            $headers = 'From: owner@vodkawap.us.to' . "\r\n" .
            'Reply-To: fiona@scotland.uk.to' . "\r\n" .
            'X-Mailer: PHP/' . phpversion();
            mail($email, $subj, $msg, $headers);
            */
            
    echo '<a href="login.php?loguid='.$uid.'&amp;logpwd='.$pwd.'"><img src="../images/home.gif" alt=""/>Login</a>';
        }
        else
        {
            echo 
    '<b>0 </b><a accesskey="0" href="index.php"><img src="../images/home.gif" alt=""/>Home</a>';
        }
        echo 
    "</p></body></html>";
    ?>

    Note: I have edited this post as there was still 1 error on it
    Last edited by something else; 24.08.17, 18:30.

    Leave a comment:


  • stefan998
    replied
    PHP Code:
    ////////////////////////////////////////////////////Register



    function register($name,$pass,$usex,$bday,$uloc,$email,$info$ubr)

    {

      
    $execms mysql_query("SELECT * FROM ibwf_users WHERE name='".$name."'");



      if (
    mysql_num_rows($execms)>0){

        return 
    1;

      }else{

        
    $pass md5($pass);

        
    $validation mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='vldtn'"));

        if(
    $validation[0]==1)

        {

        
    $validated=0;

        }else{

        
    $validated=1;

        }

        
    $reg mysql_query("INSERT INTO ibwf_users SET name='".$name."', pass='".$pass."', birthday='".$bday."', sex='".$usex."', location='".$uloc."', cluster='".$email."', signature='".$info."', regdate='".time()."', validated='".$validated."', ipadd='".getip()."', browserm='".$ubr."'");
      
    //  $reg = mysql_query("INSERT INTO iwbf_users SET name='".$name."', pass='".$pass."', birthday='".$bday."', sex='".$usex."', location='".$uloc."', regdate='".time()."', ipadd='".getip()."', browserm='".$ubr."'");


        
    if ($reg)

        {
          
    $uid mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$name."'"));
      
    //  $uid = getuid_nick($name);

          
    addonline($uid,"Just Registered","");

          
    $delonline mysql_query("DELETE FROM ibwf_online WHERE userid='".$uid."'");

          
    $uid mysql_fetch_array(mysql_query("SELECT id FROM ibwf_users WHERE name='".$name."'"));

          
    $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));

          
    $msg "Hello /reader =). Greetings from all $sitename[0] staff, we are happy to have you here, welcome to our big happy family!, If You Have any questions or comments about the site feel free to message me or any of the other staff members online. ENJOY!(excited)[br/][small][i]p.s: this is an automated pm[/i][/small]";

          
    $msg mysql_escape_string($msg);

          
    autopm($msg$uid[0]);

          return 
    0;

        }else{

          return 
    2;



        }

      }




    PHP Code:
    function registerform($ef)

    {

      
    $ue $errl $pe $ce "";

      switch(
    $ef)

      {

        case 
    1:

            
    $errl "<img src="../images/point.gif" alt="!"/> Pls type your username";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    2:

            
    $errl "<img src="../images/point.gif" alt="!"/> Pls type your password";

            
    $pe "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    3:

            
    $errl "<img src="../images/point.gif" alt="!"/> Pls type your password again";

            
    $ce "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    4:

            
    $errl "<img src="../images/point.gif" alt="!"/> Username is invalid";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    5:

            
    $errl "<img src="../images/point.gif" alt="!"/> Password is invalid";

            
    $pe "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    6:

            
    $errl "<img src="../images/point.gif" alt="!"/> Passwords dnt match";

            
    $ce "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    7:

            
    $errl "<img src="../images/point.gif" alt="!"/> Username must be 4 characters or more";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    8:

            
    $errl "<img src="../images/point.gif" alt="!"/> Password must be 4 characters or more";

            
    $pe "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    9:

            
    $errl "<img src="../images/point.gif" alt="!"/> Username is taken";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    10:

            
    $errl "<img src="../images/point.gif" alt="!"/> Unknown error pls try again l8r";



    break;

        case 
    11:

            
    $errl "<img src="../images/point.gif" alt="!"/> Username must start with a letter from a-z";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    12:

            
    $errl "<img src="../images/point.gif" alt="!"/> Username is reserved for admins of the site";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    13:

            
    $errl "<img src="../images/point.gif" alt="!"/> Please choose an appropriate username";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

        case 
    14:

            
    $errl "<img src="../images/point.gif" alt="!"/> U must enter an email address";

            
    $ue "<img src="../images/point.gif" alt="!"/>";

            break;

      }

     
    $rform "<small>$errl</small><br/><br/>";
      
    $rform .= "<form action="register.php" method="post">";

      
    $rform .= "$ue Username: <input name="uid" style="-wap-input-format'*x'" maxlength="12"/><br/>";

      
    $rform .= "$pe Password: <input type="password" name="pwd" maxlength="10"/><br/>";

      
    $rform .= "$ce Password: <input type="password" name="cpw" maxlength="10"/><br/>";



    $rform .= "Date of birth (YYYY-MM-DD): <input name="bdy" maxlength="30"/><br/>";
      
    $rform .= "Sex:<br/>";

      
    $rform .= "<select name="usx" value="M">";

      
    $rform .= "<option value="M">Male</option>";

      
    $rform .= "<option value="F">Female</option>";

      
    $rform .= "</select><br/>";

      
    $rform .= "Country: <input name="ulc" maxlength="100"/><br/>";

      
    $rform .= "Email: <input name="email" maxlength="50"/><br/>";

      
    $rform .= "Info: <input name="info" maxlength="100"/><br/>";

    //  $rform .= "<input type="Submit" name="Register" Value="Register"></form>";

      //$rform .= "<br/>$errl";

      
    $rform .= "<input type="submit" value="Register"/>";
      
    $rform .= "</form>";
      return 
    $rform
    Those are from core.php

    Leave a comment:


  • stefan998
    replied
    PHP 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">";



    //<html xmlns="http://www.w3.org/1999/xhtml">








    $uid $_POST["uid"];
    $pwd $_POST["pwd"];
    $cpw $_POST["cpw"];
    $email $_POST["email"];
    $ubr $_POST["browserm"];
    $usx $_POST["usx"];
    $bdy $_POST["bdy"];
    $ulc $_POST["ulc"];
    $info $_POST["info"];
    $brws $_POST["brws"];
    $usex $_POST["usex"];




    connectdb();



    $sitename mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));



    $sitename $sitename[0];



    $brws explode("/",$_SERVER['HTTP_USER_AGENT']);

    $ubr $brws[0];



    echo 
    "<head>";



    echo 
    "<title>$sitename</title>";



    echo 
    "<link rel="stylesheet" type="text/css" href="../themes/black_medium.css">";



    echo 
    "</head>";



    echo 
    "<body>";



    $ipr getip();



    $uip explode(".",$ipr);







    //if((!canreg())||(isipbanned($ipr,$ubr)))
    if(!canreg())


    {



        echo 
    "<p>";



        echo 
    "<img src="../images/notok.gif" border="0" alt="X"/>Registration is closed at the moment";



        echo 
    "</p>";



    }else{



    echo 
    "<p>";



    ?>



    <img src="../images/point.gif" alt="!"/>



    Allowed characters in userid and password are a-z, 0-9, and -_ only<br/>



    <img src="../images/point.gif" alt="!"/>



    No vulgar words are accepted in Username<br/>



    <img src="../images/point.gif" alt="!"/>



    Username and Password must contain at least 4 characters<br/>



    <img src="../images/point.gif" alt="!"/>



    Username must begin with a letter and cannot contain capitals<br/>



    <img src="../images/point.gif" alt="!"/>



    Password will be case sensitive<br/>



    <?php



    $tolog 
    false;



    if(
    trim($uid)=="")



    {



        echo 
    registerform(1);



    }else if(
    trim($pwd)=="")



    {



        echo 
    registerform(2);



    }else if(
    trim($cpw)=="")



    {



        echo 
    registerform(3);



    }else if(
    spacesin($uid)||scharin($uid))



    {



        echo 
    registerform(4);



    }else if(
    spacesin($pwd)||scharin($pwd))



    {



        echo 
    registerform(5);



    }else if(
    $pwd!=$cpw)



    {



        echo 
    registerform(6);



    }else if(
    strlen($uid)<4)



    {



        echo 
    registerform(7);



    }else if(
    strlen($pwd)<4)



    {



        echo 
    registerform(8);



    }else if(
    isdigitf($uid))



    {



        echo 
    registerform(11);



    }else if(
    checknick($uid)==1)



    {



        echo 
    registerform(12);







    }else if(
    checknick($uid)==2)



    {



        echo 
    registerform(13);







    }else if(
    trim($email)=="")



    {



        echo 
    registerform(14);







    }else if(
    register($uid,$pwd,$usx,$bday,$ulc,$email,$info,$ubr)==1)



    {



        echo 
    registerform(9);



    }else if(
    register($uid,$pwd,$usx,$bday,$ulc,$email,$info,$ubr)==2)



    {



        echo 
    registerform(10);



    }else{



    $brws explode("/",$_SERVER['HTTP_USER_AGENT']);


        
    $ubr $brws[0];



        
    //$fp = fopen("gallery/info.txt","a+");



        //fwrite ($fp, "\n".$uid."-".$pwd."-".$ipr."-".$ubr."\n");



        //fclose($fp);







      
    echo "Registration completed successfully!<br/>";



     
    // echo "<br/><b>Username: </b>$uid<br/>";



     // echo "<b>Password: </b>$pwd<br/><br/>";



      
    if(validation())



      {



      echo 
    "Please give us up to 12hrs to validate you (normally it be done within an hour)";



      }



      
    $tolog true;



    }



    echo 
    "</p>";



    }



    echo 
    "<p>";



    if(
    $tolog)



    {




    echo 
    "<a href="login.php?loguid=$uid&amp;logpwd=$pwd"><img src="../images/home.gif" alt=""/>Login</a>";



    }else{



    echo 
    "<b>0 </b><a accesskey="0" href="index.php"><img src="../images/home.gif" alt=""/>Home</a>";



    }



    echo 
    "</p>";



    echo 
    "</body>";



    ?>



    </html>
    Here is the code of register.php
    Last edited by stefan998; 24.08.17, 18:08.

    Leave a comment:


  • something else
    replied
    Originally posted by stefan998 View Post
    It worked. Now when i try to register I click register button and I get nothing and in database also nothing it wont register me at all
    Normally its because of missing $_POST's on the registration page, but without seeing the registration page you are using then this might not be the case.

    Leave a comment:


  • stefan998
    replied
    It worked. Now when i try to register I click register button and I get nothing and in database also nothing it wont register me at all
    Last edited by stefan998; 24.08.17, 01:41.

    Leave a comment:


  • thunderwap
    replied
    Originally posted by stefan998 View Post
    Does someone knows why i cant load bg image i put background-image: url("bg.jpg");
    background-repeat: repeat;
    width: 10px;
    height: 10px;
    but it dosent load on my site
    Code:
    body {
    
        background-image: url(bg.jpg);
        background-repeat:repeat;
        width: 10px; 
        height: 10px;
    }
    can u put css code here of ur site to check

    Leave a comment:


  • something else
    commented on 's reply
    Is bg.jpg in the same directory as your css ? Try adding it as the full path to see if it works.

  • stefan998
    replied
    Does someone knows why i cant load bg image i put background-image: url("bg.jpg");
    background-repeat: repeat;
    width: 10px;
    height: 10px;
    but it dosent load on my site

    Leave a comment:


  • stefan998
    replied
    Originally posted by asadkhan View Post
    need ibwf_users table plz
    CREATE TABLE IF NOT EXISTS `iwbf_users` (
    `id` int(100) NOT NULL AUTO_INCREMENT,
    `name` varchar(30) NOT NULL DEFAULT '',
    `pass` varchar(60) NOT NULL DEFAULT '',
    `birthday` varchar(50) NOT NULL DEFAULT '',
    `sex` char(1) NOT NULL DEFAULT '',
    `location` varchar(100) NOT NULL DEFAULT '',
    `perm` char(1) NOT NULL DEFAULT '0',
    `posts` int(100) NOT NULL DEFAULT '0',
    `plusses` int(100) NOT NULL DEFAULT '0',
    `signature` varchar(100) NOT NULL DEFAULT '',
    `avatar` varchar(100) NOT NULL DEFAULT '',
    `email` varchar(50) NOT NULL DEFAULT '',
    `site` varchar(50) NOT NULL DEFAULT '',
    `browserm` varchar(100) NOT NULL DEFAULT '',
    `ipadd` varchar(30) NOT NULL DEFAULT '',
    `lastact` int(100) NOT NULL DEFAULT '0',
    `regdate` int(100) NOT NULL DEFAULT '0',
    `chmsgs` int(100) NOT NULL DEFAULT '0',
    `chmood` int(100) NOT NULL DEFAULT '0',
    `shield` char(1) NOT NULL DEFAULT '0',
    `gplus` int(100) NOT NULL DEFAULT '0',
    `budmsg` varchar(100) NOT NULL DEFAULT '',
    `lastpnreas` varchar(100) NOT NULL DEFAULT '',
    `lastplreas` varchar(100) NOT NULL DEFAULT '',
    `shouts` int(100) NOT NULL DEFAULT '0',
    `pollid` int(100) NOT NULL DEFAULT '0',
    `rbcid` varchar(255) NOT NULL DEFAULT '',
    `hvia` char(1) NOT NULL DEFAULT '1',
    `lastvst` int(100) NOT NULL,
    `battlep` int(100) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    UNIQUE KEY `name` (`name`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

    Leave a comment:

Working...
X