converted to php for reuse of headers. also added search page