예제 #1
0
        printf('<table class="iTbl">' . '<tr><td class="hdr">Region:</td><td class="data">%s</td></tr>' . '<tr><td class="hdr">Constellation:</td><td class="data">%s</td></tr>' . '</table>', $aTempWH->getRegion(), $aTempWH->getConstellation());
        printf('<table class="sTbl" style="margin-top: 10px;">');
        printf('<tr class="hdr"><td>Planet</td><td>Type</td><td>Moons</td></tr>');
        foreach ($aTempWH->cCelestial as $aCelestial) {
            if ($aCelestial->isPlanet()) {
                printf('<tr><td class="hdr">%s</td><td class="data pt_%d">%s</td>', $aCelestial->Name(), $aCelestial->typeID(), $aCelestial->planetType(), $aCelestial->typeID());
                $aMoons = $aTempWH->getCelestialChildren($aCelestial->itemID());
                $moonCount = 0;
                foreach ($aMoons as $cCelestial) {
                    $moonCount += $cCelestial->isMoon() ? 1 : 0;
                }
                printf('<td class="data_r">%d</td>', $moonCount);
                printf('</tr>');
            }
        }
        printf('<tr class="ftr"><td class="data_r">%d</td><td></td><td class="data_r">%d</td></tr>', $aTempWH->getPlanetCount(), $aTempWH->getMoonCount());
        printf('</table>');
    } else {
        printf("<p><b>%s</b> is not a valid locus ID.</p>", $n_LocusID);
    }
    // ========================================================================
} elseif ($action == "intel_whanom") {
    // ========================================================================
    $n_LocusID = strtoupper(trim(mysql_real_escape_string($_REQUEST["lid"])));
    $aTempWH = new Wormhole($n_LocusID);
    if ($aTempWH->isValidLocus() && $aTempWH->hasAnomaly()) {
        // Technically we should check isWHLocus() here, but maybe CCP will make non-wormholes have anoms?
        $anomalySQL = sprintf("SELECT dgmTypeAttributes.*, dgmAttributeTypes.attributeName, dgmAttributeTypes.displayName " . "FROM " . EVEDB_NAME . ".dgmTypeAttributes INNER JOIN " . EVEDB_NAME . ".dgmAttributeTypes USING(attributeID) " . "WHERE typeID = '%s'", $aTempWH->getAnomalyTypeID());
        //print($anomalySQL);
        $rsAnomaly = mysql_query_cache($anomalySQL, $whConn);
        if (!empty($rsAnomaly)) {