Location: PHPKode > scripts > Noostr > style/default/login.php
<?php defined('SYSPATH') OR die('No direct access to this file is allowed.');
show_header();

show_content();
?>
<!-- Login Form -->
<?php if(!$ns->user['loggedin']) { ?>
<form name="loginform" id="loginform" action="<?php echo $ns->site['referrer']; ?>" method="post">
	<fieldset>
		<legend>Login</legend>
		<dl>
			<dt><label for="loginname">Login:</label></dt>
			<dd><input name="loginname" id="loginname" type="text" value="<?php echo $formfields['loginname']; ?>" /></dd>
			<dt><label for="password">Password:</label></dt>
			<dd><input name="password" id="password" type="password" /></dd>
		</dl>
		<input name="type" type="hidden" value="login" /><input name="check1" id="check1" type="hidden" value="<?php echo createuid(32); ?>" /><input name="check2" id="check2" type="hidden" value="<?php echo createuid(32); ?>" /><input name="next" type="hidden" value="<?php echo $ns->site['referrer']; ?>" />
		<input type="submit" name="submit" value="Login!">
	</fieldset>
</form>
<?php	if(has_right('signUp')) { ?>
<form name="signupform" id="signupform" action="<?php echo $ns->site['referrer']; ?>" method="post">
	<fieldset>
		<legend>Sign Up</legend>
		<dl>
			<dt><label for="signupname">Login:</label></dt>
			<dd><input name="signupname" id="signupname" type="text" value="<?php echo $formfields['signupname']; ?>" /></dd>
			<dt><label for="signuppass">Password:</label></dt>
			<dd><input name="signuppass" id="signuppass" type="password" /></dd>
			<dt><label for="signuppass2">Again:</label></dt>
			<dd><input name="signuppass2" id="signuppass2" type="password" /></dd>
		</dl>
		<input name="type" type="hidden" value="signup" /><input name="signup1" id="signup1" type="hidden" value="<?php echo createuid(32); ?>" /><input name="signup2" id="signup2" type="hidden" value="<?php echo createuid(32); ?>" /><input name="next" type="hidden" value="<?php echo $ns->site['referrer']; ?>" />
		<input type="submit" name="submit" value="Sign Up!">
	</fieldset>
</form>
<?php
	}
} else {
	if ($ns->site['referrer'] == '') {
?>
<p>Do you want to <a href="/logout">log out</a>?</p>
<?php
	} else {
?>
<p><a href="<?php echo $ns->site['referrer']; ?>">Back to the previous page.</a></p>
<?php
	}
} ?>
<!-- // Login Form -->
<?php
show_footer();
Return current item: Noostr