kristhasirah
01-13-2020, 09:47 AM
This is a kind of fix for the adopt.php
First Problem:
If the user use the inspect option they can change the value of the id to anything they want even use the adopt name and the site will give them the adopt. so if you dont know how to code and have to use the default code then we have a small problem.
so to "fix" this, we will place a small code in our adopt.php page:
below of if($mysidia->session->fetch("adopt") != 1 or !$id) throw new InvalidIDException("global_id");
you will paste this:
if($id == '1' || $id >= '3' && $id <='21' || $id == '23'|| $id == '24'|| $id == '25' || $id == '27'|| $id == '28')
throw new InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page...");
if (preg_match('/\D/', $id))throw new InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page...");
the first if is to exlude the shop/promo/wild/limited/exclusive/prize adopt of your site, just replace the ids with the ones of your site. if a user tries to edit the id using one of those will give them an error.
the second if is to exclude all the names, so if the user tries to edit the id of the adopt and put a different adopt name it will give them an error.
Second problem:
the second problem the adopt page presents is when the user adopts a pet they can keep refreshing the page and keep adopting even if they no longer have money if you use money for the adopts.
so to "fix"this just open adoptview.php, in the if($mysidia->input->post("submit")){ search for: return;code and paste this above:
$mysidia->session->terminate("adopt");
First Problem:
If the user use the inspect option they can change the value of the id to anything they want even use the adopt name and the site will give them the adopt. so if you dont know how to code and have to use the default code then we have a small problem.
so to "fix" this, we will place a small code in our adopt.php page:
below of if($mysidia->session->fetch("adopt") != 1 or !$id) throw new InvalidIDException("global_id");
you will paste this:
if($id == '1' || $id >= '3' && $id <='21' || $id == '23'|| $id == '24'|| $id == '25' || $id == '27'|| $id == '28')
throw new InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page...");
if (preg_match('/\D/', $id))throw new InvalidIDException("You are trying to adopt a creature that don't belong in here...<br>If you want this creature please go to to the corresponding page...");
the first if is to exlude the shop/promo/wild/limited/exclusive/prize adopt of your site, just replace the ids with the ones of your site. if a user tries to edit the id using one of those will give them an error.
the second if is to exclude all the names, so if the user tries to edit the id of the adopt and put a different adopt name it will give them an error.
Second problem:
the second problem the adopt page presents is when the user adopts a pet they can keep refreshing the page and keep adopting even if they no longer have money if you use money for the adopts.
so to "fix"this just open adoptview.php, in the if($mysidia->input->post("submit")){ search for: return;code and paste this above:
$mysidia->session->terminate("adopt");