
            global $rlXajax, $config, $listing_data, $account_info;

            if ( $config['rating_module'] )
            {
                if ( !$config['rating_prevent_owner'] || ($config['rating_prevent_owner'] && $config['rating_prevent_owner'] && $listing_data['Account_ID'] != $account_info['ID']) )
                {
                    $GLOBALS['reefless'] -> loadClass('Rating', null, 'rating');
                    $rlXajax -> registerFunction( array( 'rate', $GLOBALS['rlRating'], 'ajaxRate' ) );
                }

                global $listing_data;
                $GLOBALS['rlSmarty'] -> assign_by_ref('listing_data', $listing_data);

                $voted = explode(',', $_COOKIE['rating']);
                if ( in_array( $listing_data['ID'], $voted ) )
                {
                    $GLOBALS['rlSmarty'] -> assign('rating_denied', 'true');
                }
            }
        