Jump to content
MakeWebGames

Recommended Posts

Posted

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:

e6t4c3.jpg

2q87v28.jpg

30c4tao.jpg

lxqfa.jpg

(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.

Posted

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.

Posted

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

Posted

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).

Posted

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 =]

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...