I know how it can be done. I am in the process of writing a CMS, and I am making it open source so people can edit it, and use it for their own good. It is currently written in PHP and MySQL.
However because it is not finished completly I am not going to make it available until it is ready.
If you want a hand PM me. A good idae is to follow tutorials on the net!