当前位置: 首页>>代码示例>>PHP>>正文


PHP GetStartAdressLink函数代码示例

本文整理汇总了PHP中GetStartAdressLink函数的典型用法代码示例。如果您正苦于以下问题:PHP GetStartAdressLink函数的具体用法?PHP GetStartAdressLink怎么用?PHP GetStartAdressLink使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetStartAdressLink函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->GetUserLang($this->_fleet['fleet_owner']);
     $Message = sprintf($LNG['sys_tran_mess_owner'], $TargetName, GetStartAdressLink($this->_fleet, ''), pretty_number($this->_fleet['fleet_resource_metal']), $LNG['Metal'], pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['Crystal'], pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['Deuterium']);
     SendSimpleMessage($this->_fleet['fleet_owner'], '', $this->_fleet['fleet_end_time'], 4, $LNG['sys_mess_tower'], $LNG['sys_mess_fleetback'], $Message);
     $this->RestoreFleet();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:7,代码来源:MissionCaseRecycling.php

示例2: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->GetUserLang($this->_fleet['fleet_owner']);
     $Message = sprintf($LNG['sys_tran_mess_back'], $StartName, GetStartAdressLink($this->_fleet, ''));
     SendSimpleMessage($this->_fleet['fleet_owner'], '', $this->_fleet['fleet_end_time'], 5, $LNG['sys_mess_tower'], $LNG['sys_mess_fleetback'], $Message);
     $this->RestoreFleet();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:7,代码来源:MissionCaseStayAlly.php

示例3: missionCaseStayAlly

/**
 * MissionCaseStayAlly @todo description
 *
 * @global array $lang @see common.php
 * @param array $fleetRow @see common.php
 * @return bool true.
 */
function missionCaseStayAlly($fleetRow)
{
    global $lang;
    $readConnection = Nova::getSingleton('core/database_connection_pool')->getConnection('core_read');
    $startPlanet = $readConnection->select(array('name', 'id_owner'))->from($readConnection->getDeprecatedTable('planets'))->where('galaxy =?', $fleetRow['fleet_start_galaxy'])->where('system =?', $fleetRow['fleet_start_system'])->where('planet =?', $fleetRow['fleet_start_planet'])->query()->fetch();
    $endPlanet = $readConnection->select(array('name', 'id_owner'))->from($readConnection->getDeprecatedTable('planets'))->where('galaxy =?', $fleetRow['fleet_end_galaxy'])->where('system =?', $fleetRow['fleet_end_system'])->where('planet =?', $fleetRow['fleet_end_planet'])->query()->fetch();
    $fleetStartLink = GetStartAdressLink($fleetRow, '');
    $fleetEndLink = GetTargetAdressLink($fleetRow, '');
    if ($fleetRow['fleet_mess'] == 0) {
        if ($fleetRow['fleet_end_stay'] <= time()) {
            $readConnection->update($readConnection->getDeprecatedTable('fleets'), array('fleet_mess' => 1), array('fleet_id =?' => $fleetRow['fleet_id']));
        } else {
            if ($fleetRow['fleet_start_time'] <= time()) {
                $message = sprintf($lang['sys_tran_mess_owner'], $endPlanet['name'], $fleetEndLink, $fleetRow['fleet_resource_metal'], $lang['Metal'], $fleetRow['fleet_resource_crystal'], $lang['Crystal'], $fleetRow['fleet_resource_deuterium'], $lang['Deuterium']);
                SendSimpleMessage($startPlanet['id_owner'], '', $fleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $message);
                $message = sprintf($lang['sys_tran_mess_user'], $startPlanet['name'], $fleetStartLink, $endPlanet['name'], $fleetEndLink, $fleetRow['fleet_resource_metal'], $lang['Metal'], $fleetRow['fleet_resource_crystal'], $lang['Crystal'], $fleetRow['fleet_resource_deuterium'], $lang['Deuterium']);
                SendSimpleMessage($endPlanet['id_owner'], '', $fleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $message);
            }
        }
    } else {
        if ($fleetRow['fleet_end_time'] <= time()) {
            $message = sprintf($lang['sys_tran_mess_back'], $startPlanet['name'], $fleetStartLink);
            SendSimpleMessage($startPlanet['id_owner'], '', $fleetRow['fleet_end_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_fleetback'], $message);
            RestoreFleetToPlanet($fleetRow, true);
            $readConnection->delete($readConnection->getDeprecatedTable('fleets'), array('fleet_id =?' => $fleetRow['fleet_id']));
        }
    }
    return true;
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:36,代码来源:MissionCaseStayAlly.php

示例4: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
     $Message = sprintf($LNG['sys_stat_mess'], GetStartAdressLink($this->_fleet, ''), pretty_number($this->_fleet['fleet_resource_metal']), $LNG['tech'][901], pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['tech'][902], pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['tech'][903]);
     PlayerUtil::sendMessage($this->_fleet['fleet_owner'], 0, $LNG['sys_mess_tower'], 4, $LNG['sys_mess_fleetback'], $Message, $this->_fleet['fleet_end_time'], NULL, 1, $this->_fleet['fleet_universe']);
     $this->RestoreFleet();
 }
开发者ID:sincilite,项目名称:Evermoon,代码行数:7,代码来源:MissionCaseStay.class.php

示例5: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
     $StartName = $GLOBALS['DATABASE']->getFirstCell("SELECT name FROM " . PLANETS . " WHERE id = " . $this->_fleet['fleet_start_id'] . ";");
     $Message = sprintf($LNG['sys_tran_mess_back'], $StartName, GetStartAdressLink($this->_fleet, ''));
     SendSimpleMessage($this->_fleet['fleet_owner'], 0, $this->_fleet['fleet_end_time'], 5, $LNG['sys_mess_tower'], $LNG['sys_mess_fleetback'], $Message);
     $this->RestoreFleet();
 }
开发者ID:Decoder1978,项目名称:Xterium,代码行数:8,代码来源:MissionCaseTransport.php

示例6: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
     $TargetUserID = $this->_fleet['fleet_target_owner'];
     $TargetMessage = sprintf($LNG['sys_stat_mess'], GetStartAdressLink($this->_fleet, ''), pretty_number($this->_fleet['fleet_resource_metal']), $LNG['tech'][901], pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['tech'][902], pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['tech'][903]);
     SendSimpleMessage($TargetUserID, 0, $this->_fleet['fleet_end_time'], 5, $LNG['sys_mess_tower'], $LNG['sys_stat_mess_stay'], $TargetMessage);
     $this->RestoreFleet();
 }
开发者ID:Decoder1978,项目名称:Xterium,代码行数:8,代码来源:MissionCaseStay.php

示例7: ReturnEvent

 function ReturnEvent()
 {
     global $LANG;
     $LNG = $LANG->GetUserLang($this->_fleet['fleet_owner']);
     $TargetUserID = $this->_fleet['fleet_target_owner'];
     $TargetMessage = sprintf($LNG['sys_stat_mess'], GetStartAdressLink($this->_fleet, ''), pretty_number($this->_fleet['fleet_resource_metal']), $LNG['Metal'], pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['Crystal'], pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['Deuterium']);
     SendSimpleMessage($TargetUserID, '', $this->_fleet['fleet_end_time'], 5, $LNG['sys_mess_tower'], $LNG['sys_stat_mess_stay'], $TargetMessage);
     $this->RestoreFleet();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:9,代码来源:MissionCaseStay.php

示例8: ReturnEvent

 function ReturnEvent()
 {
     $LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
     $sql = 'SELECT name FROM %%PLANETS%% WHERE id = :planetId;';
     $planetName = Database::get()->selectSingle($sql, array(':planetId' => $this->_fleet['fleet_start_id']), 'name');
     $Message = sprintf($LNG['sys_tran_mess_back'], $planetName, GetStartAdressLink($this->_fleet, ''));
     PlayerUtil::sendMessage($this->_fleet['fleet_owner'], 0, $LNG['sys_mess_tower'], 4, $LNG['sys_mess_fleetback'], $Message, $this->_fleet['fleet_end_time'], NULL, 1, $this->_fleet['fleet_universe']);
     $this->RestoreFleet();
 }
开发者ID:sincilite,项目名称:Evermoon,代码行数:9,代码来源:MissionCaseTransport.class.php

示例9: MissionCaseTransport

/**
 * MissionCaseTransport.php
 *
 * @version 1
 * @copyright 2008 By Chlorel for XNova
 */
function MissionCaseTransport($FleetRow)
{
    global $lang;
    $QryStartPlanet = "SELECT * FROM {{table}} ";
    $QryStartPlanet .= "WHERE ";
    $QryStartPlanet .= "`galaxy` = '" . $FleetRow['fleet_start_galaxy'] . "' AND ";
    $QryStartPlanet .= "`system` = '" . $FleetRow['fleet_start_system'] . "' AND ";
    $QryStartPlanet .= "`planet` = '" . $FleetRow['fleet_start_planet'] . "' AND ";
    $QryStartPlanet .= "`planet_type` = '" . $FleetRow['fleet_start_type'] . "';";
    $StartPlanet = doquery($QryStartPlanet, 'planets', true);
    $StartName = $StartPlanet['name'];
    $StartOwner = $StartPlanet['id_owner'];
    $QryTargetPlanet = "SELECT * FROM {{table}} ";
    $QryTargetPlanet .= "WHERE ";
    $QryTargetPlanet .= "`galaxy` = '" . $FleetRow['fleet_end_galaxy'] . "' AND ";
    $QryTargetPlanet .= "`system` = '" . $FleetRow['fleet_end_system'] . "' AND ";
    $QryTargetPlanet .= "`planet` = '" . $FleetRow['fleet_end_planet'] . "' AND ";
    $QryTargetPlanet .= "`planet_type` = '" . $FleetRow['fleet_end_type'] . "';";
    $TargetPlanet = doquery($QryTargetPlanet, 'planets', true);
    $TargetName = $TargetPlanet['name'];
    $TargetOwner = $TargetPlanet['id_owner'];
    if ($FleetRow['fleet_mess'] == 0) {
        if ($FleetRow['fleet_start_time'] < time()) {
            StoreGoodsToPlanet($FleetRow, false);
            $Message = sprintf($lang['sys_tran_mess_owner'], $TargetName, GetTargetAdressLink($FleetRow, ''), $FleetRow['fleet_resource_metal'], $lang['Metal'], $FleetRow['fleet_resource_crystal'], $lang['Crystal'], $FleetRow['fleet_resource_deuterium'], $lang['Deuterium'], $FleetRow['fleet_resource_appolonium'], $lang['Appolonium']);
            SendSimpleMessage($StartOwner, '', $FleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
            if ($TargetOwner != $StartOwner) {
                $Message = sprintf($lang['sys_tran_mess_user'], $StartName, GetStartAdressLink($FleetRow, ''), $TargetName, GetTargetAdressLink($FleetRow, ''), $FleetRow['fleet_resource_metal'], $lang['Metal'], $FleetRow['fleet_resource_crystal'], $lang['Crystal'], $FleetRow['fleet_resource_deuterium'], $lang['Deuterium'], $FleetRow['fleet_resource_appolonium'], $lang['Appolonium']);
                SendSimpleMessage($TargetOwner, '', $FleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
            }
            $QryUpdateFleet = "UPDATE {{table}} SET ";
            $QryUpdateFleet .= "`fleet_resource_metal` = '0' , ";
            $QryUpdateFleet .= "`fleet_resource_crystal` = '0' , ";
            $QryUpdateFleet .= "`fleet_resource_deuterium` = '0' , ";
            $QryUpdateFleet .= "`fleet_resource_appolonium` = '0' , ";
            $QryUpdateFleet .= "`fleet_mess` = '1' ";
            $QryUpdateFleet .= "WHERE `fleet_id` = '" . $FleetRow['fleet_id'] . "' ";
            $QryUpdateFleet .= "LIMIT 1 ;";
            doquery($QryUpdateFleet, 'fleets');
        }
    } else {
        if ($FleetRow['fleet_end_time'] < time()) {
            $Message = sprintf($lang['sys_tran_mess_back'], $StartName, GetStartAdressLink($FleetRow, ''));
            SendSimpleMessage($StartOwner, '', $FleetRow['fleet_end_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_fleetback'], $Message);
            RestoreFleetToPlanet($FleetRow, true);
            //Piratenangriff nach Zufallsprinzip
            $zufall = 0;
            $zufall = rand(1, 10);
            if ($zufall == 7) {
                Piratenangriff($FleetRow);
                $zufall = 0;
            }
            // Ende Piratenangriff
            doquery("DELETE FROM {{table}} WHERE fleet_id=" . $FleetRow["fleet_id"], 'fleets');
        }
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:63,代码来源:MissionCaseTransport.php

示例10: MissionCaseStayAlly

function MissionCaseStayAlly($FleetRow)
{
    global $lang;
    $QryStartPlanet = "SELECT name, id_owner FROM {{table}} ";
    $QryStartPlanet .= "WHERE ";
    $QryStartPlanet .= "`galaxy` = '" . $FleetRow['fleet_start_galaxy'] . "' AND ";
    $QryStartPlanet .= "`system` = '" . $FleetRow['fleet_start_system'] . "' AND ";
    $QryStartPlanet .= "`planet` = '" . $FleetRow['fleet_start_planet'] . "';";
    $StartPlanet = doquery($QryStartPlanet, 'planets', true);
    $StartName = $StartPlanet['name'];
    $StartOwner = $StartPlanet['id_owner'];
    $QryTargetPlanet = "SELECT name, id_owner FROM {{table}} ";
    $QryTargetPlanet .= "WHERE ";
    $QryTargetPlanet .= "`galaxy` = '" . $FleetRow['fleet_end_galaxy'] . "' AND ";
    $QryTargetPlanet .= "`system` = '" . $FleetRow['fleet_end_system'] . "' AND ";
    $QryTargetPlanet .= "`planet` = '" . $FleetRow['fleet_end_planet'] . "';";
    $TargetPlanet = doquery($QryTargetPlanet, 'planets', true);
    $TargetName = $TargetPlanet['name'];
    $TargetOwner = $TargetPlanet['id_owner'];
    switch ($FleetRow['fleet_mess']) {
        case '0':
            if ($FleetRow['fleet_start_time'] <= time()) {
                $Message = sprintf($lang['sys_tran_mess_owner'], $TargetName, GetTargetAdressLink($FleetRow, ''), $FleetRow['fleet_resource_metal'], $lang['Metal'], $FleetRow['fleet_resource_crystal'], $lang['Crystal'], $FleetRow['fleet_resource_deuterium'], $lang['Deuterium']);
                SendSimpleMessage($StartOwner, '', $FleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
                $Message = sprintf($lang['sys_tran_mess_user'], $StartName, GetStartAdressLink($FleetRow, ''), $TargetName, GetTargetAdressLink($FleetRow, ''), $FleetRow['fleet_resource_metal'], $lang['Metal'], $FleetRow['fleet_resource_crystal'], $lang['Crystal'], $FleetRow['fleet_resource_deuterium'], $lang['Deuterium']);
                SendSimpleMessage($TargetOwner, '', $FleetRow['fleet_start_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_transport'], $Message);
                $QryUpdateFleet = "UPDATE {{table}} SET ";
                $QryUpdateFleet .= "`fleet_mess` = 1 ";
                $QryUpdateFleet .= "WHERE `fleet_id` = '" . $FleetRow['fleet_id'] . "' ";
                $QryUpdateFleet .= "LIMIT 1 ;";
                doquery($QryUpdateFleet, 'fleets');
            }
            break;
        case '1':
            if ($FleetRow['fleet_end_stay'] <= time()) {
                $QryUpdateFleet = "UPDATE {{table}} SET ";
                $QryUpdateFleet .= "`fleet_mess` = 2 ";
                $QryUpdateFleet .= "WHERE `fleet_id` = '" . $FleetRow['fleet_id'] . "' ";
                $QryUpdateFleet .= "LIMIT 1 ;";
                doquery($QryUpdateFleet, 'fleets');
            }
            break;
        default:
            if ($FleetRow['fleet_end_time'] < time()) {
                $Message = sprintf($lang['sys_tran_mess_back'], $StartName, GetStartAdressLink($FleetRow, ''));
                SendSimpleMessage($StartOwner, '', $FleetRow['fleet_end_time'], 5, $lang['sys_mess_tower'], $lang['sys_mess_fleetback'], $Message);
                RestoreFleetToPlanet($FleetRow, true);
                doquery("DELETE FROM {{table}} WHERE fleet_id=" . $FleetRow["fleet_id"], 'fleets');
            }
            break;
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:52,代码来源:MissionCaseStayAlly.php

示例11: MissionCaseSave

/**
 * MissionCaseSave.php
 *
 * @version 1 By Chlorel for XNova
 */
function MissionCaseSave($FleetRow)
{
    global $lang;
    $QryStartPlanet = "SELECT * FROM {{table}} ";
    $QryStartPlanet .= "WHERE ";
    $QryStartPlanet .= "`galaxy` = '" . $FleetRow['fleet_start_galaxy'] . "' AND ";
    $QryStartPlanet .= "`system` = '" . $FleetRow['fleet_start_system'] . "' AND ";
    $QryStartPlanet .= "`planet` = '" . $FleetRow['fleet_start_planet'] . "' AND ";
    $QryStartPlanet .= "`planet_type` = '" . $FleetRow['fleet_start_type'] . "';";
    $StartPlanet = doquery($QryStartPlanet, 'planets', true);
    $StartName = $StartPlanet['name'];
    $StartOwner = $StartPlanet['id_owner'];
    $QryTargetPlanet = "SELECT * FROM {{table}} ";
    $QryTargetPlanet .= "WHERE ";
    $QryTargetPlanet .= "`galaxy` = '" . $FleetRow['fleet_end_galaxy'] . "' AND ";
    $QryTargetPlanet .= "`system` = '" . $FleetRow['fleet_end_system'] . "' AND ";
    $QryTargetPlanet .= "`planet` = '" . $FleetRow['fleet_end_planet'] . "' AND ";
    $QryTargetPlanet .= "`planet_type` = '" . $FleetRow['fleet_end_type'] . "';";
    $TargetPlanet = doquery($QryTargetPlanet, 'planets', true);
    $TargetName = $TargetPlanet['name'];
    $TargetOwner = $TargetPlanet['id_owner'];
    if ($FleetRow['fleet_mess'] == 0) {
        if ($FleetRow['fleet_start_time'] < time()) {
            $QryUpdateFleet = "UPDATE {{table}} SET ";
            $QryUpdateFleet .= "`fleet_mess` = '1' ";
            $QryUpdateFleet .= "WHERE `fleet_id` = '" . $FleetRow['fleet_id'] . "' ";
            $QryUpdateFleet .= "LIMIT 1 ;";
            doquery($QryUpdateFleet, 'fleets');
        }
    } else {
        if ($FleetRow['fleet_end_time'] < time()) {
            $Message = sprintf($lang['sys_save_mess_back'], $StartName, GetStartAdressLink($FleetRow, ''));
            SendSimpleMessage($StartOwner, '', $FleetRow['fleet_end_time'], 4, $lang['sys_mess_save'], $lang['sys_mess_fleetback'], $Message);
            RestoreFleetToPlanet($FleetRow, true);
            doquery("DELETE FROM {{table}} WHERE fleet_id=" . $FleetRow["fleet_id"], 'fleets');
        }
    }
}
开发者ID:sonicmaster,项目名称:RPG,代码行数:43,代码来源:MissionCaseSave.php

示例12: GetEventString

 public function GetEventString($FleetRow, $Status, $Owner, $Label, $Record)
 {
     global $LNG;
     $FleetStyle = array(1 => 'attack', 2 => 'federation', 3 => 'transport', 4 => 'deploy', 5 => 'hold', 6 => 'espionage', 7 => 'colony', 8 => 'harvest', 9 => 'destroy', 10 => 'missile', 15 => 'transport');
     $Names = $this->GetNames($FleetRow);
     $FleetPrefix = $Owner == true ? 'own' : '';
     $MissionType = $FleetRow['fleet_mission'];
     $FleetContent = $this->CreateFleetPopupedFleetLink($FleetRow, ($MissionType == 1 || $MissionType == 2) && $FleetRow['fleet_owner'] != $_SESSION['id'] && $Status == 0 && $Owner == true ? $LNG['cff_acs_fleet'] : $LNG['ov_fleet'], $FleetPrefix . $FleetStyle[$MissionType], $Names);
     $FleetCapacity = $this->CreateFleetPopupedMissionLink($FleetRow, $LNG['type_mission'][$MissionType], $FleetPrefix . $FleetStyle[$MissionType]);
     $StartType = $FleetRow['fleet_start_type'];
     $TargetType = $FleetRow['fleet_end_type'];
     $FleetGroup = $FleetRow['fleet_group'];
     $FleetStatus = array(0 => 'flight', 1 => 'return', 2 => 'holding');
     if (($MissionType == 1 || $MissionType == 2) && $FleetRow['fleet_owner'] != $_SESSION['id'] && $Status == 0 && $Owner == true) {
         $StartID = $LNG['cff_of'] . ' ' . $Names['own_username'] . ' ';
         $StartID .= $LNG['cff_goes'];
         $StartID .= $Names['own_planetname'] . " " . GetStartAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
         if ($TargetType == 1) {
             $TargetID = $LNG['cff_the_planet'];
         } elseif ($TargetType == 2) {
             $TargetID = $LNG['cff_debris_field'];
         } elseif ($TargetType == 3) {
             $TargetID = $LNG['cff_to_the_moon'];
         }
         $TargetID .= $Names['target_planetname'] . " ";
         $TargetID .= GetTargetAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
     } elseif ($Status != 2) {
         if ($StartType == 1) {
             $StartID = $LNG['cff_from_the_planet'];
         } elseif ($StartType == 3) {
             $StartID = $LNG['cff_from_the_moon'];
         }
         $StartID .= $Names['own_planetname'] . " " . GetStartAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
         if ($MissionType != 15) {
             if ($TargetType == 1) {
                 $TargetID = $LNG['cff_the_planet'];
             } elseif ($TargetType == 2) {
                 $TargetID = $LNG['cff_debris_field'];
             } elseif ($TargetType == 3) {
                 $TargetID = $LNG['cff_to_the_moon'];
             }
         } else {
             $TargetID = $LNG['cff_the_position'];
         }
         $TargetID .= $Names['target_planetname'] . " ";
         $TargetID .= GetTargetAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
     } else {
         if ($StartType == 1) {
             $StartID = $LNG['cff_to_the_planet'];
         } elseif ($StartType == 3) {
             $StartID = $LNG['cff_the_moon'];
         }
         $StartID .= $Names['own_planetname'] . ' ' . GetStartAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
         if ($MissionType != 15) {
             if ($TargetType == 1) {
                 $TargetID = $LNG['cff_from_planet'];
             } elseif ($TargetType == 2) {
                 $TargetID = $LNG['cff_from_debris_field'];
             } elseif ($TargetType == 3) {
                 $TargetID = $LNG['cff_from_the_moon'];
             }
         } else {
             $TargetID = $LNG['cff_from_position'];
         }
         $TargetID .= $Names['target_planetname'] . ' ' . GetTargetAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
     }
     if ($MissionType == 10) {
         $EventString = $LNG['cff_missile_attack'] . " (" . str_replace("503,", "", $FleetRow["fleet_array"]) . ")";
         $Time = $FleetRow['fleet_start_time'];
         $Rest = $Time - TIMESTAMP;
         $EventString .= $LNG['cff_from'];
         $EventString .= $StartID;
         $EventString .= $LNG['cff_to'];
         $EventString .= $TargetID;
         $EventString .= ".";
     } else {
         if ($Owner == true) {
             if (($MissionType == 1 || $MissionType == 2) && $Status == 0 && $FleetRow['fleet_owner'] != $_SESSION['id']) {
                 $EventString = $LNG['cff_a'];
             } else {
                 $EventString = $LNG['cff_one_of_your'];
             }
             $EventString .= $FleetContent;
         } else {
             $EventString = $LNG['cff_a'];
             $EventString .= $FleetContent;
             $EventString .= $LNG['cff_of'];
             $EventString .= $this->BuildHostileFleetPlayerLink($FleetRow, $Names);
         }
         if ($Status == 0) {
             $Time = $FleetRow['fleet_start_time'];
             $Rest = $Time - TIMESTAMP;
             $EventString .= $LNG['cff_goes'];
             $EventString .= $StartID;
             $EventString .= $LNG['cff_toward'];
             $EventString .= $TargetID;
             $EventString .= $LNG['cff_with_the_mission_of'];
         } elseif ($Status == 1) {
             $Time = $FleetRow['fleet_end_time'];
             $Rest = $Time - TIMESTAMP;
//.........这里部分代码省略.........
开发者ID:sonicmaster,项目名称:RPG,代码行数:101,代码来源:class.FlyingFleetsTable.php

示例13: ReturnEvent

 function ReturnEvent()
 {
     global $LANG;
     $LNG = $this->getLanguage(NULL, $this->_fleet['fleet_owner']);
     $Message = sprintf($LNG['sys_tran_mess_owner'], 'Asteroid', GetStartAdressLink($this->_fleet, ''), pretty_number($this->_fleet['fleet_resource_metal']), $LNG['Metal'], pretty_number($this->_fleet['fleet_resource_crystal']), $LNG['Crystal'], pretty_number($this->_fleet['fleet_resource_deuterium']), $LNG['Deuterium']);
     SendSimpleMessage($this->_fleet['fleet_owner'], 0, $this->_fleet['fleet_end_time'], 5, $LNG['sys_mess_tower'], $LNG['sys_mess_fleetback'], $Message);
     $this->RestoreFleet();
 }
开发者ID:Decoder1978,项目名称:Xterium,代码行数:8,代码来源:MissionCaseCapture.php

示例14: BuildFleetEventTable

/**
 * BuildFleetEventTaple.php
 * @Licence GNU (GPL)
 * @version 3.0
 * @copyright 2009
 * @Team Space Beginner
 *
 **/
function BuildFleetEventTable($FleetRow, $Status, $Owner, $Label, $Record)
{
    global $lang;
    $FleetStyle = array(1 => 'attack', 2 => 'federation', 3 => 'transport', 4 => 'deploy', 5 => 'hold', 6 => 'espionage', 7 => 'colony', 8 => 'harvest', 9 => 'destroy', 10 => 'missile', 15 => 'transport');
    $FleetStatus = array(0 => 'flight', 1 => 'holding', 2 => 'return');
    if ($Owner == true) {
        $FleetPrefix = 'own';
    } else {
        $FleetPrefix = '';
    }
    $RowsTPL = gettemplate('ubersicht/ubersicht_02');
    $MissionType = $FleetRow['fleet_mission'];
    $FleetContent = CreateFleetPopupedFleetLink($FleetRow, $lang['over']['1022'], $FleetPrefix . $FleetStyle[$MissionType]);
    $FleetCapacity = CreateFleetPopupedMissionLink($FleetRow, $lang['type_mission'][$MissionType], $FleetPrefix . $FleetStyle[$MissionType]);
    $StartPlanet = doquery("SELECT `name` FROM {{table}} WHERE `galaxy` = '" . $FleetRow['fleet_start_galaxy'] . "' AND `system` = '" . $FleetRow['fleet_start_system'] . "' AND `planet` = '" . $FleetRow['fleet_start_planet'] . "' AND `planet_type` = '" . $FleetRow['fleet_start_type'] . "';", 'planets', true);
    $StartType = $FleetRow['fleet_start_type'];
    $TargetPlanet = doquery("SELECT `name` FROM {{table}} WHERE `galaxy` = '" . $FleetRow['fleet_end_galaxy'] . "' AND `system` = '" . $FleetRow['fleet_end_system'] . "' AND `planet` = '" . $FleetRow['fleet_end_planet'] . "' AND `planet_type` = '" . $FleetRow['fleet_end_type'] . "';", 'planets', true);
    $TargetType = $FleetRow['fleet_end_type'];
    if ($Status != 2) {
        if ($StartType == 1) {
            $StartID = $lang['over']['1001'];
        } elseif ($StartType == 3) {
            $StartID = $lang['over']['1002'];
        }
        $StartID .= $StartPlanet['name'] . " ";
        $StartID .= GetStartAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
        if ($MissionType != 15) {
            if ($TargetType == 1) {
                $TargetID = $lang['over']['1003'];
            } elseif ($TargetType == 2) {
                $TargetID = $lang['over']['1004'];
            } elseif ($TargetType == 3) {
                $TargetID = $lang['over']['1005'];
            }
        } else {
            $TargetID = $lang['over']['1006'];
        }
        $TargetID .= $TargetPlanet['name'] . " ";
        $TargetID .= GetTargetAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
    } else {
        if ($StartType == 1) {
            $StartID = $lang['over']['1007'];
        } elseif ($StartType == 3) {
            $StartID = $lang['over']['1007'];
        }
        $StartID .= $StartPlanet['name'] . " ";
        $StartID .= GetStartAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
        if ($MissionType != 15) {
            if ($TargetType == 1) {
                $TargetID = $lang['over']['1009'];
            } elseif ($TargetType == 2) {
                $TargetID = $lang['over']['1010'];
            } elseif ($TargetType == 3) {
                $TargetID = $lang['over']['1011'];
            }
        } else {
            $TargetID = $lang['over']['1012'];
        }
        $TargetID .= $TargetPlanet['name'] . " ";
        $TargetID .= GetTargetAdressLink($FleetRow, $FleetPrefix . $FleetStyle[$MissionType]);
    }
    if ($Owner == true) {
        $EventString = $lang['over']['1013'];
        $EventString .= $FleetContent;
    } elseif ($Owner == false and $MissionType == 5) {
        $EventString = $lang['ov_one_stranger'];
        $EventString .= $FleetContent;
        $EventString .= $lang['over']['1014'];
        $EventString .= BuildHostileFleetPlayerLink($FleetRow);
    } elseif ($Owner == false and $MissionType == 2) {
        $EventString = $lang['ov_one_stranger'];
        $EventString .= $FleetContent;
        $EventString .= $lang['over']['1014'];
        $EventString .= BuildHostileFleetPlayerLink($FleetRow);
    } else {
        $EventString = $lang['over']['1015'];
        $EventString .= $FleetContent;
        $EventString .= $lang['ov_hostile'];
        $EventString .= BuildHostileFleetPlayerLink($FleetRow);
    }
    if ($Status == 0) {
        $Time = $FleetRow['fleet_start_time'];
        $Rest = $Time - time();
        $EventString .= $lang['over']['1016'];
        // ' venant '
        $EventString .= $StartID;
        $EventString .= $lang['over']['1017'];
        // ' atteint '
        $EventString .= $TargetID;
        $EventString .= $lang['over']['1021'];
        // '. Elle avait pour mission: '
    } elseif ($Status == 1) {
//.........这里部分代码省略.........
开发者ID:sonicmaster,项目名称:RPG,代码行数:101,代码来源:BuildFleetEventTable.php

示例15: GetEventString

 public function GetEventString($FleetRow, $Status, $Owner, $Label, $Record)
 {
     global $LNG;
     $FleetStyle = array(1 => 'attack', 2 => 'federation', 3 => 'transport', 4 => 'deploy', 5 => 'hold', 6 => 'espionage', 7 => 'colony', 8 => 'harvest', 9 => 'destroy', 10 => 'missile', 15 => 'transport');
     $GoodMissions = array(3, 5);
     $MissionType = $FleetRow['fleet_mission'];
     $Names = $this->GetNames($FleetRow);
     $FleetPrefix = $Owner == true ? 'own' : '';
     $FleetType = $FleetPrefix . $FleetStyle[$MissionType];
     $FleetContent = $this->CreateFleetPopupedFleetLink($FleetRow, ($MissionType == 1 || $MissionType == 2) && $FleetRow['fleet_owner'] != $_SESSION['id'] && $Status == 0 && $Owner == true ? $LNG['cff_acs_fleet'] : $LNG['ov_fleet'], $FleetPrefix . $FleetStyle[$MissionType]);
     $FleetCapacity = $this->CreateFleetPopupedMissionLink($FleetRow, $LNG['type_mission'][$MissionType], $FleetPrefix . $FleetStyle[$MissionType]);
     $FleetStatus = array(0 => 'flight', 1 => 'return', 2 => 'holding');
     $StartType = $FleetRow['fleet_start_type'] == 1 ? $LNG['fcm_planet'] : $LNG['fcm_moon'];
     $TargetType = $FleetRow['fleet_end_type'] == 1 ? $LNG['fcm_planet'] : $LNG['fcm_moon'];
     if ($MissionType == 8) {
         if ($Status == 0) {
             $EventString = sprintf($LNG['cff_mission_own_recy_0'], $FleetContent, $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
         } else {
             $EventString = sprintf($LNG['cff_mission_own_recy_1'], $FleetContent, GetTargetAdressLink($FleetRow, $FleetType), $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $FleetCapacity);
         }
     } elseif ($MissionType == 10) {
         if ($Owner) {
             $EventString = sprintf($LNG['cff_mission_own_mip'], $FleetRow['fleet_amount'], $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType));
         } else {
             $EventString = sprintf($LNG['cff_mission_target_mip'], $FleetRow['fleet_amount'], $this->BuildHostileFleetPlayerLink($FleetRow, $Names), $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType));
         }
     } elseif ($MissionType == 11 || $MissionType == 15) {
         if ($Status == 0) {
             $EventString = sprintf($LNG['cff_mission_own_expo_0'], $FleetContent, $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
         } elseif ($Status == 2) {
             $EventString = sprintf($LNG['cff_mission_own_expo_2'], $FleetContent, $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
         } else {
             $EventString = sprintf($LNG['cff_mission_own_expo_1'], $FleetContent, GetTargetAdressLink($FleetRow, $FleetType), $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $FleetCapacity);
         }
     } else {
         if ($Owner == true) {
             if ($Status == 0) {
                 if (($MissionType == 1 || $MissionType == 2) && $Status == 0 && $FleetRow['fleet_owner'] != $_SESSION['id']) {
                     $Message = $LNG['cff_mission_acs'];
                 } else {
                     $Message = $LNG['cff_mission_own_0'];
                 }
                 $EventString = sprintf($Message, $FleetContent, $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
             } elseif ($Status == 1) {
                 $EventString = sprintf($LNG['cff_mission_own_1'], $FleetContent, $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType), $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $FleetCapacity);
             } else {
                 $EventString = sprintf($LNG['cff_mission_own_2'], $FleetContent, $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
             }
         } else {
             if ($Status == 2) {
                 $Message = $LNG['cff_mission_target_stay'];
             } elseif (in_array($MissionType, $GoodMissions)) {
                 $Message = $LNG['cff_mission_target_good'];
             } else {
                 $Message = $LNG['cff_mission_target_bad'];
             }
             $EventString = sprintf($Message, $FleetContent, $this->BuildHostileFleetPlayerLink($FleetRow, $Names), $StartType, $Names['own_planetname'], GetStartAdressLink($FleetRow, $FleetType), $TargetType, $Names['target_planetname'], GetTargetAdressLink($FleetRow, $FleetType), $FleetCapacity);
         }
     }
     $EventString = '<span class="' . $FleetStatus[$Status] . ' ' . $FleetType . '">' . $EventString . '</span>';
     if ($Status == 0) {
         $Time = $FleetRow['fleet_start_time'];
     } elseif ($Status == 1) {
         $Time = $FleetRow['fleet_end_time'];
     } elseif ($Status == 2) {
         $Time = $FleetRow['fleet_end_stay'];
     }
     $Rest = $Time - TIMESTAMP;
     return array($Rest, $EventString, $Time);
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:70,代码来源:class.FlyingFleetsTable.php


注:本文中的GetStartAdressLink函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。