Need Member-script
This might look like a huge project, but it isn’t. I just like to explain exactly what I need.
I need a simple member-script written. The script should only be written in PHP5 and HTML. No javascripts, CSS or anything else.
I’m going to finish the PHP-script myself but I need some of the script and the functions written.
The PHP-script must be well written and protected against SQL-injections and other kind of hacking.
All functions should be in a separate file and should be included in other PHP-files.
Features needed:
* Visitors can register a new member-account (with username, password and email). Passwords should be encoded with MD5.
Only A-Z and 0-9 should be valid in the Username and Password, no special letters like !£€{[* and so on.
Both the username and password must be at least 5 letters long.
The register-form should use CAPTCHA. And the account must be activated by clicking a link in a email that is sent to the user.
* Every time a user logs in or register a account, his IP should be stored in the database. And when a user tries to create a new account the script should check
if his IP is already in the database. If it is, the user should NOT be able to create a account.
The script should also check if the email already exist in the database, if it does then the user shouldn’t be able to create the new account.
* Reset function for the password. It should work like this: send a email to the user, the user clicks on a URL and can change his password without having to log in)
This function have to be written in a secure way so hackers just cant guess the reset-URL and change passwords.
* There should be a “credit”-table in the database for each member, new accounts start with a credit of “2”. I want to be able to change the “start-credit” in the admin-panel.
* Admin-panel for me (I should be able to edit members info, search for users, display all users (50 users per page),change members credits, delete members)
* A function for adding credits to accounts. The function should be called “PlusCredit” and if I want to add 4 credits to the user named “Eric1”
then I use this in the PHP-script: PlusCredit(“Eric1”, “4”);
or something similar. I also need to be able to remove credits like this: MinusCredit(“Eric1″ ,”2”); (This will remove 2 credits from “Eric1” account)
* Need to be able to show credits like this: echo ShowCredits(“Eric1”); (This function should only show the number of credits the user got, nothing else.)
* All users should have a extra field in the table, this field will be used by the scripts I will make myself. The field should be called “Campaigns” and
it need to be able to store a unknown amount of TEXT. It can be anywhere between 20 to 300,000 letters.
* A message-function. I want to be able to add small messages to users accounts. Example PHP: AddMessage(“Eric1”, “2 Credits added to your account.”)
And I must be able to show messages: ShowMessage(“Eric1″ ,”10”)
This will show the last 10 messages the user “Eric1” got. With “<br>” after each message.
* Instead of always typing the username in the PHP-functions I would be able to have a function that does it for me.
Example: AddMessage(ActiveUser, “2 Credits added to your account.”) – So ActiveUser is the user who is logged in.