Location: PHPKode > projects > PHP_CON - PHP Design Framework > PHP_CON_OS/exchange/reserve/userreservedetail.php
<?PHP
	$rootpath=$_SERVER['DOCUMENT_ROOT'] . "/";
	include_once($rootpath . "common.php");


	$ttem->set_filenames(array("header"=>$rootpath."html_template/header.html"));
	$ttem->set_filenames(array("top_menu"=>$rootpath."html_template/exchange/exchange_menu.html"));
	$ttem->set_filenames(array("body"=>$rootpath."html_template/exchange/reserve/userreserve_detail.html"));

	if (NSession::check_login()==true)
	{
		$ttem->set_filenames(array("pageleft"=>$rootpath."html_template/left_logined.html"));
	}
	else
	{
		$ttem->set_filenames(array("pageleft"=>$rootpath."html_template/left_login.html"));
	}
	$ttem->set_filenames(array("footer"=>$rootpath."html_template/footer.html"));

	$ttem->assign_var("APP_ROOT", $webappcfg['APPPATH']);


	if (isset($response['userid']))
		$ttem->assign_var("VAR_USERID", $response['userid']);
	if (isset($response['reserveid']))
		$ttem->assign_var("VAR_RESERVE_ID", $response['reserveid']);

	//echo("<PRE>");
	//print_r($response);
	//echo("</PRE>");

	if (isset($response['sqldata']) && isset($response['sqldata']['reserveitemdb']))
	{

		if (isset($response['sqldata']['reserveitemdb'][0]))
		{
			$tempitemdata = $response['sqldata']['reserveitemdb'][0];
			$tempreserveobj = $response['sqldata']['exchangereservedb'][0];
			$tempuserobj = $response['sqldata']['userdb'][0];
			$ttem->assign_var("VAR_ITEM_ID", $tempitemdata->getid());
			$ttem->assign_var("VAR_ITEMNAME", $tempitemdata->getitemname());
			$ttem->assign_var("VAR_DESCRIPTION", nl2br($tempitemdata->getdescription()));
			$ttem->assign_var("VAR_RESERVE_PID", $tempreserveobj->getpid());
			$ttem->assign_var("VAR_POSTUSER", $tempuserobj->getusername());
			$ttem->assign_var("VAR_POSTTIME", $tempreserveobj->getreservetime());

			$str_status = "";
			if ($tempreserveobj->getstatus() == ACTIVE)
			{
				$str_status = "";
			}
			elseif ($tempreserveobj->getstatus() == ACCEPTED)
			{
				$str_status = $rb['ACCEPT'];
			}
			elseif ($tempreserveobj->getstatus() == REJECT)
			{
				$str_status = $rb['REJECT'];
			}

			$ttem->assign_var("VAR_STATUS", $str_status);

			if ($tempreserveobj->getstatus() == ACTIVE)
			{
				$ttem->assign_block_vars("control", array());
			}

			//$ttem->assign_var("VAR_RESERVE_ID", $tempreserveobj->getid());
		}


	}
	

	assignlang($ttem);

	$ttem->assign_var_from_handle("PAGE_LEFT_MENU", "pageleft");
	$ttem->assign_var_from_handle("PAGE_EXCHANGE_MENU", "top_menu");

	$ttem->pparse("header");
	$ttem->pparse("body");
	$ttem->pparse("footer");
?>
Return current item: PHP_CON - PHP Design Framework