Loading time optimised

Now the Database is queried instead of bugzilla. Bugzilla is only queried when the code is run in cron mode. This improves the load time of the page. Please do have a look. 

Thank you.