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


PHP Functions_Lib::set_image方法代码示例

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


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

示例1: actions_block

 /**
  * method actions_block
  * param
  * return all galaxy possible actions for the current planet
  */
 private function actions_block()
 {
     $links = '';
     if ($this->_row_data['user_id'] != $this->_current_user['user_id']) {
         if ($this->_current_user['setting_galaxy_espionage'] == '1') {
             $image = Functions_Lib::set_image(DPATH . 'img/e.gif', $this->_lang['gl_spy']);
             $attributes = "onclick=\"javascript:doit(6, " . $this->_galaxy . ", " . $this->_system . ", " . $this->_planet . ", 1, " . $this->_current_user['setting_probes_amount'] . ");\"";
             $links .= Functions_Lib::set_url('', '', $image, $attributes) . ' ';
         }
         if ($this->_current_user['setting_galaxy_write'] == '1') {
             $image = Functions_Lib::set_image(DPATH . 'img/m.gif', $this->_lang['write_message']);
             $url = 'game.php?page=messages&mode=write&id=' . $this->_row_data['user_id'] . '>';
             $links .= Functions_Lib::set_url($url, '', $image) . ' ';
         }
         if ($this->_current_user['setting_galaxy_buddy'] == '1') {
             $image = Functions_Lib::set_image(DPATH . 'img/b.gif', $this->_lang['gl_buddy_request']);
             $attributes = "onClick=\"f('game.php?page=buddy&mode=2&u=" . $this->_row_data['user_id'] . "', '" . $this->_lang['gl_buddy_request'] . "')\"";
             $links .= Functions_Lib::set_url('', '', $image, $attributes) . ' ';
         }
         if ($this->_current_user['setting_galaxy_missile'] == '1' && $this->is_missile_active()) {
             $image = Functions_Lib::set_image(DPATH . 'img/r.gif', $this->_lang['gl_missile_attack']);
             $url = 'game.php?page=galaxy&mode=2&galaxy=' . $this->_galaxy . '&system=' . $this->_system . '&planet=' . $this->_planet . '&current=' . $this->_current_user['user_current_planet'];
             $links .= Functions_Lib::set_url($url, '', $image) . ' ';
         }
     }
     return $links;
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:32,代码来源:Galaxy_Lib.php

示例2: get_planets

 /**
  * method get_planets
  * param
  * return all the user planets
  */
 private function get_planets()
 {
     $colony = 1;
     $planets_query = parent::$db->query("SELECT *\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM " . PLANETS . " AS p\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . BUILDINGS . " AS b ON b.building_planet_id = p.`planet_id`\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . DEFENSES . " AS d ON d.defense_planet_id = p.`planet_id`\r\n\t\t\t\t\t\t\t\t\t\t\t\tINNER JOIN " . SHIPS . " AS s ON s.ship_planet_id = p.`planet_id`\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE `planet_user_id` = '" . (int) $this->_current_user['user_id'] . "'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND `planet_destroyed` = 0;");
     $planet_block = '<tr>';
     while ($user_planet = parent::$db->fetch_array($planets_query)) {
         if ($user_planet['planet_id'] != $this->_current_user['user_current_planet'] && $user_planet['planet_type'] != 3) {
             $url = 'game.php?page=overview&cp=' . $user_planet['planet_id'] . '&re=0';
             $image = DPATH . 'planets/small/s_' . $user_planet['planet_image'] . '.jpg';
             $attributes = 'height="50" width="50"';
             $planet_block .= '<th>' . $user_planet['planet_name'] . '<br>';
             $planet_block .= Functions_Lib::set_url($url, $user_planet['planet_name'], Functions_Lib::set_image($image, $user_planet['planet_name'], $attributes));
             $planet_block .= '<center>';
             $planet_block .= $this->get_current_work($user_planet, FALSE);
             $planet_block .= '</center></th>';
             if ($colony <= 1) {
                 $colony++;
             } else {
                 $planet_block .= '</tr><tr>';
                 $colony = 1;
             }
         }
     }
     $planet_block .= '</tr>';
     // CLEAN SOME MEMORY
     parent::$db->free_result($planets_query);
     return $planet_block;
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:33,代码来源:overview.php

示例3: image_block

 /**
  * method image_block
  * param $alliance_image
  * return shows the image block, if any
  */
 private function image_block($alliance_image)
 {
     if ($alliance_image != '') {
         return '<tr><th colspan="2">' . Functions_Lib::set_image($alliance_image, $alliance_image) . '</td></tr>';
     }
     return '';
 }
开发者ID:Gritch69,项目名称:XG-Project,代码行数:12,代码来源:alliance.php


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