Location: PHPKode > projects > PHP_CON - PHP Design Framework > PHP_CON_OS/exchange/emailfriends.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("body"=>$rootpath."html_template/exchange/emailfriends.html"));
	$ttem->set_filenames(array("top_menu"=>$rootpath."html_template/exchange/exchange_menu.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']);


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

	if (isset($response['id']))
		$ttem->assign_var("VAR_ID", $response['id']);

	if (((isset($response['sqldata']) && isset($response['sqldata']['exchangeitemdb'])))
		&& isset($response['sqldata']['exchangeitemdb'][0]))
	{
		$exchangeobj = $response['sqldata']['exchangeitemdb'][0];
		$ttem->assign_var("VAR_F_TITLE", $exchangeobj->getitemname());

		$ttem->assign_var("VAR_F_CONTENT", "I want to introduce a good thing to you!!");
	}

	@reset($response);
	foreach ($response as $key => $value)
	{
		if (ereg("f_", $key, $matches))
		{
			$ttem->assign_var("VAR_" . strtoupper($key), $value);
		}
	}

	if (isset($response['formcheckerrmsg']))
	{
		for ($i= 0; $i < count($response['formcheckerrmsg']); $i++)
		{
			$tempobj = $response['formcheckerrmsg'][$i];
			if (isset($rb[$tempobj['msg']]))
				$ttem->assign_var(strtoupper("ERR_VAR_" . $tempobj['field']), $rb[$tempobj['msg']]);
			else
				$ttem->assign_var(strtoupper("ERR_VAR_" . $tempobj['field']), $tempobj['msg']);
		}
	}

	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