function banned($account){ if(!is_object($account)) return ''; $funcs = new ViewFunctions(); if($account->banned){ $link = $funcs->link_to('account_banns', 'delete', array('id' => $account->id)); $op = "<a class=\"confirm\" title=\"Unban Account {$account->id}\" href=\"$link\">"; $op .= '<img alt="banned" src="/images/icons/banned.jpeg" />'; $op .= '</a>'; } else { $link = $funcs->link_to('account_banns', 'add', array('account_id' => $account->id)); $op = "<a class=\"remote_form\" width=500 title=\"Ban Account {$account->id}\" href=\"$link\">"; $op .= '<img alt="unbanned" src="/images/icons/unbanned.jpeg" />'; $op .= '</a>'; } return $op; }