Location: PHPKode > projects > TimeSheet4dotProject > ts4dp/timesheet/test.php
<?
require_once '../base.php';
require_once '../includes/main_functions.php';
require_once '../includes/config.php';
require_once '../includes/db_adodb.php';
require_once '../includes/db_connect.php';
require_once '../includes/session.php';
require_once '../classes/ui.class.php';
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';

$q  = new DBQuery;
$q->addTable('users');
$q->addQuery('md5(\''.$_GET['passwd'].'\') as userpasswd, user_id, user_password, user_username');
$q->addWhere('user_username=\''.$_GET['username'].'\'');
$r = $q->loadList();
print 'user_id -'.$r[0]['user_id'] . 'user_username - ' . $r[0]['user_username'];


?>
Return current item: TimeSheet4dotProject