<?php $raceName = Globals::getRaceName($var['race_id']); $template->assign('PageTopic', 'Send message to ruling council of the ' . $raceName); require_once get_file_loc('menu.inc'); create_message_menu(); $PHP_OUTPUT .= '<p>'; $container = create_container('council_send_message_processing.php'); transfer('race_id'); $PHP_OUTPUT .= create_echo_form($container); $PHP_OUTPUT .= '<p><small><b>From:</b> ' . $player->getPlayerName() . ' (' . $player->getPlayerID() . ')<br />'; $PHP_OUTPUT .= '<b>To:</b> Ruling Council of ' . $raceName . '</small></p>'; $PHP_OUTPUT .= '<textarea spellcheck="true" name="message" id="InputFields"></textarea><br /><br />'; $PHP_OUTPUT .= create_submit('Send message'); $PHP_OUTPUT .= '</form>'; $PHP_OUTPUT .= '</p>';
<?php require_once get_file_loc('menu.inc'); if (!isset($var['race_id'])) { SmrSession::updateVar('race_id', $player->getRaceID()); } $raceID = $var['race_id']; $template->assign('PageTopic', 'Ruling Council Of ' . Globals::getRaceName($raceID)); // echo menu create_council_menu($raceID); $RACES =& Globals::getRaces(); $raceRelations =& Globals::getRaceRelations($player->getGameID(), $raceID); $peaceRaces = array(); $neutralRaces = array(); $warRaces = array(); foreach ($RACES as $otherRaceID => $raceInfo) { if ($otherRaceID != RACE_NEUTRAL && $raceID != $otherRaceID) { if ($raceRelations[$otherRaceID] >= 300) { $peaceRaces[$otherRaceID] = $raceInfo; } else { if ($raceRelations[$otherRaceID] <= -300) { $warRaces[$otherRaceID] = $raceInfo; } else { $neutralRaces[$otherRaceID] = $raceInfo; } } } } $template->assignByRef('PeaceRaces', $peaceRaces); $template->assignByRef('NeutralRaces', $neutralRaces); $template->assignByRef('WarRaces', $warRaces);
$file .= inify($weapon->getName()) . '=' . inify($weapon->getRaceName()) . ',' . $weapon->getCost() . ',' . $weapon->getShieldDamage() . ',' . $weapon->getArmourDamage() . ',' . $weapon->getBaseAccuracy() . ',' . $weapon->getPowerLevel() . ',' . $weapon->getEmpDamage() . ',' . $weapon->getBuyerRestriction() . ',' . ($weapon->isRaidWeapon() ? '1' : '0') . EOL; } unset($weapon); $file .= '[ShipEquipment] ; Name = Cost' . EOL; $hardwares =& Globals::getHardwareTypes(); foreach ($hardwares as &$hardware) { $file .= inify($hardware['Name']) . '=' . $hardware['Cost'] . EOL; } unset($hardware); $file .= '[Ships] ; Name = Race,Cost,TPH,Hardpoints,Power,+Equipment (Optional),+Restrictions(Optional) ; Restrictions:Align(Integer)' . EOL; $ships =& AbstractSmrShip::getAllBaseShips($gameID); foreach ($ships as &$ship) { $file .= inify($ship['Name']) . '=' . Globals::getRaceName($ship['RaceID']) . ',' . $ship['Cost'] . ',' . $ship['Speed'] . ',' . $ship['Hardpoint'] . ',' . $ship['MaxPower']; if ($ship['MaxHardware'] > 0) { $shipEquip = ',ShipEquipment='; foreach ($ship['MaxHardware'] as $hardwareID => $maxHardware) { $shipEquip .= $hardwares[$hardwareID]['Name'] . '=' . $maxHardware . ';'; } $file .= substr($shipEquip, 0, -1); $file .= ',Restrictions=' . $ship['AlignRestriction']; } $file .= EOL; } unset($ship); $file .= '[Locations] ; Name = +Sells' . EOL; $locations =& SmrLocation::getAllLocations(); foreach ($locations as &$location) {