login.php 3.49 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
	/**
	 * Elgg UNL CAS authentication login form
	 * 
	 * @package cas_auth_unl
	 * @license http://www1.unl.edu/wdn/wiki/Software_License
	 * @author University of Nebraska-Lincoln
	 * @copyright 2010
	 * @link http://www.unl.edu/
	 */
	 
	global $CONFIG;
?>
14
15

<?php /* 	
16
17
18
19
20
21
22
23
24
25
26
	<div id="login">
		<div class="two_col left">
			<h2 class="sec_main">Students, Faculty, Staff</h2>
			
			<p>If you are a student, faculty or staff member, you already have an account. Use your my.UNL credentials to begin.</p>
			<?php 
				$form_body = '<p class="login-box">';
				$form_body .= '<label>' . elgg_view('input/hidden', array('internalname' => 'usecas', 'value' => 'yes')) . '</label>';
				$form_body .= elgg_view('input/submit', array('value' => elgg_echo('UNL Login'))) . '</p>';
				$ts = time();
				$token = generate_action_token($ts); 
27
				echo elgg_view('input/form', array('body' => $form_body, 'action' => "". $vars['url'] ."action/login?usecas=yes&__elgg_ts='.$ts.'&__elgg_token='.$token"));
28
29
30
31
32
33
34
35
36
37
38
39
40
41
			?>
			<p style="margin-top: 40px;"><a title="Find your my.UNL password" href="https://login.unl.edu/faq/account-resetpw.shtml">Lost your my.UNL password?</a></p>
			
		</div>
		<div class="two_col right">
			<h2 class="sec_main">Huskers Worldwide</h2>
			<?php 
				$form_body = '<p class="login-box"><label>' . elgg_echo('username') . '<br />' . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . '</label><br />';
				$form_body .= '<label>' . elgg_echo('password') . '<br />' . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . '</label><br />';
				$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . '</p>';
				$form_body .= '<p><a href="'. $vars['url'] .'account/register.php">' . elgg_echo('register') . '</a> | <a href="'. $vars['url'] .'account/forgotten_password.php">' . elgg_echo('user:password:lost') . '</a></p>';
				echo elgg_view('input/form', array('body' => $form_body, 'action' => "". $vars['url'] ."action/login"));
			?>
		</div>
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	</div>
*/ ?>

	<div id="login">
		<div class="two_col left">
			<h2 class="sec_main">Students, Faculty, Staff</h2>
			<p>Use your my.UNL Single Sign-on account to begin.</p>
			<?php 
			$ts = time();
			$token = generate_action_token($ts); 
			?>
			<a href="<?php echo $CONFIG->url ?>action/login?usecas=yes&__elgg_ts=<?php echo $ts; ?>&__elgg_token=<?php echo $token; ?>" class="wdn_loginLink"><span>UNL Login</span></a>
			<p style="margin-top:85px"><a href="https://login.unl.edu/faq/account-resetpw.shtml" title="Find your my.UNL password">Lost your my.UNL password?</a></p>
		</div>
		<div class="two_col right">
				<h2  class="sec_main">Huskers Worldwide</h2>
				<?php 
					$form_body = "<p class=\"login-box\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label><br />";
					$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";
					$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . "</p>";
					$form_body .= "<p><a href=\"". $vars['url'] ."account/register.php\">" . elgg_echo('register') . "</a> | <a href=\"". $vars['url'] ."account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";
					echo elgg_view('input/form', array('body' => $form_body, 'action' => "". $vars['url'] ."action/login"));
				?>
		</div>
66
	</div>