Public feed
#376403
<?
function compare_recurring_type($x, $y)
{
if ( $x["propRecurring"]["recurringtype_name"] == $y["propRecurring"]["recurringtype_name"] )
{
if ( $x["owners"]["fullname"] == $y["owners"]["fullname"] )
return 0;
else if ( $x["owners"]["fullname"] < $y["owners"]["fullname"] )
return -1;
else
return 1;
}
else if ( $x["propRecurring"]["recurringtype_name"] < $y["propRecurring"]["recurringtype_name"] )
return -1;
else
return 1;
}
function compare_balance($x, $y)
{
if ( $x["propAmount"] == $y["propAmount"] )
return 0;
else if ( $x["propAmount"] < $y["propAmount"] )
return -1;
else
return 1;
}
function compare_address($x, $y)
{
if ( $x["address"] == $y["address"] )
{
if ( $x["aptnum"] == $y["aptnum"] )
return 0;
else if ( $x["aptnum"] < $y["aptnum"] )
return -1;
else
return 1;
}
else if ( $x["address"] < $y["address"] )
return -1;
else
return 1;
}
if(is_array($lines))
{
switch($sortby)
{
case "prop":
usort($lines, 'compare_address');
break;
case "balance":
usort($lines, 'compare_balance');
usort($lines2, 'compare_balance');
break;
case "recurring_type":
usort($lines, 'compare_recurring_type');
break;
default:
usort($lines, 'compare_address');
}
}
$accountIDtoNameArray = transactions::build_accountIDtoName_array();
include("hoa_main.phtml");
}
?>