ad_page_contract { This page will accect a link_id, mail_job_id and user_id and will record the clickthrough before redirecting to the designated url. } { } if ![regexp {^([0-9]+)\.([0-9]+)\.([0-9]+)$} [ad_conn path_info] match link_id mail_id user_id] { ad_return_warning "Invalid Link" [subst { We could not find this link. This probably means that the link you have clicked is broken.
We are sorry for this inconvenience. }] return } set current_user_id [ad_conn user_id] if {![empty_string_p $current_user_id] && ($current_user_id > 0)} { # if user is logged in, user that user-id to record the click set user_id $current_user_id } mail_link::click -link_id $link_id -mail_id $mail_id -user_id $user_id set url [mail_link::get_link_url -link_id $link_id] ad_returnredirect $url