View Single Post
  #51  
Old 03-23-2012, 06:20 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,348
SilverDragonTears is on a distinguished road
Default

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) . '")');
__________________

Check out SilvaTales
Reply With Quote