Hi there,
I work in a school that gives detention (I know, big shock).
Anyways, the system is a bit...outdated...and I am trying to bring it up to the 20th century. I mean, they are still using a pen and paper....
Basically, teacher gives detention, it gets entered into a pc (spreadsheet), (this part is ok), but when a student goes to sit, he "checks in" on a sheet (writes his name), and then when done, he "checks out" (writes the time he leaves). Then the sheet is re-entered into the system and adjustments made.

What we want is something:
1) Teacher enters time.
2) Students goes to a PC, checks in via a webpage - He logs in (AD Integration is a plus) and hits the "I'm checked in" button.
3) When done, Student hits the check out button.
4) System auto-calculates how much detention is left for that student. Maybe he can even see the number in real time.

There are some unique requirements:

1) Must be self hostable in a closed environment.
2) Must have some sort of idle timeout.
3) Teacher must be able to see who is currently "sitting" at any given time (so he can check) and what time the person started.
4) Ability to prevent certain students from using this system. AD group is a plus.

A bonus:
Ability to set times a person is allowed to sit, i.e. only between 1-7.

I don't care if it is php based, java based, etc. Even a windows application.

Does anyone know of such a script?