Somehow you managed to demote the only admin account, despite the safeguards in place to prevent it. I don't remember ever seeing that before. I'd be curious to know how you did it, and why.
Option 1
If you've enabled root logins, log in as root and promote the other user to an admin.
Option 2
Boot from your recovery partition (command-R at startup) and restore your system from the last Time Machine snapshot taken before the damage was done, if you know when that was.
Option 3
Back up all data, then boot in single-user mode. When the text stops scrolling, follow the prompts to make the boot volume writable. Then enter the following command:
ls /var/db/.AppleSetupDone
You should get the following line of output below what you entered:
/var/db/.AppleSetupDone
If you do, then very carefully enter the following command:
rm !$
Now you should get no output. Then enter
reboot
The system will boot into the Setup Assistant, as if you were setting it up for the first time. Create a user with the same name as the old admin user. Log in and test. I'm not sure what will happen to your other user accounts, if any. You may need to recreate them.