More lib-ification. These scripts now all use libdb for their database access.
Some minor cleanup/commenting as well. Also, a few more access checks. Only admins are able to run 'inuse' (to prevent users from seeing each other's experiments.) You are also only allowed to run tbreport for experiments in projects that you are trusted by.
Showing with 148 additions and 115 deletions