Location: PHPKode > projects > Webgolin > webgolin/Logged.inc
  <script language="javascript">
  if(document.layers)
    window.captureEvents(Event.KeyDown);

  function logincheck()
  {
    if(loginform.userid.value=="")
    {
	alert("Please enter your username");
    }else
    if(loginform.pwd.value=="")
    {
      alert("Please enter your password");
    }else
      loginform.submit();
  }

  function CheckEnter(e)
  {
    if(navigator.appName == "Netscape" && e.which == 13)
      logincheck();	
    if(navigator.appName == "Microsoft Internet Explorer" && event.keyCode==13)
	logincheck();
  }
	
  </script>
	 
  <?	
  if($_SESSION["LoggedIn"]!=true)
  {?>	
    <form name=loginform action=index.php?action=verify&item=login method=post style="font-family: Verdana; font-size: 10pt">
    <P><font face="Verdana">User Name:</font><BR><INPUT id="userid" style="width: 69; height: 20" size=17 
    name="userid"><BR><font face="Verdana">Password:</font><BR><INPUT id=pwd style="width: 68; height: 20" 
    type=password size=17 name=pwd onkeydown="CheckEnter()"><br>
    <input type="hidden" name="action" value="verify">
    <input type="hidden" name="item" value="login">
    <INPUT id=button1 type=button value=Login name=button1 onclick=logincheck()><BR>
    <INPUT id=button2 type=reset value=Reset><br>
    &nbsp;<a href="index.php?action=ui_new&item=user">Join</a></P>
    <a href="index.php?action=app&item=fpwd">Forgot password</a>
    </form>
    <p>&nbsp;</p>
  <?}
  else 	
  { 
    echo("<font face='Times New Roman' size='2'>You are logged in as: <strong>".$_SESSION["uname"]."</strong><BR>".
    "<a href='index.php?action=ui_edit&item=portfolio'>Your Portfolio</a><br>".
    "<a href='index.php?action=verify&item=logout'>Logout</a><br>");
  }
   ?>
Return current item: Webgolin