$t->alliance = new Alliance(); $t->shouts = array(); if ($user->alliance) { $t->alliance->get($user->alliance); if ($t->alliance->id) { $t->shouts = AllianceShout::getShouts($t->alliance); } } else if ($filtered['join']) { $t->alliance->get($filtered['join']); if ($t->alliance->id) { if (!AllianceBan::isBlocked($t->alliance, $user)) { $t->alliance->addMember($user); } else { $t->err = 'You are blocked from joining that alliance'; } } } else { header('Location: alliance-list.php'); exit; } if ($filtered['leave-alliance']) { $user->alliance = 0; $user->aaccepted = 0;