That looks fine to me. And the code that you saw on your index was a basic uploader. Usually when you see something like that, it's because they use an exploit to inject malicious code into your templates, which they then use to upload a shell. Shells give them access to everything; database, your filesystem, etc.







