I have few comments ...
1st: This script works ONLY if you are using encypted passwords for your server
If you are NOT using encryption on the acc passwords it will not work for your server...
2nd: It is very UNSECURE since your password for the SQL is not encrypted and can be fetched easyly
3rd: When someone stoles your password the first thing to to is change you r the password he has with something else ... meaning there is no security test... and this renderes this page not USELESS but BIGGER pain in the a$$
I'm doing some modifications right now ... will post them latter