<?
global $NOSORT;
$NOSORT=1;
//$dbname=`ProjectManagement`;
$_SESSION[`Instance`]=1;
echo "<center><b style={font-size:20;}>" , 
$_SESSION[`CaseId`] , "</b></center><br>";
$userRole=$_SESSION[`userRole`];
if ($userRole==0)
ShowQueryResult("select Item, Value from (select qID as Item, tText as Value, rUnique from ResponsesDecoded,Forms where CaseID=`" . $_SESSION[`CaseId`] . 
"` and qID not in (`CaseID`) and qID in (select qID from FormQuestions where fID=`RE_ListingDetail`) union select `Contact`,`<a href=mailto:Randy@LucasCo.info>Randy Lucas</a>`,`99999999`) as a order by rUnique");
else
ShowQueryResult("select Item, Value from (select qID as Item, tText as Value, rUnique from ResponsesDecoded where CaseID=`" . $_SESSION[`CaseId`] . 
"` and qID not in (`CaseID`,`RE_PurchasePrice`,`RE_Expenses`,`RE_ExpensesTotal`,`RE_PurchaseDate`,`RE_Notes`) and qID in (select qID from FormQuestions where fID=`RE_ListingDetail`) union select `Contact`,`<a href=mailto:Randy@LucasCo.info>Randy Lucas</a>`,`99999999`) as a order by rUnique");
?>