if ($mag != 99.90000000000001 && ($diam1 != 0 || $diam2 != 0)) { if ($diam1 != 0 && $diam2 == 0) { $diam2 = $diam1; } else { if ($diam2 != 0 && $diam1 == 0) { $diam1 = $diam2; } } $SBObj = $mag + 2.5 * log10(2827.0 * ($diam1 / 60) * ($diam2 / 60)); } else { $SBObj = -999; } $urano = $object->calculateUranometriaPage($ra, $decl); $uranonew = $object->calculateNewUranometriaPage($ra, $decl); $skyatlas = $object->calculateSkyAtlasPage($ra, $decl); $millenium = $object->calculateMilleniumPage($ra, $decl); $taki = $object->calculateTakiPage($ra, $decl); $sql = "select objectname from objectnames where altname = \"" . $newName . "\""; $run = mysql_query($sql) or die(mysql_error()); $get = mysql_fetch_object($run); if (!$get) { print "Inserting " . $newName . "\n"; $sql = "INSERT INTO objects (name) values (\"{$newName}\")"; $run = mysql_query($sql) or die(mysql_error()); $names = explode(" ", $newName); $sql = "INSERT INTO objectnames (objectname, catalog, catindex, altname) VALUES (\"{$newName}\", \"{$names['0']}\", \"{$names['1']}\", \"{$newName}\")"; mysql_query($sql) or die(mysql_error()); } else { print "Updating " . $newName . "\n"; } $sql = "UPDATE objects SET type = \"{$type}\" where name = \"" . $get->objectname . "\"";