示例#1
0
if (count($tl) != 0) {
    array_multisort($tl, SORT_DESC);
}
$tm = array();
$tmObjects = Tavling::getHallOfFameMedlemmar();
$ids = array();
$stegindex = array();
//print_r($tmObjects);
//die();
foreach ($tmObjects as $m) {
    if (!empty($m)) {
        $ids[] = $m['medlem_id'];
        $stegindex[$m['medlem_id']] = $m['steg'];
    }
}
$medlemmar = Medlem::loadByIds($ids);
// print_r($medlemmar);
foreach ($medlemmar as $medlem) {
    if (!empty($medlem)) {
        $id = $medlem->getId();
        $s = $stegindex[$id] / Foretag::TAVLINGSPERIOD_DAGAR;
        $tm[] = array("stegindex" => $s, "namn" => $medlem->getANamn(), "id" => $id);
    }
}
if (count($tm) != 0) {
    array_multisort($tm, SORT_DESC);
}
$smarty->assign("topplista_foretag", $tf);
$smarty->assign("topplista_lag", $tl);
$smarty->assign("topplista_medlem", $tm);
unset($tf);