Looking for an account maker or someone to edit this one.

Results 1 to 5 of 5
  1. #1
    Elite Member Rasia is offline
    Member +Rank
    May 2007 Join Date
    168Posts

    Looking for an account maker or someone to edit this one.

    Hey I'm looking for a account maker only nothing that pulls info like stats and such..

    But anyways it also needs a check box to enable TBC support or not so thats add I think 0 or 8 as a flag?


    PHP Code:
    <?php


    $config
    ['mysql_host'] = 'localhost'// MySql Hostname / IP
    $config['mysql_user'] = 'root'// MySql Username
    $config['mysql_pass'] = 'root'//  MySql Password
    $config['mysql_dbname'] = 'antrix'// Database Name


    error_reporting(E_ALL E_NOTICE);

    session_start();

    $msg = Array();
    $error = Array();

    function 
    addUser(){
        if (empty(
    $_POST)) return false;
        global 
    $config$msg$error;
        if (empty(
    $_POST['login'])) $error[] = 'Error, You forgot to enter a account name!';
        if (empty(
    $_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, You forgot to enter a password!';
        if (
    $_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!';
        if (!empty(
    $error)) return false;
        
    $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']);
        if (!
    $db) return $error[] = 'Database: '.mysql_error();
        if (!@
    mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error();
        
    $query "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'";
        
    $res mysql_query($query$db);
        if (!
    $res) return $error[] = 'Database: '.mysql_error();
        if (
    mysql_num_rows($res) > 0) return $error[] = 'Account name already exists';
        
    $query "INSERT INTO `accounts` (`login`,`password`,`lastip`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."')";
        
    $res mysql_query($query$db);
        if (!
    $res) return $error[] = 'Database: '.mysql_error();
        
    $msg[] = 'The Account <strong>'.htmlentities($_POST['login']).'</strong> has been created!';
        
    mysql_close($db);
        return 
    true;
    }
    {
    addUser();
    }
    ?>





    <html>
    <head>
    <title>Antrix Account Creation Page by Danerf</title>
    <style>
    body, table {
        font-family: Verdana;
        font-size: 13px;
        background-color: #000000;
        color: #ffffff
    }
    input {
        font-family: Tahoma;
        text-align: center;
        padding: 2px;
    }
    input.button {
        font-family: Verdana;
        font-size: 12px;
        padding: 2px 25px;
    }
    div.error {
        border: 2px solid #FF0000;
        background-color: #f48987;
        padding: 4px;
    }
    div.msg {
        background-color: #9fd5b5;
        padding: 4px;
        border: 2px solid #00b159;
    }
    </style>
    </head>


    <body>

    <u><h2 align="left"><font><center><img src=banner.jpg></center></h2></u>



    <?php

    if (!empty($error)){
        echo 
    '<div class="error">';
        foreach(
    $error as $text)
            echo 
    $text.'<br/>';
        echo 
    '</div>';
    };
    if (!empty(
    $msg)){
        echo 
    '<div class="msg">';
        foreach(
    $msg as $text)
            echo 
    $text.'<br/>';
        echo 
    '</div>';
        exit(
    '</body></html>');
    };
    ?>
     

          
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <Center><table>
    <br>     
    <center>Account Name:</center>
    <center><input type="text" name="login" size="30" maxlength="16"/></center>
    <br>
    <center>Account Password:</center>
    <center><input type="password" name="password[]" size="30" maxlength="16"/></center>
    <br>
    <center>Password:</center>
    <center><input type="password" name="password[]" size="30" maxlength="16"/></center>
    <br>
    <center><input type="submit" value="Create" class="button"/></center>
    </center>
    </table>
    </form>
    </body>
    </html>


  2. #2
    Newbie Duddits is offline
    MemberRank
    May 2007 Join Date
    19Posts

    Re: Looking for an account maker or someone to edit this one.

    Replace the line with this

    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`,`flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."','8')";

  3. #3
    Elite Member Rasia is offline
    Member +Rank
    May 2007 Join Date
    168Posts

    Re: Looking for an account maker or someone to edit this one.

    Quote Originally Posted by Duddits View Post
    Replace the line with this

    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`,`flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."','8')";

    Ok thats good to know but I rather have a checkbox rather make/ have to reg scripts please :)

  4. #4
    Elite Member Rasia is offline
    Member +Rank
    May 2007 Join Date
    168Posts

    Re: Looking for an account maker or someone to edit this one.

    bump

  5. #5
    Member Zero2Fear is offline
    MemberRank
    Apr 2005 Join Date
    Goirle, NetherlandsLocation
    83Posts

    Re: Looking for an account maker or someone to edit this one.

    Use a .sql file for the change of the flags. Its somewhere on the forums. And for the account creater, what exactly do you need?



Advertisement