Ejemplo n.º 1
0
    if (trim($key_ID) == "") {
        $fail = true;
    }
} else {
    $fail = true;
}
if (isset($_POST["vCode"])) {
    $v_Code = $_POST["vCode"];
    if (trim($v_Code) == "") {
        $fail = true;
    }
} else {
    $fail = true;
}
if (!$fail) {
    $api = new eveAPI();
    $charIds[0] = 0;
    $charNames[0] = "";
    $corpIds[0] = 0;
    $corpNames[0] = 0;
    $api->Init($key_ID, $v_Code);
    $ret = $api->getCharXML();
    if ($ret) {
        $charIds = $api->getValueArrayFromXML($ret, "characterID");
        $charNames = $api->getValueArrayFromXML($ret, "name");
        $corpIds = $api->getValueArrayFromXML($ret, "corporationID");
        $corpNames = $api->getValueArrayFromXML($ret, "corporationName");
    } else {
        $fail = true;
    }
    if (!$fail) {
Ejemplo n.º 2
0
        }
        if ($name == "v_code") {
            $vCode = $value;
        }
    }
}
if ($keyIdYo != -1) {
    $itemIDs[0] = 0;
    $typeIDs[0] = 0;
    $locationIDs[0] = 0;
    $moonIDs[0] = 0;
    $states[0] = 0;
    $stateTimes[0] = "";
    $onlineTimes[0] = "";
    $lastUpdates[0] = "";
    $api = new eveAPI();
    $api->Init($keyIdYo, $vCode);
    $ret = $api->getTowerListXML();
    if ($ret) {
        $itemIDs = $api->getValueArrayFromXML($ret, "itemID");
        $typeIDs = $api->getValueArrayFromXML($ret, "typeID");
        $locationIDs = $api->getValueArrayFromXML($ret, "locationID");
        $moonIDs = $api->getValueArrayFromXML($ret, "moonID");
        $states = $api->getValueArrayFromXML($ret, "state");
        $stateTimes = $api->getValueArrayFromXML($ret, "stateTimestamp");
        $onlineTimes = $api->getValueArrayFromXML($ret, "onlineTimestamp");
    } else {
        $fail = true;
    }
} else {
    $fail = true;
 $result = mysql_query($sql, $conn) or die(mysql_error());
 $starBasePks[0] = 0;
 $starBaseId[0] = 0;
 $starBaseCount = 0;
 while ($row = mysql_fetch_assoc($result)) {
     foreach ($row as $name => $value) {
         if ($name == "starbase_id") {
             $starBasePks[$starBaseCount] = $value;
         }
         if ($name == "itemID") {
             $starBaseId[$starBaseCount] = $value;
             $starBaseCount++;
         }
     }
 }
 $api = new eveAPI();
 $api->Init($keyIdYo, $vCode);
 for ($i = 0; $i < $starBaseCount; $i++) {
     $types[0] = 0;
     $amounts[0] = 0;
     $detailCount = 0;
     $ret = $api->getTowerDetailXML($starBaseId[$i]);
     if ($ret) {
         $types = $api->getValueArrayFromXML($ret, "typeID");
         $amounts = $api->getValueArrayFromXML($ret, "quantity");
         $sql = "Select\n\t\t\t\t\t\tdetail_id\n\t\t\t\t\tFrom\n\t\t\t\t\t\tStarbase_Details\n\t\t\t\t\tWhere\n\t\t\t\t\t\tstarbase_id =" . $starBasePks[$i];
         $result = mysql_query($sql, $conn) or die(mysql_error());
         while ($row = mysql_fetch_assoc($result)) {
             foreach ($row as $name => $value) {
                 if ($name == "detail_id") {
                     $detailCount++;