本文整理汇总了PHP中Functions_Lib::chrono_applet方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions_Lib::chrono_applet方法的具体用法?PHP Functions_Lib::chrono_applet怎么用?PHP Functions_Lib::chrono_applet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Functions_Lib
的用法示例。
在下文中一共展示了Functions_Lib::chrono_applet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_page
//.........这里部分代码省略.........
} elseif ($this->_element_id >= 22 && $this->_element_id <= 24) {
$PageTPL = parent::$page->get_template('infos/info_buildings_table');
$DestroyTPL = parent::$page->get_template('infos/info_buildings_destroy');
$TableHeadTPL = parent::$page->get_template('infos/info_storage_header');
$TableTPL = parent::$page->get_template('infos/info_storage_table');
} elseif ($this->_element_id == 12) {
$TableHeadTPL = parent::$page->get_template('infos/info_energy_header');
$TableTPL = parent::$page->get_template('infos/info_energy_body');
} elseif ($this->_element_id == 42) {
$TableHeadTPL = parent::$page->get_template('infos/info_range_header');
$TableTPL = parent::$page->get_template('infos/info_range_body');
} elseif ($this->_element_id == 43) {
$GateTPL = parent::$page->get_template('infos/info_gate_table');
if ($_POST) {
Functions_Lib::message($this->DoFleetJump(), "game.php?page=infos&gid=43", 2);
}
} elseif ($this->_element_id == 124) {
$PageTPL = parent::$page->get_template('infos/info_buildings_table');
$DestroyTPL = parent::$page->get_template('infos/info_buildings_destroy');
$TableHeadTPL = parent::$page->get_template('infos/info_astrophysics_header');
$TableTPL = parent::$page->get_template('infos/info_astrophysics_table');
$TableFooterTPL = parent::$page->get_template('infos/info_astrophysics_footer');
} elseif ($this->_element_id >= 202 && $this->_element_id <= 250) {
$PageTPL = parent::$page->get_template('infos/info_buildings_fleet');
$parse['element_typ'] = $this->_lang['tech'][200];
$parse['rf_info_to'] = $this->ShowRapidFireTo();
$parse['rf_info_fr'] = $this->ShowRapidFireFrom();
$parse['hull_pt'] = Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['metal'] + $this->_pricelist[$this->_element_id]['crystal']);
$parse['shield_pt'] = Format_Lib::pretty_number($this->_combat_caps[$this->_element_id]['shield']);
$parse['attack_pt'] = Format_Lib::pretty_number($this->_combat_caps[$this->_element_id]['attack']);
$parse['capacity_pt'] = Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['capacity']);
$parse['base_speed'] = Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['speed']);
$parse['base_conso'] = Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['consumption']);
if ($this->_element_id == 202) {
$parse['upd_speed'] = "<font color=\"yellow\">(" . Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['speed2']) . ")</font>";
$parse['upd_conso'] = "<font color=\"yellow\">(" . Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['consumption2']) . ")</font>";
} elseif ($this->_element_id == 211) {
$parse['upd_speed'] = "<font color=\"yellow\">(" . Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['speed2']) . ")</font>";
}
} elseif ($this->_element_id >= 401 && $this->_element_id <= 550) {
$PageTPL = parent::$page->get_template('infos/info_buildings_defense');
$parse['element_typ'] = $this->_lang['tech'][400];
if ($this->_element_id < 500) {
$parse['rf_info_to'] = $this->ShowRapidFireTo();
$parse['rf_info_fr'] = $this->ShowRapidFireFrom();
}
$parse['hull_pt'] = Format_Lib::pretty_number($this->_pricelist[$this->_element_id]['metal'] + $this->_pricelist[$this->_element_id]['crystal']);
$parse['shield_pt'] = Format_Lib::pretty_number($this->_combat_caps[$this->_element_id]['shield']);
$parse['attack_pt'] = Format_Lib::pretty_number($this->_combat_caps[$this->_element_id]['attack']);
}
if ($TableHeadTPL != '') {
$parse['table_head'] = parent::$page->parse_template($TableHeadTPL, $this->_lang);
if ($this->_element_id >= 22 && $this->_element_id <= 24) {
$parse['table_data'] = $this->storage_table($TableTPL);
} elseif ($this->_element_id == 124) {
$parse['table_data'] = $this->astrophysics_table($TableTPL);
} else {
$parse['table_data'] = $this->ShowProductionTable($TableTPL);
}
}
if ($TableFooterTPL != '') {
$parse['table_footer'] = parent::$page->parse_template($TableFooterTPL, $this->_lang);
}
$page = parent::$page->parse_template($PageTPL, $parse);
if ($GateTPL != '') {
if ($this->_current_planet[$this->_resource[$this->_element_id]] > 0) {
$RestString = $this->GetNextJumpWaitTime($this->_current_planet);
$parse['gate_start_link'] = $this->planet_link($this->_current_planet);
if ($RestString['value'] != 0) {
$parse['gate_time_script'] = Functions_Lib::chrono_applet("Gate", "1", $RestString['value'], TRUE);
$parse['gate_wait_time'] = "<div id=\"bxx" . "Gate" . "1" . "\"></div>";
$parse['gate_script_go'] = Functions_Lib::chrono_applet("Gate", "1", $RestString['value'], FALSE);
} else {
$parse['gate_time_script'] = "";
$parse['gate_wait_time'] = "";
$parse['gate_script_go'] = "";
}
$parse['gate_dest_moons'] = $this->BuildJumpableMoonCombo($this->_current_user, $this->_current_planet);
$parse['gate_fleet_rows'] = $this->BuildFleetListRows($this->_current_planet);
$page .= parent::$page->parse_template($GateTPL, $parse);
}
}
if ($DestroyTPL != '') {
if (isset($this->_current_planet[$this->_resource[$this->_element_id]]) && $this->_current_planet[$this->_resource[$this->_element_id]] > 0) {
$NeededRessources = Developments_Lib::development_price($this->_current_user, $this->_current_planet, $this->_element_id, TRUE, TRUE);
$DestroyTime = Developments_Lib::development_time($this->_current_user, $this->_current_planet, $this->_element_id) / 2;
$parse['destroyurl'] = "game.php?page=" . Developments_Lib::set_building_page($this->_element_id) . "&cmd=destroy&building=" . $this->_element_id;
$parse['levelvalue'] = $this->_current_planet[$this->_resource[$this->_element_id]];
$parse['nfo_metal'] = $this->_lang['Metal'];
$parse['nfo_crysta'] = $this->_lang['Crystal'];
$parse['nfo_deuter'] = $this->_lang['Deuterium'];
$parse['metal'] = Format_Lib::pretty_number($NeededRessources['metal']);
$parse['crystal'] = Format_Lib::pretty_number($NeededRessources['crystal']);
$parse['deuterium'] = Format_Lib::pretty_number($NeededRessources['deuterium']);
$parse['destroytime'] = Format_Lib::pretty_time($DestroyTime);
$page .= parent::$page->parse_template($DestroyTPL, $parse);
}
}
parent::$page->display($page);
}
示例2: flying_fleets_table
//.........这里部分代码省略.........
if ($MissionType != 15) {
switch ($TargetType) {
case 1:
$TargetID = parent::$lang['cff_the_planet'];
break;
case 2:
$TargetID = parent::$lang['cff_debris_field'];
break;
case 3:
$TargetID = parent::$lang['cff_to_the_moon'];
break;
}
} else {
$TargetID = parent::$lang['cff_the_position'];
}
$TargetID .= $planet_name['target_planet_name'] . " ";
$TargetID .= Fleets_Lib::target_link($fleet_row, $FleetPrefix . $FleetStyle[$MissionType]);
} else {
if ($StartType == 1) {
$StartID = parent::$lang['cff_to_the_planet'];
} elseif ($StartType == 3) {
$StartID = parent::$lang['cff_the_moon'];
}
$StartID .= $planet_name['start_planet_name'] . " ";
$StartID .= Fleets_Lib::start_link($fleet_row, $FleetPrefix . $FleetStyle[$MissionType]);
if ($MissionType != 15) {
switch ($TargetType) {
case 1:
$TargetID = parent::$lang['cff_from_planet'];
break;
case 2:
$TargetID = parent::$lang['cff_from_debris_field'];
break;
case 3:
$TargetID = parent::$lang['cff_from_the_moon'];
break;
}
} else {
$TargetID = parent::$lang['cff_from_position'];
}
$TargetID .= $planet_name['target_planet_name'] . " ";
$TargetID .= Fleets_Lib::target_link($fleet_row, $FleetPrefix . $FleetStyle[$MissionType]);
}
if ($MissionType == 10) {
$EventString = parent::$lang['cff_missile_attack'] . " ( " . preg_replace("(503,)i", "", $fleet_row['fleet_array']) . " ) ";
$Time = $fleet_row['fleet_start_time'];
$Rest = $Time - time();
$EventString .= $StartID;
$EventString .= parent::$lang['cff_to'];
$EventString .= $TargetID;
$EventString .= ".";
} else {
if ($Owner == TRUE) {
$EventString = parent::$lang['cff_one_of_your'];
$EventString .= $FleetContent;
} else {
$EventString = parent::$lang['cff_a'];
$EventString .= $FleetContent;
$EventString .= parent::$lang['cff_of'];
$EventString .= self::enemy_link($fleet_row);
}
switch ($Status) {
case 0:
$Time = $fleet_row['fleet_start_time'];
$Rest = $Time - time();
$EventString .= parent::$lang['cff_goes'];
$EventString .= $StartID;
$EventString .= parent::$lang['cff_toward'];
$EventString .= $TargetID;
$EventString .= parent::$lang['cff_with_the_mission_of'];
break;
case 1:
$Time = $fleet_row['fleet_end_stay'];
$Rest = $Time - time();
$EventString .= parent::$lang['cff_goes'];
$EventString .= $StartID;
$EventString .= parent::$lang['cff_to_explore'];
$EventString .= $TargetID;
$EventString .= parent::$lang['cff_with_the_mission_of'];
break;
case 2:
$Time = $fleet_row['fleet_end_time'];
$Rest = $Time - time();
$EventString .= parent::$lang['cff_comming_back'];
$EventString .= $TargetID;
$EventString .= $StartID;
$EventString .= parent::$lang['cff_with_the_mission_of'];
break;
}
$EventString .= $FleetCapacity;
}
$bloc['fleet_status'] = $FleetStatus[$Status];
$bloc['fleet_prefix'] = $FleetPrefix;
$bloc['fleet_style'] = $FleetStyle[$MissionType];
$bloc['fleet_javai'] = Functions_Lib::chrono_applet($Label, $Record, $Rest, TRUE);
$bloc['fleet_order'] = $Label . $Record;
$bloc['fleet_descr'] = $EventString;
$bloc['fleet_javas'] = Functions_Lib::chrono_applet($Label, $Record, $Rest, FALSE);
return parent::$page->parse_template($RowsTPL, $bloc);
}