I'll just post what I have in my functions.php script
Code:
function secure($data, $key = NULL) {
//This function performs security checks on all incoming form data
if ($key === 'orderaid')
{
//var_dump($data); var_dump($key); die;
foreach($data as $dataKey => $dataVal)
{
$data[$dataKey] = abs(intval($dataVal));
}
//var_dump($data);die;
return $data;
}
if(is_array($data)) {
die("Hacking Attempt!");
}
$data = htmlentities($data);
$data = strip_tags($data, '');
return $data;
}
And the ajax_sort file needs to be replaced also:
about line 23:
Code:
$adopts->query('REPLACE INTO ' . $prefix . 'sort_adoptables (`user_id`, `adoptable_id`, `sorting_id`)
VALUES ("' . addslashes($userID) . '", "' . addslashes($aid) . '", "' . addslashes($orderID) . '")');