If you are looking for V.C.N






Log in

I forgot my password

Latest topics
» 2.4.3 oldfags still here? whats up?
Sun 14 May 2017, 10:04 pm by hambrgrhelpr

» An Thread dedicated to Old School 2.4.3 and all its memories
Sat 19 Mar 2016, 8:56 am by Shifthappens

» Hey sexy Gentlemen and Ladies
Thu 24 Jan 2013, 11:21 am by Suspect2

» yoo
Mon 13 Aug 2012, 1:34 pm by Casp'

» hay gm
Thu 09 Aug 2012, 11:47 pm by sevenhuehuelol

» Ques for GM
Thu 09 Aug 2012, 11:43 pm by sevenhuehuelol

» YES IT IS I
Mon 30 Jul 2012, 11:21 am by Casp'

» oldfags asemble
Tue 03 Jul 2012, 3:19 pm by -BoomBox

» Oh hai...
Tue 19 Jun 2012, 3:55 pm by Queshi

» hey windir bro guess what
Tue 19 Jun 2012, 3:55 pm by Queshi

» Downpatch from 3.0.8 to 3.0?
Mon 20 Jun 2011, 12:54 pm by windir2

» Mouthless asking me for RESS! LOOL
Thu 26 May 2011, 5:29 pm by Feel

» Need an unstuck
Tue 24 Nov 2009, 2:48 am by ombladon123

» Idea for Arena Rating and Arena Rewards
Mon 23 Nov 2009, 7:58 pm by Raddau

» shammy bug
Mon 23 Nov 2009, 1:35 pm by stomstrikes

» Gentlemen?
Mon 23 Nov 2009, 1:33 pm by stomstrikes

» Rous aka Zanukan attention please
Mon 23 Nov 2009, 3:36 am by ryonis

» I cant get my tokens when i vote.
Sun 22 Nov 2009, 1:26 pm by demonolator12345

» Hi again --- imweedy
Sun 22 Nov 2009, 12:04 am by imweedy

» pizzabox2 whats ur name?
Sat 21 Nov 2009, 1:12 pm by yingyangi

Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests

None

[ View the whole list ]


Most users ever online was 395 on Sun 18 May 2008, 12:28 pm
Top posters
ServerBot (7646)
 
Swifteh (7171)
 
Charlie Face (4524)
 
Lisyhalath (3900)
 
Scruffay (3896)
 
kitch (3536)
 
Min0rity (3192)
 
Ubberpownage88 (3023)
 
bacongrease2 (2761)
 
Juicy (2649)
 

RSS feeds


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 


Keywords


AAPDRDS fix

View previous topic View next topic Go down

AAPDRDS fix

Post by Zanukan on Thu 05 Nov 2009, 6:04 pm

Ok so i was helping one of the people from mmowned with AAPDRDS donation system.

And i found out the script was written with 2 mistakes, that is why most of the people cannot get it working.

here is why

index..php
Code:
}
    else
    {
        $con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
        mysql_select_db(MYSQL_DATA);
        $res = mysql_query("SELECT entry,name FROM realms");
        $REALMS = "{";
        while($row = mysql_fetch_array($res))
        {
            $REALMS .= ((int)$row['entry']-1).":\"".$row['name']."\",";

this is wrong

Code:
$res = mysql_query("SELECT entry,name FROM realms");

Code:
$REALMS .= ((int)$row['entry']-1).":\"".$row['name']."\",";

has to be

Code:
$res = mysql_query("SELECT id,name FROM realms");

Code:
$REALMS .= ((int)$row['id']-1).":\"".$row['name']."\",";


has to be like this
Code:
    header("Cache-control: no-cache, must-revalidate\r\n");
    require_once("config.php");
    if(isset($_GET['char']))
    {
        $con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
        mysql_select_db(MYSQL_DATA);
        $Name = mysql_real_escape_string($_GET['char']);
        $Realm = mysql_real_escape_string($_GET['realm']);
        $Realm = (int)$Realm+1;
        $res = mysql_query("SELECT sqlhost,sqluser,sqlpass,chardb FROM realms WHERE id='{$Realm}'");
        $row = mysql_fetch_array($res);
        mysql_close($con);
        $con = mysql_connect($row['sqlhost'],$row['sqluser'],$row['sqlpass']);
        mysql_select_db($row['chardb']);
        $res = mysql_query("SELECT guid FROM characters WHERE name='{$Name}'");
        if(mysql_num_rows($res) == 1)
        {
            $row = mysql_fetch_array($res);
            echo $row['guid'];
        }
        else
        {
            echo "0";
            die;
        }
        mysql_close($con);
    }
    else
    {
        $con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS);
        mysql_select_db(MYSQL_DATA);
        $res = mysql_query("SELECT id,name FROM realms");
        $REALMS = "{";
        while($row = mysql_fetch_array($res))
        {
            $REALMS .= ((int)$row['id']-1).":\"".$row['name']."\",";
        }
        $REALMS .= "\"undefined\":0}";
        $res = mysql_query("SELECT entry,name,realm,description,price FROM rewards");
        $REWARDS = "{";
        while($row = mysql_fetch_array($res))
        {
            $REWARDS .= ((int)$row['entry']-1).":{name:\"".$row['name']."\",realm:".((int)$row['realm']-1).",description:\"".addslashes($row['description'])."\",price:".$row['price']."},";
            $DESCRIPTIONS .= "".$row['description']."
";
        }
        $REWARDS .= "\"undefined\":0}";
        $REWARDS = str_replace("\r","\\r",$REWARDS);
        $REWARDS = str_replace("\n","\\n",$REWARDS);
        include("form.php");
        mysql_close($con);
    }
?>

_________________

avatar
Zanukan
WWemu Expert
WWemu Expert

Number of posts : 854
Age : 38
Joined : 2007-12-11
Points : 11935
Reputation : 3197

http://www.vcnserver.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum