$row['rating'] = $rating; // Calculate the players online status. $curtime = time(); $time = $row['online']; $difftime = ($curtime - $time) / 60; $temp_turns = $row['turns_used']; if ($temp_turns <= 0) { $temp_turns = 1; } // Set the players online/offline status. $row['online'] = (bool) false; if ($difftime <= 5) { $row['online'] = (bool) true; } // Set the characters Insignia. $row['insignia'] = Tki\Character::getInsignia($pdo_db, $row['email'], $langvars); // This is just to show that we can set the type of player. // like: banned, admin, player, npc etc. if ($row['email'] == $tkireg->admin_mail || $row['team_admin'] === 'Y') { $row['type'] = 'admin'; } else { $row['type'] = 'player'; } // Check for banned players. $ban_result = Tki\CheckBan::isBanned($pdo_db, $row); if ($ban_result === false || array_key_exists('ban_type', $ban_result) && $ban_result['ban_type'] === ID_WATCH) { $row['banned'] = (bool) false; $row['ban_info'] = null; } else { $row['banned'] = (bool) true; $row['ban_info'] = array('type' => $ban_result['ban_type'], 'public_info' => "Player banned/locked for the following:\n{$ban_result['public_info']}");
$sql = "SELECT zone_id,zone_name FROM ::prefix::zones WHERE zone_id=:zone_id"; $stmt = $pdo_db->prepare($sql); $stmt->bindParam(':zone_id', $sectorinfo['zone_id']); $stmt->execute(); $zoneinfo = $stmt->fetch(PDO::FETCH_ASSOC); $shiptypes[0] = "tinyship.png"; $shiptypes[1] = "smallship.png"; $shiptypes[2] = "mediumship.png"; $shiptypes[3] = "largeship.png"; $shiptypes[4] = "hugeship.png"; $planettypes[0] = "tinyplanet.png"; $planettypes[1] = "smallplanet.png"; $planettypes[2] = "mediumplanet.png"; $planettypes[3] = "largeplanet.png"; $planettypes[4] = "hugeplanet.png"; $signame = Tki\Character::getInsignia($pdo_db, $_SESSION['username'], $langvars); echo "<div style='width:90%; margin:auto; background-color:#400040; color:#C0C0C0; text-align:center; border:#fff 1px solid; padding:4px;'>\n"; echo "{$signame} <span style='color:#fff; font-weight:bold;'>{$playerinfo['character_name']}</span>{$langvars['l_aboard']} <span style='color:#fff; font-weight:bold;'><a class='new_link' style='font-size:14px;' href='report.php'>{$playerinfo['ship_name']}</a></span>\n"; echo "</div>\n"; $num_messages = 0; $sql = "SELECT COUNT(*) FROM ::prefix::messages WHERE recp_id=:recp_id AND notified='N'"; $stmt = $pdo_db->prepare($sql); $sql_test = Tki\Db::LogDbErrors($pdo_db, $sql, __LINE__, __FILE__); if ($sql_test === true) { $stmt->bindParam(':recp_id', $playerinfo['ship_id']); $result = $stmt->execute(); if ($result) { $num_messages = $stmt->fetchColumn(); } } if ($num_messages > 0) {