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


PHP Functions_Lib::set_url方法代码示例

本文整理汇总了PHP中Functions_Lib::set_url方法的典型用法代码示例。如果您正苦于以下问题:PHP Functions_Lib::set_url方法的具体用法?PHP Functions_Lib::set_url怎么用?PHP Functions_Lib::set_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Functions_Lib的用法示例。


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

示例1: build_page

 /**
  * method build_page
  * param
  * return main method, loads everything
  */
 private function build_page()
 {
     $parse = $this->_lang;
     $tech_row_template = parent::$page->get_template('buildings/buildings_research_row');
     $tech_script_template = parent::$page->get_template('buildings/buildings_research_script');
     $technology_list = '';
     // time to do something
     $this->do_command();
     // build the page
     foreach ($this->_lang['tech'] as $tech => $tech_name) {
         if ($tech > 105 && $tech <= 199) {
             if (Developments_Lib::is_development_allowed($this->_current_user, $this->_current_planet, $tech)) {
                 $RowParse['dpath'] = DPATH;
                 $RowParse['tech_id'] = $tech;
                 $building_level = $this->_current_user[$this->_resource[$tech]];
                 $RowParse['tech_level'] = Developments_Lib::set_level_format($building_level, $tech, $this->_current_user);
                 $RowParse['tech_name'] = $tech_name;
                 $RowParse['tech_descr'] = $this->_lang['res']['descriptions'][$tech];
                 $RowParse['tech_price'] = Developments_Lib::formated_development_price($this->_current_user, $this->_current_planet, $tech);
                 $SearchTime = Developments_Lib::development_time($this->_current_user, $this->_current_planet, $tech, FALSE, $this->_lab_level);
                 $RowParse['search_time'] = Developments_Lib::formated_development_time($SearchTime);
                 if (!$this->_is_working['is_working']) {
                     if (Developments_Lib::is_development_payable($this->_current_user, $this->_current_planet, $tech) && !parent::$users->is_on_vacations($this->_current_user)) {
                         if (!$this->is_laboratory_in_queue()) {
                             $action_link = Format_Lib::color_red($this->_lang['bd_research']);
                         } else {
                             $action_link = Functions_Lib::set_url('game.php?page=research&cmd=search&tech=' . $tech, '', Format_Lib::color_green($this->_lang['bd_research']));
                         }
                     } else {
                         $action_link = Format_Lib::color_red($this->_lang['bd_research']);
                     }
                 } else {
                     if ($this->_is_working['working_on']['planet_b_tech_id'] == $tech) {
                         $bloc = $this->_lang;
                         if ($this->_is_working['working_on']['id'] != $this->_current_planet['planet_id']) {
                             $bloc['tech_time'] = $this->_is_working['working_on']['planet_b_tech'] - time();
                             $bloc['tech_name'] = $this->_lang['bd_from'] . $this->_is_working['working_on']['planet_name'] . '<br /> ' . Format_Lib::pretty_coords($this->_is_working['working_on']['planet_galaxy'], $this->_is_working['working_on']['planet_system'], $this->_is_working['working_on']['planet_planet']);
                             $bloc['tech_home'] = $this->_is_working['working_on']['id'];
                             $bloc['tech_id'] = $this->_is_working['working_on']['planet_b_tech_id'];
                         } else {
                             $bloc['tech_time'] = $this->_current_planet['planet_b_tech'] - time();
                             $bloc['tech_name'] = '';
                             $bloc['tech_home'] = $this->_current_planet['planet_id'];
                             $bloc['tech_id'] = $this->_current_planet['planet_b_tech_id'];
                         }
                         $action_link = parent::$page->parse_template($tech_script_template, $bloc);
                     } else {
                         $action_link = "<center>-</center>";
                     }
                 }
                 $RowParse['tech_link'] = $action_link;
                 $technology_list .= parent::$page->parse_template($tech_row_template, $RowParse);
             }
         }
     }
     $parse['noresearch'] = !$this->is_laboratory_in_queue() ? $this->_lang['bd_building_lab'] : '';
     $parse['technolist'] = $technology_list;
     parent::$page->display(parent::$page->parse_template(parent::$page->get_template('buildings/buildings_research'), $parse));
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:64,代码来源:research.php

示例2: get_user_rank

 /**
  * method get_user_rank
  * param
  * return the current user rank
  */
 private function get_user_rank()
 {
     $stats_available = Functions_Lib::read_config('stat');
     $user_rank = '-';
     $total_rank = $this->_current_user['user_statistic_total_rank'] == '' ? $this->_current_planet['stats_users'] : $this->_current_user['user_statistic_total_rank'];
     if ($stats_available && $this->_current_user['user_authlevel'] <= Functions_Lib::read_config('stat_level') or !$stats_available && $this->_current_user['user_authlevel'] == 0) {
         $user_rank = Format_Lib::pretty_number($this->_current_user['user_statistic_total_points']) . " (" . $this->_lang['ov_place'] . ' ' . Functions_Lib::set_url('game.php?page=statistics&range=' . $total_rank, $total_rank, $total_rank) . ' ' . $this->_lang['ov_of'] . ' ' . $this->_current_planet['stats_users'] . ")";
     }
     return $user_rank;
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:15,代码来源:overview.php

示例3: phalanx_link

 /**
  * method phalanx_link
  * param $planet_type
  * return phalanx link
  */
 private function phalanx_link($planet_type)
 {
     $attributes = "onclick=fenster(&#039;game.php?page=phalanx&galaxy=" . $this->_galaxy . "&amp;system=" . $this->_system . "&amp;planet=" . $this->_planet . "&amp;planettype=" . $planet_type . "&#039;)";
     return str_replace('"', '', Functions_Lib::set_url('', '', $this->_lang['gl_phalanx'], $attributes));
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:10,代码来源:Galaxy_Lib.php

示例4: set_action_button

 /**
  * method do_command
  * param $have_fields
  * param $full_queue
  * param $building
  * param $queue
  * return (string) $action
  */
 private function set_action_button($have_fields, $full_queue, $building, $queue)
 {
     // all field occupied
     $action = Format_Lib::color_red($this->_lang['bd_no_more_fields']);
     // with fields
     if ($have_fields && !$full_queue) {
         if ($queue['lenght'] == 0) {
             if (Developments_Lib::is_development_payable($this->_current_user, $this->_current_planet, $building, TRUE, FALSE) && !parent::$users->is_on_vacations($this->_current_user)) {
                 $action = Functions_Lib::set_url('game.php?page=' . $this->_current_page . '&cmd=insert&building=' . $building, '', Format_Lib::color_green($this->_lang['bd_build']));
             } else {
                 $action = Format_Lib::color_red($this->_lang['bd_build']);
             }
         } else {
             $action = Functions_Lib::set_url('game.php?page=' . $this->_current_page . '&cmd=insert&building=' . $building, '', Format_Lib::color_green($this->_lang['bd_add_to_list']));
         }
     }
     if ($have_fields && $full_queue) {
         $action = Format_Lib::color_red($this->_lang['bd_build']);
     }
     if ($building == 31 && Developments_Lib::is_lab_working($this->_current_user) or ($building == 21 or $building == 14 or $building == 15) && Developments_Lib::is_shipyard_working($this->_current_planet)) {
         $action = Format_Lib::color_red($this->_lang['bd_working']);
     }
     return $action;
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:32,代码来源:buildings.php

示例5: request_block

 /**
  * method image_block
  * param $ally_id
  * param $alliance_request
  * return shows the request block, if any
  */
 private function request_block($ally_id, $alliance_request)
 {
     if (!$this->_current_user['user_ally_id'] && !$this->_current_user['user_ally_request'] && !$alliance_request) {
         $url = 'game.php?page=alliance&mode=apply&allyid=' . $ally_id;
         $url = Functions_Lib::set_url($url, $this->_lang['al_click_to_send_request'], $this->_lang['al_click_to_send_request']);
         return '<tr><th>' . $this->_lang['al_request'] . '</th><th>' . $url . '</th></tr>';
     }
     return '';
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:15,代码来源:alliance.php

示例6: buildReportLink

 /**
  * buildReportLink
  *
  * @param string $color Color
  * @param string $rid   Report ID
  * @param int    $g     Galaxy
  * @param int    $s     System
  * @param int    $p     Planet
  *
  * @return string
  */
 private function buildReportLink($color, $rid, $g, $s, $p)
 {
     $style = 'style="color:' . $color . ';"';
     $js = "OnClick=\\'f(\"game.php?page=combatreport&report=" . $rid . "\", \"\");\\'";
     $content = $this->_lang['sys_mess_attack_report'] . ' ' . Format_Lib::pretty_coords($g, $s, $p);
     return Functions_Lib::set_url('', '', $content, $style . ' ' . $js);
 }
开发者ID:saiikup,项目名称:XG-Proyect-v3.x.x,代码行数:18,代码来源:attack.php


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