I often thought of writing my own control panel (I am a programmer) but the am ount of effort involved is just way too much. If your needs are modest, then it might not be usuch a bad idea, but to do something as complex as cpanel, interworx or direct admin for example would take one person years from scratch.
Instead, I would consider looking into
http://www.web-cp.net which is a nice looking open source panel (much easier to use than webmin). The good thing about this particulr panel is that all userdata is stored in a mysql database (as is information on vhosts, DNS records, email accounts etc) and it allows you to use a veriaty of differant programs together, such as you can use powerdns if you like, or bind if you must (bind is probably the biggest security risc now that sendmail doesn't install as an open relay).