Location: PHPKode > projects > TLD Manager > tldmgr/user_new.php
<?
if ($_COOKIE["ID"]) {
	include("include/verify.php");
} else {
	include("include/config.php");
} 
mysql_connect($db_host,$db_user,$db_pass);
@mysql_select_db($db_name) or die( "Unable to select database \"$db_name @ $db_host\"");

$result = mysql_query("SELECT * FROM user WHERE lastIP='" . GetHostByName($REMOTE_ADDR) . "' AND level=0");
if (mysql_numrows($result) > 0) {
  for ($c=0; $c < mysql_numrows($result); $c++) {
  	$created=mysql_result($result,0,"created");
  	// if time created is within 24 hours, send to error page
  	
  }
}
?><html>
<head>
	<title>Create New User</title>
	<link type="text/css" rel="stylesheet" href="domain.css">
	<meta http-equiv="refresh" content="<? echo $login_expires+1; ?>">
	<script>function focus(){document.frm.name.focus();}</script>
</head>

<body onload=focus()>
<form name=frm method="post" action="user_create.php">
<input type="hidden" name="user_nick" value="<? echo $user_nick; ?>">
<?
	switch($fail) {
	case "nick":
		$ERR = "Username is invalid or already in use";
		break;
	case "pass":
		$ERR = "Passwords do not match";
		break;
	case "badpass":
		$ERR = "Password cannot be blank";
		break;
	}

	$HEAD = "New&nbsp;User";
	$FOOT[0] = "type='submit' value='OK'";
	if ($user_nick) {
		$FOOT[1] = "type='button' value='CANCEL' onclick='location.href=\"user_pick.php\"' style='border-left: 8px solid #808080;'";
	}
	$FORM = TRUE;
	include("header.php");
?>

					<table width=100% cellspacing=0 cellpadding=3 class="form">
						<tr>
							<td align="right">Real Name:&nbsp;</td>
							<td><input name=name type="text" size="25" value="<? echo $name; ?>"></td>
						</tr>
						<tr>
							<td align="right">Username:&nbsp;</td>
							<td><input name=nick type="text" size="25" value="<? echo $nick; ?>"></td>
						</tr>
						<tr><td height=12>&nbsp;</td></tr>
						<tr>
							<td align="right">Password:&nbsp;</td>
							<td><input name=passwd type="password" size="25" value=""></td>
						</tr>
						<tr>
							<td align="right">Confirm&nbsp;Password:&nbsp;</td>
							<td><input name=passwd2 type="password" size="25" value=""></td>
						</tr>
						<tr><td height=12>&nbsp;</td></tr>
						<tr>
							<td align="right">Email&nbsp;Address:&nbsp;</td>
							<td><input name=email type="text" size="25" value="<? echo $email; ?>"></td>
						</tr>
					</table>

<? include("footer.php"); ?>
Return current item: TLD Manager