$N = 10;
$orders = array();
if(CModule::IncludeModule("form"))
{
switch($FORM_ID)
{
case 9: $FORM_ID = 9;
break;
case 3: $FORM_ID = 3;
break;
default:
$by="id";
$order="desc";
$FORM_ID = 9;
$arFilter = array();
$rsResults = CFormResult::GetList($FORM_ID, $by, $order, $arFilter, $is_filtered, "Y", $N);
while($arResultform = $rsResults->Fetch())
{
$arResultform["UCHMAG"] = true;
$orders[$arResultform["ID"]] = $arResultform;
}
$FORM_ID = 5;
$rsResults = CFormResult::GetList($FORM_ID, $by, $order, $arFilter, $is_filtered, "Y", $N);
while($arResultform = $rsResults->Fetch())
{
$orders[$arResultform["ID"]] = $arResultform;
}
}
$by="id";
$order="desc";
$FORM_ID = $_GET["FORM_ID"];
$arFilter = array();
$rsResults = CFormResult::GetList($FORM_ID, $by, $order, $arFilter, $is_filtered, "Y", $N);
while($arResultform = $rsResults->Fetch())
{
$arResultform["UCHMAG"] = true;
$orders[$arResultform["ID"]] = $arResultform;
}
$FORM_ID = $_GET["FORM_ID"];
$rsResults = CFormResult::GetList($FORM_ID, $by, $order, $arFilter, $is_filtered, "Y", $N);
while($arResultform = $rsResults->Fetch())
{
$orders[$arResultform["ID"]] = $arResultform;
}
}
krsort($orders);
|