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)
-   -   Donation System Problem (http://www.mysidiaadoptables.com/forum/showthread.php?t=2161)

Zampher 05-19-2011 11:48 AM

Donation System Problem
 
First of all I want to clarify that I am using the google translator, so I might not express correctly because I do not speak English (I'm Spanish)
The problem with the donation system is that if I enter an amount of money that I haven`t anyway reaches the user who I send it.
Example:
I have only $100, but I donated $10000 to X, the other user (X) will get $10000. Also happens with negative numbers.

I hope you understand the problem
Thank you very much and best regards

PS: Im using the version 1.2.2

Kaeliah 05-19-2011 12:13 PM

Seems someone forgot to add a check to be sure that the amount being sent isn't more than the user has. x.x

Zampher 05-19-2011 01:54 PM

Well experiencing some can resolve the problem that you can donate more than you have (I should clarify that I am not a programmer, not absolutely nothing about programming and what I did was rather a bit of "deduction"). Only a conditional solves that problem, but not that of the negative numbers.

Search:
Code:

if($_POST)
And add above
Code:

if($amount < $money){
Then Search:
Code:

else
{
        $article_title = $accden;
        $article_content = $reqlogin;
}

And replace with:
Code:

else
{
        $article_title = $accden;
        $article_content = "No puedes donar mas de lo que tienes";
}

}


Hall of Famer 05-19-2011 03:24 PM

Well its not that hard to fix, I make sure the bug does not exist in next release. All you have to do is to add a check point which prevent execution of the donation script if the user does not have enough money left.


All times are GMT -5. The time now is 10:01 AM.

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