[Guide] Remove WebShop Resets Bug

eXTenTioN

New Member
Joined
Jul 13, 2009
Messages
557
Reaction score
149
This is One Simple and easy to make guide

You Know The Bug With The WebShop Resets ^^
When you write 1+9 resets in to the get resets module it gives you 10 resets on the price of one ^^
Well The Guide Is Very Simple ^^

Go To the WebShop Open Folder WebShop than Modules and open the file
Resets.php

There Search For This Line
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="3" value=0 size="1" onKeyPress="updatest();"></td>
Change It To
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="2" value=0 size="1" onKeyPress="updatest();"></td>
And You Are Readdy

Just Put the maxlenght from 3 to 2 and you are readdy :D:
 
  • Like
Reactions: heda
Това бях го направил доста отдавна! (но не съм го споделял) Все пак браво за урока 10/10 ;]
 
Е е и с tamper data, няма ли да може да се напишат колкото реса искаш?
 
аз ви препоръчвам Get Resets,Get Points да си махнете от уеб магазина
 
Е е и с tamper data, няма ли да може да се напишат колкото реса искаш?

аз казвам какъв е наи лесния начин :) пък и едва ли някои ще тругне да аддва повече от 99 реса (think)
 
Това с maxLength няма да помогне, май с опера можеше да се cross-не... (chuckle)(chuckle)(chuckle)(chuckle)
 
This is One Simple and easy to make guide

You Know The Bug With The WebShop Resets ^^
When you write 1+9 resets in to the get resets module it gives you 10 resets on the price of one ^^
Well The Guide Is Very Simple ^^

Go To the WebShop Open Folder WebShop than Modules and open the file
Resets.php

There Search For This Line
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="3" value=0 size="1" onKeyPress="updatest();"></td>
Change It To
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="2" value=0 size="1" onKeyPress="updatest();"></td>
And You Are Readdy

Just Put the maxlenght from 3 to 2 and you are readdy :D:

This is a simple and easy guide- how to remove the 'Get Resets bug.

Do you know the bug with the webshop module called 'Get Resets' ?
Example: When you write '1+9' in the text area of the 'Get Resets' module it gives you 10 resets on the price of one.

Well the fix/guide is very simple:
Go to your WebShop folder , then open the second folder called 'modules' and search in it for file 'resets.php'.

Then search for this line:
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="3" value=0 size="1" onKeyPress="updatest();"></td>
and replace it with:
Code:
	Enter Reset Count<br><input name="resets"  id="resets" maxlength="2" value=0 size="1" onKeyPress="updatest();"></td>

& u're ready !

::)
 
PHP:
if (@$_POST['character'] && $_POST['resets']) {
	print '	<fieldset style="width: 300px;">';
		$increase_resets	= $_POST['resets'];
		$get_resets=mssql_fetch_row(mssql_query("select resets from character where name='$_POST[character]'"));
		switch($increase_resets) {
			case eregi("[^0-9.]", $increase_resets):
				$legtitle = "Error";
				$content = "Use only numbers!";
				break;
			case $increase_resets<1: 
				$legtitle	= "Error";
				$content	= phrase_invalid_res;
				break;
			case $increase_resets*$webshop['credits']['reset']>$mycreds: 
				$legtitle	= "Error";
				$content	= phrase_lack_credits;
				break;
			default:
				$query	= mssql_query("select count(*) from [Character] where [Name]='".secure($_POST['character'])."'");
				$res	= mssql_fetch_row($query);
				if ($res[0]!=1) {
					$legtitle	= "Error";
					$content	= phrase_nosuch_char;
					break;
				}
				if ($increase_resets+$get_resets[0]>999) {
					$legtitle	= "Error";
					$content	= 'You cannot buy more than 999 resets!';
					break;
				}
				shoplog("Bough ".$increase_resets." reset(s) for ".$_POST['character']." for ".($increase_resets*$webshop['credits']['reset'])." credits");
				mssql_query("

Това е част от модула в webshop-а който ползвам. Обърнете внимание на
PHP:
case eregi("[^0-9.]", $increase_resets): 
                $legtitle = "Error"; 
                $content = "Use only numbers!"; 
                break;
Това е най-доброто и лесно решение на проблема. Това което вие сте предложили тук като решение лесно може да бъде едитнато като например с адона firebug за firefox.