[Release] fix User Reset

Results 1 to 5 of 5
  1. #1
    Proficient Member babhie001 is offline
    MemberRank
    Sep 2005 Join Date
    philippinesLocation
    159Posts

    [Release] fix User Reset

    user_reset notepad

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>

    <body>
    <div align="center"><form id='form1' name='form1' method='post' action='<?php $_SERVER['PHP_SELF']; ?>'>
    <label><br />
    </label>
    <p>
    <label><span class="b01">Click a Character You want to reset dont abuse this to avoid being BUG!<br />
    <br />
    <?php
    mysql_connect($config['db']['host'], $config['db']['user'], $config['db']['pass']);
    mysql_select_db($config['db']['name']);

    $result = mysql_query("SELECT * FROM characters WHERE account_name = '".$_SESSION['account']."'ORDER BY char_name LIMIT 5");

    while($row = mysql_fetch_array( $result )) {
    echo "<strong><a href=?op=reset_user&char=".$row['char_name'].">".$row['char_name']."</a><BR></strong>";
    }


    ?>
    </span><br />
    <br />
    </label>
    </p>
    </form></div>
    <p align="center">&nbsp;</p>
    </body>
    </html>

    reset user - notepad

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>

    <body>
    <div align="center">
    <form id='form1' name='form1' method='post' action='<?php $_SERVER['PHP_SELF']; ?>'>
    <label>
    <select name='select'>
    <option value='0'>Select level</option>
    <option value='1'>Level One</option>

    </select>
    </label>
    <p>
    <label>
    <input name='submit' type='submit' id="submit" value='Change' />
    </label>
    </p>
    </form>
    </div>
    <div align="center"><?php
    if(isset($_POST['submit'])) {
    $results = mysql_query("SELECT * FROM characters WHERE account_name = '".$_SESSION['account']."' and char_name = '".$_GET['char']."'");
    $rows = mysql_fetch_array($results);
    if($rows['char_name'] != $_GET['char']) {
    die('This is not your character!');
    }
    $result = mysql_query("UPDATE characters SET level = '".$_POST['select']."' WHERE char_name = '".$_GET['char']."'");
    if(!$result) {
    echo('<p class="b01">Cannot reset level!</p>');
    } else {
    echo('<p class="b01">Reset level successfull!</p>');
    }
    }
    ?></div>
    </body>
    </html>


  2. #2
    Ī© -DefaulT is offline
    MemberRank
    Aug 2006 Join Date
    Emerald CityLocation
    1,429Posts

    Re: [Release] fix User Reset

    omg =.=

    this is my code that i posted on my topic =.=

    named "Simple Edits to Matt's Rose Online CMS"

  3. #3
    Account Upgraded | Title Enabled! asado111 is offline
    MemberRank
    Feb 2007 Join Date
    225 Fluor Daniel Dr, Apt 15203 Sugar Land, TX 77479-4029Location
    289Posts

    Re: [Release] fix User Reset

    uhh default how abt u get on MSN :p

  4. #4
    Proficient Member babhie001 is offline
    MemberRank
    Sep 2005 Join Date
    philippinesLocation
    159Posts

    Re: [Release] fix User Reset

    Quote Originally Posted by viper67 View Post
    omg =.=

    this is my code that i posted on my topic =.=

    named "Simple Edits to Matt's Rose Online CMS"
    yap this is your code but i edit coz ur code is not fix unable to reset anyone... try ur code if working... ^_^ i just edit ur code coz its not really working ^_^


    i already fix the Admin Password input... check your work... ^_^ theres a lot of bug there...
    Last edited by babhie001; 15-06-07 at 12:24 PM.

  5. #5
    Novice expertester is offline
    MemberRank
    Apr 2006 Join Date
    3Posts

    Re: [Release] fix User Reset

    how about if i want to make sure that only char lvl 255 can be reseted?

    thanks



Advertisement