implementing download xml button, fixing headers and include path for shared.php