Thats a very big script you are looking for! I'm not aware of any existing systems that would do all of that, although you might be able to edit something like PHPNuke.
Probably the best way to get it to work how you want is to write it yourself. You can find PHP and Mysql tutorials at:
http://www.freewebmasterhelp.com/tutorials/php/
http://www.freewebmasterhelp.com/tutorials/phpmysql/
Just a few pointeres from what you have put so far.
You should have a users table with at least the following in it:
username, password, realname, e-mail, level
Encrypt the user's password using md5.
Set the default level to 25
On your site pages, include a login script (there is a good article on Sitepoint about how to do this), and simply echo the realname to the user if they are logged in.
For mail, assuming this is a PM-style system and not external mail, store each message in a table:
id, user, subject, from, body, read
and set read to 0 by default. When the user opens the message set read to 1. Now you can simply:
select id from emails where read = 0 and user='username'
to get the number of new e-mails and
select id from emails where user='username'
to get the total.
For permissions for links, if there are a lot of links put them in a database with a 'minimumuserlevel' field, if not simply use if statements:
PHP Code:
if userlevel>80 {
display the link
}
For signup verification by e-mail, add a field to your users database called confirm.
When a user signs up, generate a random number (or string) and store it in this field. Then e-mail the same string to the user. When they get the e-mail there should be a link pointing them to a page where they enter the string and their e-mail (or username). Simply authenticate this against the users table and if they match, update it to have confirm as blank. Only let users log in if the confirm field is blank.
If you have any other questions, don't hesitate to ask.