<?php


	// Include return function
	require_once $argv[1];

	// Create database object
	require_once "class.dbconnection_v1_0.php";
	$db = new Connection($argv[2], $argv[3]);

	// Break the request up in elements
	$a_request = explode('#', $argv[4]);

	switch($a_request[0]) {

		case 'FORM' :
		case 'FORM_SENT' :

			$rs = $db->Query("SELECT frm_title, def_name FROM tbl_rea_forms INNER JOIN tbl_rea_frm_definitions ON def_frm_id=frm_id WHERE def_id=".$a_request[1]);
			returnThis($rs->Row('frm_title').' ('.$rs->Row('def_name').')');
			$rs->Close();
			break;

		default:
			returnThis('Requested type is unknown.', true);
			break;

	}

	$db->Close();

?>