Location: PHPKode > projects > CoreAsset > coreasset/export.php
<?php
	require_once("lib/inc.php");
	require_once("lib/security.php");
	
	$smarty = new Smarty;
	$smarty->compile_check = true;
	$smarty->debugging = false;
	$title	= "::: View and Export Asset List :::";
	$smarty->assign('title',$title);
	$status   = $_SESSION['status'];
$user_id  = $_SESSION['user_id'];
$smarty->assign('user_id',$user_id);
	$row      = $database->get_from_database("select * from asset_users where user_id='$user_id'");
	$name     = $row['full_name'];
$rw		  = $database->get_from_database("select * from asset_users where user_id='$_SESSION[user_id]'");
	$last_login  = $rw['last_login'];
	$last_logout = $rw['last_logout'];
	$smarty->assign('last_login',$last_login);
	$smarty->assign('last_logout',$last_logout);

	$smarty->assign('name',$name);
	// Date & Time to be dispalyed on the header 
$date_time	= date("h:i:s A")." ".date("d-m-Y");
$smarty->assign('date_time',$date_time);
// Done
	$result			=	$database->Execute("select * from asset_category");
	$category_name	=	array();
	$category_id	=	array();
	$count			=	mysql_num_rows($result);
	$smarty->assign('num',$count);
	while($row=mysql_fetch_array($result))
	{
		array_push($category_name,$row[1]);
		array_push($category_id,$row[0]);
	}
	
	$smarty->assign('category_name',$category_name);
	$smarty->assign('category_id',$category_id);
	$smarty->display('export.tpl');
	
?>
Return current item: CoreAsset