function Atter_recallall() { if (!($id = param_num("id")) || !($user = getUserByID($id)) || !($atter = fleetstatus_get_bytarget($user['gala'], $user['pos'], 1))) { $this->_header(); } if ($_REQUEST['send']) { if ($_REQUEST['yes_x']) { foreach ($atter as $data) { fleetstatus_recall($data['fsid']); } addToLogFile("alle Atter bei (" . $user['gala'] . ":" . $user['pos'] . ") recallt", "Incomings", $this->userdata['uid']); } $this->_header(); } else { $this->forms['information']['url'] = "takscreen.php?id={$id}"; $this->forms['information']['action'] = "recallall"; $this->forms['information']['title'] = "alle Atter recalln"; $this->forms['information']['message'] = "alle Atter auf (" . $user['gala'] . ":" . $user['pos'] . ") " . $user['nick'] . " recalln ?"; $this->forms['information']['style'] = "red"; $this->show('message_question', "alle Atter recalln"); } }
function fleetstatus_recall($fsid) { $status = fleetstatus_get($fsid); if ($status['uid']) { // interne flotte if ($status['fleetnum'] && $status['arrival']) { $eta = $status['arrival'] - time(); if ($eta < 0) { $eta = 0; } $eta = floor($eta / 60); $data = array(); $data['orbittime'] = ""; $data['returntime'] = ""; $data['arrival'] = gnarrival($status['returntime'] - $eta); $data['return_flight'] = 1; fleetstatus_update($fsid, $data); } else { fleetstatus_delete($fsid); } } else { // externe flotte fleetstatus_delete($fsid); if ($status['fid']) { fleet_delete($status['fid']); } } //letzter atter recallt ? if ($status['status'] == 1 && !fleetstatus_get_bytarget($status['tgala'], $status['tpos'], 1)) { $user = getUserByPos($status['tgala'], $status['tpos']); user_set_safe($user['uid'], 0); } }