Location: PHPKode > projects > BugIn and Ticketing System > bugin-0.65/inc/signup.inc.php
<?php
if (!$options['signupEnable']) {
	exit;
}

// This displayes the signup screen.	Pretty simple.
function displaySignup($signup) {
	global $options;
	global $verbage;
	global $langList;
	if (isset($signup['errors']['text'])) {
		echo <<<EOT
<font color="{$options[colorErrorText]}">{$signup[errors][text]}</font>

EOT;
	}
	//printVar($signup);
	echo <<<EOT
<form action="{$options[baseURL]}{$options[formSubmitTo]}" method="{$options[formMethod]}">
<input type="hidden" name="area" value="signup">
<input type="hidden" name="action" value="signup">

<table border=2 align="center">
	<tr>
		<td><font color="{$options[colorErrorText]}"></font>{$verbage['sup_des_username']}</td>
		<td><input type="text" size="16" name="signup[uname]" value="{$signup[uname]}"></td>
	</tr>
	<tr>
		<td><font color="{$options[colorErrorText]}">{$signup[errors][pass]}</font>{$verbage['sup_des_password']}</td>
		<td><input type="password" size="16" name="signup[pass]"></td>
	</tr>
	<tr>
		<td><font color="{$options[colorErrorText]}">{$signup[errors][passmatch]}</font>{$verbage['sup_reenter_pwd']}</td>
		<td><input type="password" size="16" name="signup[pass2]"></td>
	</tr>
	<tr>
		<td>{$verbage['sup_fullname']}</td>
		<td><input type="text" size="32" name="signup[fname]" value="{$signup[fname]}"></td>
	</tr>
	<tr>
		<td><font color="{$options['colorErrorText']}">{$signup['errors']['email']}</font>{$verbage['sup_email']}</td>
		<td><input type="text" size="16" name="signup[email]" value="{$signup['email']}"></td>
	</tr>
	<tr>
		<td><font color="{$options['colorErrorText']}">{$signup['errors']['phone']}</font>{$verbage['sup_phone']}</td>
		<td><input type="text" size="16" name="signup['phone']" value="{$signup['phone']}"></td>
	</tr>
	<tr>
		<td><font color="{$options['colorErrorText']}">{$signup['errors']['phone']}</font>{$verbage['sup_phone']}</td>
		<td>
			<select name="signup[lang]">
				$langList
			</select>
		</td>
	</tr>
	<tr>
		<td colspan=2>
			<input type="submit" value="Sign Up">
		</td>
	</tr>
</table>
</form>

EOT;
}

if ($action != "signup") {
	displaySignup($signup);
}
else {

	if ($signup['errors'] = signupUser($signup['uname'], $signup['fname'], $signup['email'], $signup['pass'], $signup['pass2'], $signup['phone'], intval($signup['lang'])) ) {
		displaySignup($signup);
	}
	else {
		include($options['buginIncBase']."login.inc.php");
	}

}

?>
Return current item: BugIn and Ticketing System