%%generic-createmember-anonymous-html%%
$Date: 2003/04/29 23:15:48 $

%%preprocess%%
$postvars= $_POST;
if ($postvars[email]!="") {
	if ($site->public) {
		$session->insertstatus= "posted";
		}
	if ($session->membercreate()) {
		if ($session->loginprocess()) {
			if ($_GET['return']=="") $newlocation= "$_SERVER[SCRIPT_NAME]/".$session->request->path."?method=view$session->cgi";
			else $newlocation= $_GET['return'];
			header("Location: $newlocation");
			exit;
			}
		print "Error: Created, but not logged-in.";
		exit;
		}
	}

if (!$site->public) {
	$session->message= "<span style='color: red;'>This site is not public,</span> so your membership application will need to be approved by the site administrator before it will take effect.";
	}
//else $session->message= "hello world";
	
if ($site->p_privacyPolicy!="") $this->privacyPolicy= "<a href='$site->p_privacyPolicy' target='_blank'>Please read our <b>Privacy Policy</b>.</a>";
if ($site->p_memberMessage!="") $this->memberMessage= "<blockquote>".bHtml($site->p_memberMessage)."<br/>&nbsp;</blockquote>";

// always show nullobject
$this->showNull=1;

%%header%%

%%css%%

%%template%%

%%listrow%%

%%nullobject%%
<form method='post' action='?method=createmember$session->cgi' class='.form'>
<table class='editTable'>
	<tr>
		<td colspan=2><b>Create a membership:</b> $this->memberMessage</td>
	</tr>
	<tr>
		<td colspan=2>$session->message</td>
	</tr>
	<tr>
		<td align='right' valign='top'>your&nbsp;name:</td>
		<td valign='top'>
			<input type='text' name='name' size='42' maxlength='255' value="$sitemember->name" />
			<input type='hidden' name='status' value='posted' />
			<input type='hidden' name='rank' value='100' />
			<input type='hidden' name='public' value='0' />
		</td>
	</tr>
	<tr>
		<td align='right' valign='top'>your&nbsp;email:</td>
		<td valign='top'><input type='text' name='email' size='42' maxlength='255' value="$sitemember->email" /></td>
	</tr>
	<tr>
		<td align='right' valign='top'>password:</td>
		<td valign='top'><input type='text' name='password' size='42' maxlength='255' value="$sitemember->password" /></td>
	</tr>
	<tr>
		<td align='right' valign='top'>password&nbsp;hint:</td>
		<td valign='top'>
			<input type='text' name='hint' size='42' maxlength='255' value="$sitemember->hint" />
			<br />(optional) if your forget your password, this hint will be sent via email (instead of your actual password) for increased security
		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td><input type='submit' name='Submit' value='create' class='buttonstyle' /></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td>$this->privacyPolicy</td>
	</tr>
</table>
</form>

%%footer%%

%%postprocess%%

%%end of context%%
