I needed Current Category on product info page and on the footer.phtml files. Because I had custom background set for each Category. So, Below code helped me to find the Current Category in my Magento's phtml file.
I was struggling to export Customer ID (entity_id) for some time. I thought it should be straight forward. But it wasn't, so after googling for a while I found this solution.