[geeklog-cvs] geeklog-2/public_html index.php,1.2,1.3

tony at geeklog.net tony at geeklog.net
Sat Jan 11 01:18:01 EST 2003


Update of /usr/cvs/geeklog/geeklog-2/public_html
In directory internal.geeklog.net:/tmp/cvs-serv492

Modified Files:
	index.php 
Log Message:
This is a test page to show Geeklog's new session management code and A&A code can play together nicely


Index: index.php
===================================================================
RCS file: /usr/cvs/geeklog/geeklog-2/public_html/index.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** index.php	22 Oct 2002 05:53:21 -0000	1.2
--- index.php	11 Jan 2003 06:17:59 -0000	1.3
***************
*** 1,10 ****
  <?php
  require_once('glcore.php');
  
  session_start();
  
! $_SESSION['username'] = 'tbibbs';
  
! print 'done';
  
  ?>
--- 1,39 ----
  <?php
+ 
  require_once('glcore.php');
  
  session_start();
  
! require_once($_CONF['path_lib'] . '/A_and_A/client/AAServiceInterface.class.php');
  
! if (!empty($_POST['username']) AND !empty($_POST['password'])) {
!     $user = &AAServiceInterface::authenticate($_CONF['AA_server'], $_CONF['AA_server_path'], $_CONF['AA_appId'], $_POST['username'], $_POST['password'], $_CONF['AA_port']);
!     $_SESSION['user'] = & $user;
!     print '<a href="nextpage.php">Authentication was successful, go to next page.</a>';
! } else {
  
+ ?>
+ <HTML>
+ <HEAD><TITLE>Geeklog 2: Session and Authentication Test</TITLE></HEAD>
+ <BODY>
+ <FORM action="<?php echo $PHP_SELF; ?>" method="POST">
+ <CENTER>
+ <TABLE border="1">
+     <TR>
+         <TD>Username:</TD>
+         <TD><INPUT type="text" name="username"></TD>
+     </TR>
+     <TR>
+         <TD>Password:</TD>
+         <TD><INPUT type="password" name="password"></TD>
+     </TR>
+     <TR>
+         <TD align="center" colspan="2"><INPUT type="submit" value="Login"></TD>
+     </TR>
+ </TABLE>
+ </CENTER>
+ </BODY>
+ </HTML>
+ <?php
+ }
  ?>





More information about the geeklog-cvs mailing list