Testing a text file for username and adjusting a file based on result

I’ll come right out with it, I’m a Windows man and have been for years. However, times (at least at my company) are changing and I need to come up with an imaginative plan as to how I can “encourage” my Mac users to complete their time sheets each day. This is where my lack of Mac scripting skills is letting me down. Essentially, this is what I am trying to accomplish…

Design a script that runs every 5 mins on all Macs in the company.
This script will check a text file stored on a Windows file server for the username of the currently logged on user (the Macs use AD for authentication).
If that user name is found in the text file, the script will do something on the local Mac that forces all attempts to get to any website, to forward to a specific Web page.

Now I know that I can’t drop a wildcard into the hosts file (which was my initial idea) and have been looking at playing with dns zone files but this is starting to seem like overkill so if anyone has any bright ideas on this part, I’d appreciate it.
I’ve (very loosley) knocked up this to give a better idea of what I’m thinking.

if /volume/test_timesheets doesn’t exist then mount it
mount smb://server/folder /volume/test_timesheets

$name=“currently logged on user”
if $name is found in /volume/test_timesheets/list.txt then flush the dns cache - dscacheutil -flushcache and update the hosts file (or similar) to forward all Web requests to the same web page.

I appreciate that this is incredibly basic but hopefully one of you can set me on the road to a solution!

Many thanks for any pointers.