Maniak Posted April 6, 2010 Posted April 6, 2010 First off, I do not know why anyone would want this.. But it is something >.< 1. Create new file (dealer.php) and insert: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Thanks to Equinox from MWG for putting them both into 1 file, and adding/removing certain bits. 2. Add to explore.php (where you want the link to be displayed). You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 3. Upload this SQL: [mysql]-- -------------------------------------------------------- -- -- Table structure for table `crydeal` -- CREATE TABLE `crydeal` ( `id` int( 11 ) NOT NULL AUTO_INCREMENT, `crystals` int( 11 ) NOT NULL default '0', `price` int( 11 ) NOT NULL default '0', PRIMARY KEY ( `id` ) ) ENGINE = MYISAM DEFAULT CHARSET = latin1; -- --------------------------------------------------------[/mysql] Screen Shots: (some of the images will differ to the actual thing, as I took the Screen Shots before changing it. Also, in the first image; if the player isn't an Admin then the link to add Crystal Packages will not display) Post any bugs found, and I will fix them! NOTE: The new dealer.php hasn't been tested by myself, so I do not know if it works. Edit: It has been tested, and does work. Quote
Maniak Posted April 7, 2010 Author Posted April 7, 2010 Has anyone installed this Mod yet, as I am wanting to know if there are any bugs within it. It was fine on my XAMPP server, but I did not do thorough testing. Quote
Equinox Posted April 7, 2010 Posted April 7, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I didn't do much, you don't need to mysql_real_escape_string() a number, and I made 2 files into 1...and just cleaned up bits of the code Good job Quote
Maniak Posted April 7, 2010 Author Posted April 7, 2010 Thank you for that Equinox; i'll update the post shortly :) Quote
Djkanna Posted April 7, 2010 Posted April 7, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Wonder what would happen if I clicked Buy.... Quote
Maniak Posted April 7, 2010 Author Posted April 7, 2010 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I'm just about to put it on my XAMPP Server and test it. I did notice that earlier (Equinox updated the script, so it is his fault :P lol). Quote
Maniak Posted April 7, 2010 Author Posted April 7, 2010 I've updated the 1st post. It was missing the 'Buy' in the Array; and also a } before ?> All should work well now. Quote
Equinox Posted April 7, 2010 Posted April 7, 2010 Just to note, I didn't add the whitelist array, I didn't add much to the code at all, I removed mysql_real_escape_string() from a query as it was a number and I done a few checks like The OP had You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and I changed it to You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ...thinks like that -.- I also added a function for the Buy() is he was doing it in 2 pages when it could be done in 1 =] Quote
AlabamaHit Posted April 8, 2010 Posted April 8, 2010 you don't need to use both of these. This is one option. It of course checks if there is an action and if it is a string. if it is. it removes spaces from it. if is not it redirects to index. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. The other is This of course is an array. If get is not in array. you don't access page. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You only need one of the two. You are basicaly doing the same thing twice. Also, you really don't need either of them This only stops and attack if they use GET action. they can change the word action and do an attack. I don't use either of them. Just make sure rest of page is secure from quick look it does look good. Quote
Maniak Posted April 9, 2010 Author Posted April 9, 2010 Okay, AlabamaHit! Thank you for letting me know XD Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.