0){ $wispfaqlogin=$yourusername[0]; } } if(!isset($mode)){$mode="newuser";} if($mode=="newuser"){ include("header.html"); print("

Register

You may register as a WISPFAQ contributor by completing the form below. Once you have registered, you may login from any page by entering your username and password at the space provided in the left hand column. If you have forgotten your username or password, please click here.

Select a Username:
Select an Alternate Username:
Select a Password:
Confirm Password:
Enter your Name:
Enter your Email Address:
"); } if($mode=="checkuser"){ if($numrows>0){ SetCookie("wispfaqlogin","$yourusername[0]",time()+40000000,"/",".muninetworks.com",0); include("header.html"); print("

Welcome back $name[0]

You may now submit FAQs to the list or edit your previously posted FAQs.

"); }else{ include("header.html"); print("

Sorry but we could not find a match for that username and password. You can try to login again,
or your can Register

"); } } if($mode=="createuser"){ if($name=="" || $username == ""|| $password == ""|| $email == ""|| $username2 == "" || $password2 == "") { include("header.html"); print("
The Following Fields Are Required

"); if($name=="") print("Name
"); if($username=="") print("Username
"); if($username2=="") print("Alternate Username
"); if($password=="") print("Password
"); if($password2=="") print("Confirmed Password
"); if($email=="") print("Email address
"); print("
Please go back and fill in the missing information and resubmit the form
"); include("footer.html"); exit; } if($password==$password2){ $sql="select username as username1 from users where username='$username'"; include($path_to_mysql); $numrows=sizeof($username1); if($numrows==0){ $sql="insert into users (username, password, name, email, active) values('$username', '$password', '$name', '$email', 'y')"; include($path_to_mysql); SetCookie("wispfaqlogin","$username",time()+40000000,"/",".muninetworks.com",0); include("header.html"); print("You are now registered with a username of '$username' You may submit new FAQs to the list"); $message="Your wispfaq login is $username and password is $password\n\n"; mail("$email", "WispFAQ login information", $message,"From:admin@muninetworks.com"); include("footer.html"); exit; }else{ $sql="select username as username3 from users where username='$username2'"; include($path_to_mysql); $numrows2=sizeof($username3); if($numrows2==0){ $sql="insert into users (username, password, name, email, active) values('$username2', '$password', '$name', '$email', 'y')"; include($path_to_mysql); SetCookie("wispfaqlogin","$username2",time()+40000000,"/",".muninetworks.com",0); include("header.html"); print("You are now registered with a username of '$username2'. You may submit new FAQs to the list"); $message="Your wispfaq login is $username2 and password is $password\n\n"; mail("$email", "WispFAQ login information", $message,"From:admin@muninetworks.com"); include("footer.html"); exit; }else{ print("Sorry, but both those usernames are already in use, please go back and select another."); include("footer.html"); exit; } } }else{ include("header.html"); print("Sorry, but your password could not be confirmed, please go back and refill in your password


"); } } include("footer.html"); ?>