+rep if you can do this for me [Easy] menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    mafiaboy's Avatar Contributor
    Reputation
    235
    Join Date
    May 2007
    Posts
    698
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    +rep if you can do this for me [Easy]

    I need a account creation page for people buying Gm on my server. It's getting annoying to set them manually.

    Here is my register.php, can someone please edit it to it sets people to this gm privileges:

    qshvtrm


    Register.php
    <?php

    #################
    # #
    # #
    # Enjoy! #
    # #
    # #
    #################

    include("config.php");

    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($_POST['email'])) $error[] = 'Please fill in a valid email adress!';
    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[] = 'Username already in use.';
    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($_POST['email'])."', '8')";
    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Account Creation Page</title>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <style type="text/css" media="screen">@import url(server_stats.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>
    <center>
    <div class="logo"></div>
    <div style="width:300px">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr class="head"><th colspan="2">Account Creation</th></tr>
    <tr>
    <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td>
    </tr>
    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" />
    <input type="submit" value="Create" class="button"/>
    </form>

    <?php
    if (!empty($error)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
    foreach($error as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    };
    if (!empty($msg)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
    foreach($msg as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    exit();
    };
    ?>

    </div>
    <div class="footer">
    Original design by mmorpg4free.com, styling by Julianx</div>
    </center>
    </body>
    </html>
    My ascent logon database is for 2.3.0

    +rep to whoever reposts a php file that will set people to those gm priviliges when they setup an account.

    +rep if you can do this for me [Easy]
  2. #2
    The Kingofbeast's Avatar Active Member
    Reputation
    38
    Join Date
    Oct 2007
    Posts
    306
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this did it..

    <?php

    #################
    # #
    # #
    # Enjoy! #
    # #
    # #
    #################

    include("config.php");

    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($_POST['email'])) $error[] = 'Please fill in a valid email adress!';
    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[] = 'Username already in use.';
    $query = "INSERT INTO `accounts` (`login`,`password`, `gm`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."','a', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($_POST['email'])."', '8')";
    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Account Creation Page</title>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <style type="text/css" media="screen">@import url(server_stats.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>
    <center>
    <div class="logo"></div>
    <div style="width:300px">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr class="head"><th colspan="2">Account Creation</th></tr>
    <tr>
    <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td>
    </tr>
    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" />
    <input type="submit" value="Create" class="button"/>
    </form>

    <?php
    if (!empty($error)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
    foreach($error as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    };
    if (!empty($msg)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
    foreach($msg as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    exit();
    };
    ?>

    </div>
    <div class="footer">
    Original design by mmorpg4free.com, styling by Julianx</div>
    </center>
    </body>
    </html>
    Last edited by The Kingofbeast; 12-06-2007 at 10:36 PM.

  3. #3
    The Kingofbeast's Avatar Active Member
    Reputation
    38
    Join Date
    Oct 2007
    Posts
    306
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I tried that and it worked

  4. #4
    Hellgawd's Avatar Member
    Reputation
    710
    Join Date
    Jun 2007
    Posts
    2,480
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here you go
    <?php

    #################
    # #
    # #
    # Enjoy! #
    # #
    # #
    #################

    include("config.php");

    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($_POST['email'])) $error[] = 'Please fill in a valid email adress!';
    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[] = 'Username already in use.';
    $query = "INSERT INTO `accounts` (`login`,`password`, `gm`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."','qshvtrm', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($_POST['email'])."', '8')";
    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Account Creation Page</title>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <style type="text/css" media="screen">@import url(server_stats.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>
    <center>
    <div class="logo"></div>
    <div style="width:300px">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr class="head"><th colspan="2">Account Creation</th></tr>
    <tr>
    <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td>
    </tr>
    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" />
    <input type="submit" value="Create" class="button"/>
    </form>

    <?php
    if (!empty($error)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
    foreach($error as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    };
    if (!empty($msg)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
    foreach($msg as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    exit();
    };
    ?>

    </div>
    <div class="footer">
    Original design by mmorpg4free.com, styling by Julianx</div>
    </center>
    </body>
    </html>


    Unlike what kingofbeast did, I made it so that the gm slot had the permissions tou wanted (qshvtrm) he had it set to "all permissions". Kingofbeast, dont you dare edit your post to include my fix.
    Hope you enjoy!
    -Hellgawd

  5. #5
    Respawn's Avatar Active Member
    Reputation
    42
    Join Date
    Feb 2007
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    #################
    # #
    # #
    # Enjoy! #
    # #
    # #
    #################

    include("config.php");

    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($_POST['email'])) $error[] = 'Please fill in a valid email adress!';
    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[] = 'Username already in use.';
    $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`, `email`, `flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($_POST['email'])."', '8')";
    $res = mysql_query($query, $db);
    if (!$res) return $error[] = 'Database: '.mysql_error();
    $msg[] = 'The Account <span style="color:#00FF00"><strong>'.htmlentities($_POST['login']).'</strong></span> has been created!';
    mysql_close($db);
    return true;
    }
    {
    addUser();
    }

    ?>


    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Account Creation Page</title>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Cache-Control" content="no-cache"/>
    <style type="text/css" media="screen">@import url(server_stats.css);</style>
    <!--[if lt IE 7.]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    </head>
    <body>
    <center>
    <div class="logo"></div>
    <div style="width:300px">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr class="head"><th colspan="2">Account Creation</th></tr>
    <tr>
    <th>Username: </th><td align="center"><input class="button" type="text" name="login" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>Retype Password: </th><td align="center"><input class="button" type="password" name="password[]" size="30" maxlength="16"/></td>
    </tr>
    <tr>
    <th>E-mail: </th><td align="center"><input class="button" type="text" name="email" size="30" maxlength="30"/></td>
    </tr>
    </table>
    <input type="button" class="button" value="Back" onClick="history.go(-1)" />
    <input type="submit" value="Create" class="button"/>
    </form>

    <?php
    if (!empty($error)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td class="error" align="center">';
    foreach($error as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    };
    if (!empty($msg)){
    echo '<table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td align="center">';
    foreach($msg as $text)
    echo $text.'</br>';
    echo '</td></tr></table>';
    exit();
    };
    ?>

    </div>
    <div class="footer">
    Original design by mmorpg4free.com, styling by Julianx</div>
    </center>
    </body>
    </html>

  6. #6
    mafiaboy's Avatar Contributor
    Reputation
    235
    Join Date
    May 2007
    Posts
    698
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    kk thnx no more pl¸z

Similar Threads

  1. [Question]Rep if you can figure this out.
    By Corosive720 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 01-10-2008, 01:09 AM
  2. + 2 REP IF you you can make this for me quickly
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 12-18-2007, 11:24 PM
  3. +REP IF YOU can tell me if this machine is good enough for my server!
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 11
    Last Post: 12-16-2007, 01:56 PM
  4. +rep if you can solve this problem with my rev
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 12-09-2007, 01:06 AM
  5. +rep if you can fix this major bug for my server
    By mafiaboy in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 12-07-2007, 07:56 PM
All times are GMT -5. The time now is 03:38 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search