index.php unfucking

I can't believe I wrote this ugly mess.