Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/users/adduser.php
<?php
 /*     This file is used to display all cards that have been created
	It is expected that in production, this feature will be rather
	useless because of the number of accounts that will build up
	over time.  Some sort of method for clearing old accounts will
	need to be implemented.  For now, AllCards is the first step
	in building a reporting system.

	This file C. Carl H. Peterson 2004 and released under the GPL.
	If you didn't get a copy of the GPL with this, do a search for
	GPL and find it your self.  Remember, I copyrighted this so if
	you are using it you better have a license to use it.  GPl 
	works for me.
*/

	printf('<form  name="center"  action="phpmyprepaid.php" method="post">');
    echo '<hr>';
echo "<p class=\"information\">Add user information :</p>";
    echo '<hr><br>';
?>
<table border="4" align="center" cellpadding="0" cellspacing="0" width="500">
<tr>
									<td class="bpcell"><? echo $lang['u_name']; ?><font color='red'>*</font></td>
									<td> <input name="user[user_lastname]" type="text" value='' size="30"></td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_lastname']; ?><font color='red'>*</font></td>
									<td><input name="user[user_firstname]" type="text" value='' size="20"></td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_login']; ?><font color='red'>*</font></td>
									<td><input name="user[user_alias]" type="text" value='' size="20"></td>
								</tr>
								<tr>
									<td  class="bpcell"><? echo $lang['u_passwd']; ?><font color='red'>*</font></td>
									<td><input name="user[user_passwd]" type="password" value='' size="12"></td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_ppasswd']; ?><font color='red'>*</font></td>
									<td><input name="user[user_ppasswd]" type="password" value='' size="12"></td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_email']; ?><font color='red'>*</font></td>
									<td><input name="user[user_mail]" type="text" value='' size="30"></td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_lang']; ?><font color='red'>*</font></td>
									<td>
									<select name="user[user_lang]">
									<?
									print "<option>" . $oreon->user->get_lang() . "</option>";
									$chemintotal = "./lang/";
									if ($handle  = opendir($chemintotal))	{
										while ($file = readdir($handle))	{
											if(!is_dir("$chemintotal/$file") && strcmp($file, "index.php")) {
												$tab = split('\.', $file);
												if (strcmp($oreon->user->get_lang(), $tab[0]))
													print "<option>" . $tab[0] . "</option>";
											}
										}
										closedir($handle);
									}
									?>
									</select>
									</td>
								</tr>
								<tr>
									<td class="bpcell"><? echo $lang['u_status']; ?><font color='red'>*</font></td>
									<td>
	<select name="user[user_status]">
<option value='1'><? echo $lang['u_user']; ?></option>
<?if ($oreon->user->get_status()=='3' or $oreon->user->get_status()=='2' ) 
echo "<option value='2'>".$lang['u_administrator']."</option>";
if ($oreon->user->get_status()=='3') 
	echo "<option value='3'>".$lang['u_sadministrator']."</option>";
?>
										</select>
									</td>
								</tr>
					<?	  
					$result = getLocationName($oreon->user);

					echo('<tr><td class="bpcell" >User default location :</td>');
					echo('<td>');
					echo('<select name="user[user_location]">');
        while ($row = $oreon->database->database->fetch_object($result))
        echo ("<option value=\"".$row->ID."\">".$row->LocationName."</option>");
        echo('</select></td></tr>');	
?>	
					
								<tr>
									<td colspan="2" align="center">
	<input type="hidden" name="buttonID" value="AddUser">
	<input type="submit" name="submit" class="smallButton" value="Add user"></td>
								</tr>
							</table>
				</form>
			</td>
		</tr>
	</table>
Return current item: phpMyPrepaid