Check out this post over at the breakdown showing you how to build a rules processing engine. I am in the process of desiging something simular my self, and i may, depending on time, and some other things, post some code. its posibably not as advanced as the rules engine above, but should (hopefully) do the job.

this is a part 1 in a series of posts. hopefully there will be more of them soon (not this post, the rules engine post).