Exemplo n.º 1
0
 /**
  * method planet_name_block
  * param
  * return ally link and information for the current planet
  */
 private function planet_name_block()
 {
     $phalanx_link = stripslashes($this->_row_data['planet_name']);
     if ($this->_row_data['planet_destroyed'] == 0) {
         if ($this->is_phalanx_active()) {
             $attributes = "onclick=fenster('game.php?page=phalanx&galaxy=" . $this->_galaxy . "&system=" . $this->_system . "&planet=" . $this->_planet . "&planettype=" . self::PLANET_TYPE . "')";
             $phalanx_link = Functions_Lib::set_url('', 'Phalanx', $this->_row_data['planet_name'], $attributes);
         }
         $planetname = $phalanx_link;
         if ($this->_row_data['planet_last_update'] > time() - 59 * 60 && $this->_row_data['user_id'] != $this->_current_user['user_id']) {
             if ($this->_row_data['planet_last_update'] > time() - 10 * 60 && $this->_row_data['user_id'] != $this->_current_user['user_id']) {
                 $planetname .= "(*)";
             } else {
                 $planetname .= " (" . Format_Lib::pretty_time_hour(time() - $this->_row_data['planet_last_update']) . ")";
             }
         }
     } else {
         $planetname = $this->_lang['gl_planet_destroyed'];
     }
     return $planetname;
 }