Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Can offer negative money on trades (http://www.mysidiaadoptables.com/forum/showthread.php?t=2046)

tittlemouse 03-24-2011 10:03 AM

Can offer negative money on trades
 
I tested this out on this site
http://dragonsfarm.host56.com/

It is using the latest version of the Mysidia script
You can send someone a offer of a pet for -999999999 from the trades page. The person accepting loses the money.

I made 2 accounts 1 named tittlemouse the other named avfctom
I send a offer of -999999999 tittlemouse from avfctom and accepted it and I got this.

On tittlemouse
You have -999996999 Dragon Yen.

Your links:
ADOPT NEW PETS
ACQUIRE POUNDED PETS
MANAGE ADOPTABLES

fadillzzz 03-24-2011 10:08 AM

Seems like people always forgot to filter the (-) minus sign.
Anyway, I think this should fix the problem.
Open your trade.php
find this code
PHP Code:

$adoptwanted $_POST["adoptwanted"];
$adoptgiven $_POST["adoptgiven"];
$cashgiven $_POST["cashgiven"];
$message $_POST["message"]; 

Just below that, add
PHP Code:

$cashgiven abs($cashgiven); 


Hall of Famer 03-24-2011 10:09 AM

umm I see, add this line after if($cashenabled == "yes")[

PHP Code:

$cashgiven abs($cashgiven); 

Lemme know if it solves your problem or not.

@Fadillzzz: Another possible way to fix this issue is to generate an error message when negative amount is entered.

tittlemouse 03-24-2011 10:11 AM

I don't know since that is not my site buy hopefully the owner of it will log on later and be able to see if that works.

fadillzzz 03-24-2011 10:23 AM

@HoF
Yeah. That should works too.

RoconzaArt 03-24-2011 10:27 AM

How do i fix this for mytrades.php too? Is it the same way?

fadillzzz 03-24-2011 10:31 AM

For mytrades.php
After this
PHP Code:

$tid $_POST["tid"];
$petoffered $_POST["petoffered"];
$tradewith $_POST["tradewith"];
$petrequested $_POST["petrequested"];
$moneyoffered $_POST["moneyoffered"];
$trademessage $_POST["trademessage"]; 

Add
PHP Code:

$moneyoffered abs($moneyoffered); 


RoconzaArt 03-24-2011 10:34 AM

Ok I'll try testing it.


All times are GMT -5. The time now is 06:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.