Update of /cvsroot/openfirst/members
In directory sc8-pr-cvs1:/tmp/cvs-serv24131
Added Files:
adduser.php nophoto.png
Log Message:
Add adduser functionality to members area.
--- NEW FILE: adduser.php ---
<?php
/*
* openFIRST.members - adduser.php
*
* Copyright (C) 2003,
* openFIRST Project
* Original Author: Tim Ginn <tim...@po...>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
include("../config/globals.php");
include($header);
membersmenu($user->membertype);
if($user->membertype == "administrator") {
if(isset($_POST["team"]) == true) {
$user = $_POST["user"]; $firstname=$_POST["firstname"];
$lastname = $_POST["lastname"];
if($_POST["password"] == $_POST["password2"]) {
$q = mysql_query("INSERT INTO ofirst_members (user, firstname,
lastname, password, membertype, division, year, email, icq, aim, msn,
yim, description, signature, picturelocation, team, dateregistered)
VALUES ('".
$_POST["user"] ."', '" .
$_POST["firstname"] . "',
'" . $_POST["lastname"] . "', '" . cryptpassword($_POST["password"],
$encryption) . "', '" . $_POST["membertype"] ."', '" .
$_POST["division"] . "', '" . $_POST["year"] . "', '" .
$_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] .
"', '" . $_POST["msn"] . "', '". $_POST["yim"] ."', '" .
$_POST["description"] . "', '" . $_POST["signature"] . "', '" .
$_POST["picturelocation"] . "', '" . $_POST["team"] . "', '" .
date("Y-m-d") . "');");
} else {
echo("Password does not match confirm password.");
}
}
?>
<h1>Add Users</h1>
<p>This utility will add users to the members area.</p>
<table>
<form method="post" action="adduser.php">
<tr><td>
Team Number:
</td><td>
<input type="text" name="team" /></td></tr>
<tr><td>
User Name:
</td><td>
<input type="text" name="user" />
</td></tr>
<tr><td>
First Name:
</td><td>
<input type="text" name="firstname" />
</td></tr>
<tr><td>
Last Name:
</td><td>
<input type="text" name="lastname" />
</td></tr>
<tr><td>
Password:
</td><td>
<input type="password" name="password" />
</td></tr>
<tr><td>
Confirm Password:
</td><td>
<input type="password" name="password2" />
</td></tr>
<tr><td>
Member Type:
</td><td>
<select name="membertype">
<option value="administrator">Administrator</option>
<option value="user" selected="selected">User</option>
</select>
</td></tr>
<tr><td>
Division:
</td><td>
<input type="text" name="division" />
</td></tr>
<tr><td>
Year:
</td><td>
<input type="text" name="year" value="<?php echo(date("Y")); ?>" />
</td></tr>
<tr><td>
E-mail:
</td><td>
<input type="text" name="email" />
</td></tr>
<tr><td>
ICQ:
</td><td>
<input type="text" name="icq" />
</td></tr>
<tr><td>
AIM:
</td><td>
<input type="text" name="aim" />
</td></tr>
<tr><td>
MSN:
</td><td>
<input type="text" name="msn" />
</td></tr>
<tr><td>
YIM:
</td><td>
<input type="text" name="yim" />
</td></tr>
<tr><td>
Description:
</td><td>
<textarea name="description">I have not yet updated my profile.</textarea>
</td></tr>
<tr><td>
Signature:
</td><td>
<textarea name="signature">--
Team Member</textarea>
</td></tr>
<tr><td>
Picture Location
</td><td>
<input type="text" name="picture" value="nophoto.png" />
</td></tr>
<tr><td>
<input type="submit" value="Add User" />
<input type="reset" value="Clear Details" />
</td>
</tr>
</form>
</table>
<?php } else {
showlogin();
}
include($footer); ?>
--- NEW FILE: nophoto.png ---
(This appears to be a binary file; contents omitted.)
|