$services .= '<img src="/style/img/facilities/' . $name . '.png" alt="' . $name . '" style="margin-right:10px" onmouseover="$(\'#' . $name . '_' . $station_id . '\').fadeToggle(\'fast\')" onmouseout="$(\'#' . $name . '_' . $station_id . '\').toggle()" />';
                $services .= '<div class="facilityinfo" style="display:none" id="' . $name . '_' . $station_id . '">Station has ' . $dname . '</div>';
            } else {
                $services .= '<img src="/style/img/facilities/' . $name . '_not.png" alt="' . $name . ' not included" style="margin-right:10px" onmouseover="$(\'#' . $name . '_not_' . $station_id . '\').fadeToggle(\'fast\')" onmouseout="$(\'#' . $name . '_not_' . $station_id . '\').toggle()" />';
                $services .= '<div class="facilityinfo" style="display:none" id="' . $name . '_not_' . $station_id . '">Station doesn\'t have ' . $dname . '</div>';
            }
        }
        $info = $s_faction . $s_information . $import_commodities . $export_commodities . $prohibited_commodities;
        $info = str_replace("['", "", $info);
        $info = str_replace("']", "", $info);
        $info = str_replace("', '", ", ", $info);
        $economies = str_replace("['", "", $economies);
        $economies = str_replace("']", "", $economies);
        $economies = str_replace("', '", ", ", $economies);
        // get allegiance icon
        $allegiance_icon = get_allegiance_icon($s_allegiance);
        $data['si_stations'] .= '<div class="systeminfo_station" style="background-image:url(/style/img/' . $allegiance_icon . ');background-repeat:no-repeat;background-position:right 0 bottom -2px">';
        //$data['si_stations'] .= '<div class="heading" onclick="$(\'#info_'.$station_id.'\').toggle();$(\'#prices_'.$station_id.'\').toggle()">';
        $data['si_stations'] .= '<div class="heading">';
        $data['si_stations'] .= '' . $icon . '' . $s_name . '	<span style="font-weight:normal;font-size:10px">
																[ ' . $type . ' - ' . $s_allegiance . ' - ' . $s_government . ' - ' . $economies . ' ]
															</span>';
        $data['si_stations'] .= '<span style="float:right"><a href="http://eddb.io/station/' . $station_id . '" title="View station on eddb.io" target="_BLANK"><img src="/style/img/eddb.png" alt="EDDB" /></a></span>';
        $data['si_stations'] .= '</div><div class="wpsearch" id="wpsearch_' . $station_id . '" style="display:none"></div>';
        $data['si_stations'] .= '<div id="info_' . $station_id . '" class="systeminfo_station_info">';
        //$data['si_stations'] .= $services;
        //$data['si_stations'] .= "<br /><br />";
        $data['si_stations'] .= $info;
        if ($info != "") {
            $data['si_stations'] .= "<br />";
        }
示例#2
0
    /**
     * Display the results
     *
     * @param mysqli_result $main_result
     */
    private function results($main_result)
    {
        $count = $main_result->num_rows;
        if ($count > 0) {
            $last_system = "";
            $ii = 0;
            $tdclass = "";
            while ($obj = $main_result->fetch_object()) {
                $system = $obj->system;
                $system_id = $obj->system_id;
                $sys_population = number_format($obj->population);
                $sys_economy = empty($obj->economy) ? "n/a" : $obj->economy;
                $sys_government = $obj->government;
                $sys_security = empty($obj->security) ? "None" : $obj->security;
                $allegiance = $obj->allegiance;
                $station_name = $obj->station_name;
                /**
                 * provide crosslinks to screenshot gallery, log page, etc
                 */
                $ns_crosslinks = System::crosslinks($system);
                $ss_coordx = $obj->coordx;
                $ss_coordy = $obj->coordy;
                $ss_coordz = $obj->coordz;
                $distance = sqrt(pow($ss_coordx - $this->usex, 2) + pow($ss_coordy - $this->usey, 2) + pow($ss_coordz - $this->usez, 2));
                /**
                 * get allegiance icon for system
                 */
                $pic = get_allegiance_icon($allegiance);
                if ($system != $last_system) {
                    $tdclass = $tdclass == "light" ? "dark" : "light";
                    ?>
                    <tr>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
" style="text-align:center">
                        <img src="/style/img/<?php 
                    echo $pic;
                    ?>
" class="allegiance_icon"
                             alt="<?php 
                    echo $allegiance;
                    ?>
" style="margin:0"/>
                    </td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
">
                        <?php 
                    echo number_format($distance, 2);
                    ?>
 ly<?php 
                    echo $this->is_unknown;
                    ?>
                    </td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
">
                        <a class="send" href="javascript:void(0)" data-send="<?php 
                    echo $system;
                    ?>
"
                           data-id="<?php 
                    echo $system_id;
                    ?>
">
                            <img class="icon" src="/style/img/magic.png" alt="Send"
                                 style="margin-bottom:7px;margin-right:0"
                                 onmouseover="to_view('sysinfo', event)"
                                 onmouseout="$('#sysinfo').fadeToggle('fast')"/>
                        </a>
                        <a href="/System?system_id=<?php 
                    echo $system_id;
                    ?>
">
                            <?php 
                    echo $system;
                    ?>
                        </a>
                        <?php 
                    echo $ns_crosslinks;
                    ?>
                    </td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
"><?php 
                    echo $sys_population;
                    ?>
</td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
"><?php 
                    echo $sys_economy;
                    ?>
</td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
"><?php 
                    echo $sys_government;
                    ?>
</td>
                    <td class="<?php 
                    echo $tdclass;
                    ?>
"><?php 
                    echo $sys_security;
                    ?>
</td>
                    <?php 
                } else {
                    ?>
                    <tr>
                    <td class="transparent" colspan="7" style="height:45px">&nbsp;</td>
                    <?php 
                }
                /**
                 * display station info if necessary
                 */
                if (!empty($station_name)) {
                    $this->station_info($station_name, $obj, $tdclass);
                }
                ?>
                </tr>
                <?php 
                $last_system = $system;
                $ii++;
            }
            // end of while
        } else {
            $colspan = $this->stations !== false ? "10" : "7";
            ?>
            <tr>
                <td class="light" colspan="<?php 
            echo $colspan;
            ?>
">None found!</td>
            </tr>
            <?php 
        }
    }
示例#3
0
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */
/**
 * System title for the left column
 */
$data["system_title"] .= "";
$pic = get_allegiance_icon($curSys["allegiance"]);
$data["system_title"] .= '<div class="leftpanel-add-data">';
$data["system_title"] .= '<a href="javascript:void(0)" id="toggle" onclick="setbm(\'' . addslashes($curSys["name"]) . '\', \'' . $curSys["id"] . '\');tofront(\'addBm\');$(\'#bm_text\').focus()" title="Bookmark system">';
$data["system_title"] .= '<img src="/style/img/' . $pic . '" class="allegiance_icon" alt="' . $curSys["allegiance"] . '" />';
$data["system_title"] .= '</a>';
$data["system_title"] .= '</div>';
if (!isset($_COOKIE["style"]) || $_COOKIE["style"] != "narrow") {
    $data["system_title"] .= '<div class="leftpanel-title-text"><span id="ltitle">';
    $bookmarked = 0;
    if ($curSys["id"] != "-1") {
        $b_query = "SELECT id\n                    FROM user_bookmarks\n                    WHERE system_id = '" . $curSys["id"] . "'\n                    AND system_id != ''\n                    LIMIT 1";
    } else {
        $b_query = "SELECT id\n                    FROM user_bookmarks\n                    WHERE system_name = '{$esc_cursys_name}'\n                    LIMIT 1";
    }
    $bookmarked = $mysqli->query($b_query)->num_rows;
    $p_query = "SELECT id\n                FROM user_poi\n                WHERE system_name = '{$esc_cursys_name}'\n                AND system_name != ''\n                LIMIT 1";
示例#4
0
             } else {
                 $station_services .= "<strong>Facilities:</strong> ";
             }
             $station_services .= $name;
             $i++;
         }
     }
     $station_services .= "<br />";
     $outfitting_updated_at = $arr["outfitting_updated_at"] == "0" ? "" : "<br /><strong>Outfitting last updated:</strong> " . get_timeago($arr["outfitting_updated_at"], true, true) . "<br />";
     $shipyard_updated_at = $arr["shipyard_updated_at"] == "0" ? "" : "<strong>Shipyard last updated:</strong> " . get_timeago($arr["shipyard_updated_at"], true, true) . "<br />";
     $info = $station_type_d . $station_faction . $station_government . $station_allegiance . $station_state . $station_economies . $station_services . $station_import_commodities . $station_export_commodities . $station_prohibited_commodities . $outfitting_updated_at . $shipyard_updated_at . $station_selling_ships;
     $info = str_replace("['", "", $info);
     $info = str_replace("']", "", $info);
     $info = str_replace("', '", ", ", $info);
     // get allegiance icon
     $station_allegiance_icon = get_allegiance_icon($arr["station_allegiance"]);
     $station_allegiance_icon = '<img src="/style/img/' . $station_allegiance_icon . '" alt="' . $arr["station_allegiance"] . '" style="width:19px;height:19px;margin-right:5px" />';
     /*
      *	notify user if data is old
      */
     $station_disp_name = $station_name;
     if (!empty($group_id) || !empty($ship_name)) {
         if (data_is_old($arr["outfitting_updated_at"]) || data_is_old($arr["shipyard_updated_at"])) {
             $station_disp_name = '<span class="old_data">' . $station_name . '</span>';
         }
     }
     echo '<td class="transparent">' . $station_allegiance_icon . $icon . '<a href="javascript:void(0)" onclick="$(\'#si_statinfo_' . $station_id . '\').fadeToggle(\'fast\')" title="Additional information">' . $station_disp_name . '<div class="stationinfo_ns" id="si_statinfo_' . $station_id . '">' . $info . '</div></td>';
     echo '<td class="transparent">' . $station_ls_from_star . '</td>';
     echo '<td class="transparent">' . $station_max_landing_pad_size . '</td>';
 }
 echo '</tr>';