if(($question['type']=='Q')&&(($parent['type']=='Q')||($parent['type']=='A'))&&($status==QA_POST_STATUS_NORMAL))// only index if none of the things it depends on are hidden or queued
setcookie('qa_key',$_COOKIE['qa_key'],time()+2*QA_FORM_EXPIRY_SECS,'/',QA_COOKIE_DOMAIN,(bool)ini_get('session.cookie_secure'),true);// extend on every page request
returnsha1($salt.'/'.$action.'/'.$timestamp.'/'.@$_COOKIE['qa_key']);// lower security for non logged in users - code+cookie can be transferred
setcookie('qa_key',$_COOKIE['qa_key'],time()+2*QA_FORM_EXPIRY_SECS,'/',QA_COOKIE_DOMAIN,(bool)ini_get('session.cookie_secure'),true);// extend on every page request
}
}
functionqa_get_form_security_code($action)
/*
Return the full form security (anti-CSRF protection) code for an $action (any string) performed within