list<Opportunity> Opportunitylist = [Select (Select OpportunityId From OpportunityContactRoles) From Opportunity where id in (Select OpportunityId From OpportunityContactRole where ContactId != 'contact_id_from_url')];
You can use the above query to get the opportunity records. Add any opportunity fields you want to retreive. Replace the contact_id_from_url with parsed value
As contact will be a parent to Opportunity, there will be many Opportunity records related to Contact. You would need to set this id to a temporary id variable and then query to get all the related opportunity records.
Try below query.
Regards,
Naveen
http://www.autorabit.com