PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/halogy/application/modules/halogy/views/login.php

https://bitbucket.org/haloweb/halogy-1.0/
PHP | 44 lines | 31 code | 13 blank | 0 comment | 3 complexity | 4577670f34d4f2eb5217ed4218596c38 MD5 | raw file
 1<?php
 2	if(!$this->session->userdata('session_admin')) {
 3?>
 4
 5	<script type="text/javascript">
 6	$(function(){
 7		$('#username').focus();
 8	});
 9	</script>
10
11	<h1>Login</h1>
12	
13	<?php if ($errors = validation_errors()): ?>
14		<div class="error">
15			<?php echo $errors; ?>
16		</div>
17	<?php endif; ?>
18	
19	<form action="" method="post" class="default">
20					
21		<label for="username">Username:</label>
22		<input type="text" id="username" name="username" class="formelement" />
23
24		<br class="clear" />
25	
26		<label for="password">Password:</label>
27		<input type="password" id="password" name="password" class="formelement" />
28
29		<br class="clear" /><br />
30		<input type="submit" id="login" name="login" value="Login" class="button nolabel" />
31	
32	</form>
33
34<?php
35	} else {
36?>
37
38	<h1>Logout</h1>
39
40	<p><a href="/login/logout/">Click here to logout.</a></p>
41	
42<?php
43	}
44?>