當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。