Location: PHPKode > projects > TimeSheet4dotProject > ts4dp/timesheet/index.php
<?php
unset($_SESSION['uid']);
unset($_SESSION['username']);
// to destory you just need to start and then destory...!
session_start(); 
session_destroy();
require_once('session.php');
require_once('global4app.php');
//STUPID DOTPROJECT HACK BELOW, IF YOU COULD MAKE IT BETTER, WELCOME
dPsessionStart(array('AppUI'));
// check if session has previously been initialised
if (!isset( $_SESSION['AppUI'] ) || isset($_GET['logout'])) {
    if (isset($_GET['logout']) && isset($_SESSION['AppUI']->user_id))
    {
        $AppUI =& $_SESSION['AppUI'];
		$user_id = $AppUI->user_id;
        addHistory('login', $AppUI->user_id, 'logout', $AppUI->user_first_name . ' ' . $AppUI->user_last_name);
    }

	$_SESSION['AppUI'] = new CAppUI;
}
$AppUI =& $_SESSION['AppUI'];
$last_insert_id =$AppUI->last_insert_id;

$AppUI->checkStyle();

// load the commonly used classes
require_once( $AppUI->getSystemClass( 'date' ) );
require_once( $AppUI->getSystemClass( 'dp' ) );
require_once( $AppUI->getSystemClass( 'query' ) );

require_once DP_BASE_DIR.'/misc/debug.php';


?>
<html>
<head>
<title>Timesheet4dP</title>
<link rel=stylesheet type="text/css" href="./css/main.css">
<script language="javascript" type="text/javascript" src="./js/getObj.js"></script> 
<style type=text/css>
	#cal1Container { display:none; position:absolute; left:83px;top:56px;}
</style>
<script>
function validation()
{
if (document.forms[0].username.value == "")
{
	alert ('Please enter username');
	document.forms[0].username.focus();
	document.forms[0].username.select();
	return false;
}
if (document.forms[0].passwd.value == "")
{
	alert ('Please enter password');
	document.forms[0].passwd.focus();
	document.forms[0].passwd.select();
	return false;
}
return true;
}
</script>
</head>
<body class=" yui-skin-sam" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- User name is the input to proceed further...-->
<br><br><hr/>
<form method=post action=checkLogin.php onsubmit="return validation()">
<table width="500" border="0" cellspacing="2" cellpadding="10" align="center" valign=center>
<tr>
	<td colspan=2 align=left><h1 align=center><img src=img/timesheet.gif align=center border=0 title="accountability, responsibility, professionalism, productivity, efficiency rate ?"><b> timesheet4dp Login</b></h1> </td>
</tr>
<tr><td colspan=2 align=center><font color=red><b><? print $_GET["error"] ?></b></font></td></tr>
<tr>
	<td>Username: </td>
	<td><input type=text size=15 name=username id=username></td>
</tr>
<tr>
	<td>Password:</td>
	<td><input type=password size=15 name=passwd id=passwd></td>
</tr>
<tr>
	<!-- <td><input type=Button value="View Task Logs" id=viewLogButton onClick="YAHOO.example.container.viewlogs.show();"></td> -->
	<td colspan=2 align=center><input type=reset value="Reset" id=reset> <input type=submit value="Login"></td>
</tr>
</table>
</form>
<?php
include ('footer.php');
?>
</body>
</html>
Return current item: TimeSheet4dotProject