db_array); mysql_connect($dbhost,$dbusername,$dbpassword) or die(PARSER_ERROR3); mysql_select_db($dbname) or die(PARSER_ERROR2); makeheader(REPORTS_TITLE); switch ($_SESSION['lang']) { case "english" : @include "../languages/english_probes.inc.php"; break; case "german" : @include "../languages/german_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "spanish" : @include "../languages/spanish_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "dutch" : @include "../languages/dutch_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "balkan" : @include "../languages/balkan_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "french" : @include "../languages/french_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "portugues" : @include "../languages/portugues_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "polish" : @include "../languages/polish_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "italian" : @include "../languages/italian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "turkish" : @include "../languages/turkish_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "danish" : @include "../languages/danish_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "brazilian" : @include "../languages/brazilian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "russian" : @include "../languages/russian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "swedish" : @include "../languages/swedish_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "greek" : @include "../languages/greek_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "romanian" : @include "../languages/romanian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "hungarian" : @include "../languages/hungarian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "czech" : @include "../languages/czech_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "korean" : @include "../languages/korean_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "norwegian" : @include "../languages/norwegian_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "taiwan" : @include "../languages/taiwan_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "japan" : @include "../languages/japan_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; case "chineese" : @include "../languages/chineese_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; default : @include "../languages/german_probes.inc.php"; $flipped_probe_array = array_flip($probe_array); break; } if (isset($_GET['action']) && $_GET['action'] == "delete") { if (isset($_GET['report_id'])) { $report_id = intval($_GET['report_id']); $query = "DELETE FROM $reporttable WHERE id='$report_id'"; } else { $galaxy = intval($_GET['galaxy']); $system = intval($_GET['system']); $planet = intval($_GET['planet']); $moon = ($_GET['moon'] == "true") ? "true" : "false"; $query = "DELETE FROM $reporttable WHERE galaxy='$galaxy' AND system='$system' AND planet='$planet' AND moon='$moon'"; } $res = mysql_query($query); echo ' '; if (!$res) { echo ''; } else { echo ''; } echo "
'.REPORTS_STATUS.'
'.REPORTS_ERROR.' '.mysql_error().'
'.REPORTS_DELETED.'
\n"; } if (isset($_GET['action']) && $_GET['action'] == "search") { unset($_SESSION['s_playername']); unset($_SESSION['s_allyname']); echo '
'; $i = 0; foreach ($db_array as $key => $value) { if ($key != "id" && $key != "coordinates" && $key != "moon" && $key != "scantime") { if ($key == "kt" || $key == "rak" || $key == "memi" || $key == "spiolvl") { if ($i % 2 != 0) echo ""; echo "
'.REPORTS_SEARCH.'
'.REPORTS_RESOURCES.'
 
\n"; echo ''; echo "
'; switch ($key) { case "kt" : echo REPORTS_FLEET; break; case "rak" : echo REPORTS_DEFENCE; break; case "memi" : echo REPORTS_BUILDINGS; break; case "spiolvl" : echo REPORTS_TECHNOLOGY; break; } echo '
\n"; echo ''; $i = 0; } if ($i % 2 == 0) echo ""; if (isset($flipped_probe_array) && is_array($flipped_probe_array)) echo ""; else echo ""; $i++; if ($i % 2 == 0) echo ""; } } if (!isset($_SESSION['s_hits'])) $_SESSION['s_hits'] = 20; if ($i % 2 != 0) echo ""; echo ""; echo '
'.REPORTS_STUFF.'
'; echo ' '; ?> '; echo "
    
\n"; } if (isset($_GET['action']) && $_GET['action']=="searchres") { $page = (isset($_GET['page'])) ? $_GET['page'] : 1; $entries_per_page = (isset($_GET['entries'])) ? $_GET['entries'] : 20; $entries_per_page = (isset($_POST['entries'])) ? $_POST['entries'] : 20; if (isset($_POST[urlencode(REPORTS_SEARCH_SHORT)]) || isset($_POST[urlencode(REPORTS_SEARCH_EXTENDED)])) { $searcharray = $_POST; $galaxie = (int)$searcharray["galaxie"]; $system1 = (int)$searcharray["system1"]; $system2 = (int)$searcharray["system2"]; $datevalue = (isset($searcharray["datevalue"])) ? false : true; $day1 = add_missing_null((int)$searcharray["day1"]); $month1 = add_missing_null((int)$searcharray["month1"]); $hour1 = add_missing_null((int)$searcharray["hour1"]); $minute1 = add_missing_null((int)$searcharray["minute1"]); $second1 = add_missing_null((int)$searcharray["second1"]); $day2 = add_missing_null((int)$searcharray["day2"]); $month2 = add_missing_null((int)$searcharray["month2"]); $hour2 = add_missing_null((int)$searcharray["hour2"]); $minute2 = add_missing_null((int)$searcharray["minute2"]); $second2 = add_missing_null((int)$searcharray["second2"]); $time1 = "$month1-$day1 $hour1:$minute1:$second1"; $time2 = "$month2-$day2 $hour2:$minute2:$second2"; $playername = trim(addslashes(strip_tags($searcharray["playername"]))); $playername = preg_replace("/[^a-zA-Z0-9\*\s-_.]/","", $playername); $allyname = trim(addslashes(strip_tags($searcharray["allyname"]))); $allyname = preg_replace("/[^a-zA-Z0-9\*\s-_.]/","", $allyname); $min_resources = (int)$searcharray["minimumresources"]; $raidable = (isset($searcharray["raidable"])) ? true : false; $inactive = (isset($searcharray["inactive"])) ? true : false; $own_reports = (isset($searcharray["own_reports"])) ? true : false; unset($searcharray[REPORTS_SEARCH_SHORT]); unset($searcharray["galaxie"]); unset($searcharray["system1"]); unset($searcharray["system2"]); unset($searcharray["entries"]); if (isset($searcharray["datevalue"])) unset($searcharray["datevalue"]); unset($searcharray["day1"]); unset($searcharray["month1"]); unset($searcharray["hour1"]); unset($searcharray["minute1"]); unset($searcharray["second1"]); unset($searcharray["day2"]); unset($searcharray["month2"]); unset($searcharray["hour2"]); unset($searcharray["minute2"]); unset($searcharray["second2"]); unset($searcharray["playername"]); unset($searcharray["allyname"]); unset($searcharray["minimumresources"]); unset($searcharray["raidable"]); unset($searcharray["inactive"]); unset($searcharray["own_reports"]); if (isset($_SESSION['s_spioarray']) || isset($_SESSION['s_spiogala']) || isset($_SESSION['s_spiosystem1']) || isset($_SESSION['s_spiosystem2']) ||isset($_SESSION['s_hits'])) { unset($_SESSION['s_spioarray']); unset($_SESSION['s_spiogala']); unset($_SESSION['s_spiosystem1']); unset($_SESSION['s_spiosystem2']); unset($_SESSION['s_hits']); unset($_SESSION['s_datevalue']); unset($_SESSION['s_time1']); unset($_SESSION['s_time2']); unset($_SESSION['s_searchtype']); } $_SESSION['s_spioarray'] = $searcharray; $_SESSION['s_spiogala'] = $galaxie; $_SESSION['s_spiosystem1'] = $system1; $_SESSION['s_spiosystem2'] = $system2; $_SESSION['s_hits'] = $entries_per_page; $_SESSION['s_playername'] = $playername; $_SESSION['s_allyname'] = $allyname; $_SESSION['s_minimumresources'] = $min_resources; $_SESSION['s_raidable'] = $raidable; $_SESSION['s_inactive'] = $inactive; $_SESSION['s_own_reports'] = $own_reports; if (isset($_POST[urlencode(REPORTS_SEARCH_SHORT)])) { $_SESSION['s_searchtype'] = "normal"; } else { $_SESSION['s_searchtype'] = "extended"; } if ($datevalue) { $_SESSION['s_datevalue'] = true; $_SESSION['s_time1'] = "$month1-$day1 $hour1:$minute1:$second1"; $_SESSION['s_time2'] = "$month2-$day2 $hour2:$minute2:$second2"; } } else { if (isset($_SESSION['s_spioarray'])) { $searcharray = $_SESSION['s_spioarray']; } if (isset($_SESSION['s_spiogala'])) { $galaxie = $_SESSION['s_spiogala']; } if (isset($_SESSION['s_spiosystem1'])) { $system1 = $_SESSION['s_spiosystem1']; } if (isset($_SESSION['s_spiosystem2'])) { $system2 = $_SESSION['s_spiosystem2']; } if (isset($_SESSION['s_hits'])) { $entries_per_page = $_SESSION['s_hits']; } if (isset($_SESSION['s_datevalue'])) { $datevalue = $_SESSION['s_datevalue']; } else { $datevalue = false; } if (isset($_SESSION['s_time1'])) { $time1 = $_SESSION['s_time1']; } if (isset($_SESSION['s_time2'])) { $time2 = $_SESSION['s_time2']; } if (isset($_SESSION['s_playername'])) { $playername = $_SESSION['s_playername']; } if (isset($_SESSION['s_allyname'])) { $allyname = $_SESSION['s_allyname']; } } $query = "SELECT count(*) as anzahl FROM $reporttable r LEFT JOIN $dbtablename g ON (r.galaxy = g.galaxy AND r.system = g.system AND r.planet = g.planet) LEFT JOIN $playertable p ON (g.player_id = p.id) LEFT JOIN $allytable a ON (p.alliance_id = a.id) LEFT JOIN $noticetable n ON (n.player_id = g.player_id) WHERE 1 AND "; if ($galaxie != 0) $query .= " r.galaxy='$galaxie' AND "; if ($system1 != 0 && $system2 != 0) $query .= " (r.system BETWEEN $system1 AND $system2) AND "; if ($datevalue) { // check times if ($time2 >= $time1) { $query .= " scantime > '$time1' AND scantime < '$time2' AND "; } else { // $time1 > $time2 - d.h. zb von Okt bis Feb schauen $query .= " ((scantime > '$time1' AND scantime < '12-31 23:59:59') OR (scantime < '$time2' AND scantime > '01-01 00:00:00')) AND "; } } if (isset($playername) && !empty($playername)) $query .= " p.playername='$playername' AND "; if (isset($allyname) && !empty($allyname)) $query .= " a.allyname='$allyname' AND "; if (isset($min_resources) && is_numeric($min_resources) && ($min_resources > 0)) $query .= " (r.metal+r.crystal+r.deuterium > '$min_resources') AND "; if (isset($raidable) && $raidable == true) { $query .= " (banned='false' AND vacation='false' AND noob='false') AND "; } if (isset($inactive) && $inactive == true) { $query .= " inactive='true' AND "; } if (isset($own_reports) && $own_reports == true ) { $query .= " r.user_id = ".$_SESSION['s_userid']." AND "; } $limit = " LIMIT ".(($page-1)*$entries_per_page).",".$entries_per_page; foreach ($searcharray as $key => $value) { if ($value > 0) $query .= "r.".$key.">='$value' AND "; elseif ($value < 0) { $value *= -1; $query .= "r.".$key."<='$value' AND "; } } $results = 0; $anzahl = 0; // get results $query = substr($query,0,strlen($query)-4); $res = mysql_query($query) or die(mysql_error()); $line = mysql_fetch_object($res); $anzahl = $line->anzahl; // change count(*) query to real select query $query = str_replace("count(*) as anzahl", "r.galaxy, r.system, r.planet, ". " r.metal,r.crystal,r.deuterium,(r.metal + r.crystal + r.deuterium) as all_resources, ". " r.fleet_resis,r.defence_resis, r.fleet_resis+r.defence_resis as all_resis, ". " kt, gt, lj, sj, krz, ss, kolo, rec, spio, bomb, zerri, ds, skrz, sat, ". " rak, ll, sl, ion, gauss, plasma, ksk, gsk, concat(r.waffentech,'/', r.schildtech,'/', r.rpz) as techs, ". " p.playername, p.noob,p.banned,p.vacation,p.inactive,p.long_inactive, r.moon, g.player_id, a.allyname, n.id as notice_id, p.waffentech as pwaffentech, ". " g.player_id, p.alliance_id, ". " p.schildtech as pschildtech, p.rpz as prpz, r.planetname, g.planetname as g_planetname, r.scantime",$query); $query .= " ORDER BY r.galaxy, r.system, r.planet".$limit; $res = mysql_query($query) or die(mysql_error()); $results = mysql_num_rows($res); $to = ($page*$entries_per_page < $anzahl) ? $page*$entries_per_page : $anzahl; if ($results == 0) { echo ' '; } elseif ($_SESSION['s_searchtype'] == "normal" && $results > 0) { /***********************************************normal search***********************************************************/ echo '
'; } elseif ($_SESSION['s_searchtype'] == "extended" && $results > 0) { /**********************************************extended search**********************************************************/ echo '
'.REPORTS_HITS.': '.(($page-1)*$entries_per_page+1).'-'.$to.' '.REPORTS_OF.' '.$anzahl.'
'.REPORTS_ADDRESS.''.REPORTS_CURRENTNESS.''.REPORTS_PLAYERNAME.''.REPORTS_ALLY.''.REPORTS_VIEW.''.REPORTS_NOTICES.'
'.REPORTS_HITS.': '.(($page-1)*$entries_per_page+1).'-'.$to.' '.REPORTS_OF.' '.$anzahl.'
'; $draw_lines = true; if ($_SESSION['lang'] == "english") { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } else { foreach ($flipped_probe_array as $english_report_text => $report_text) { if ($english_report_text == R_ENERGY) { $draw_lines = false; // skip energy and draw resis size instead echo ""; echo ""; echo ""; echo ""; } if ($english_report_text == F_SMALLCARGOSHIP) $draw_lines = true; // start drawing when fleets start if ($english_report_text == D_ANTIBALLISTICMISSILE) $draw_lines = false; // stop at antiballistic missiles if ($draw_lines) echo ""; } } echo ""; echo ""; echo ' '; } $ajax_entry = 0; while ($results > 0 && $line = mysql_fetch_object($res)) { $ajax_entry++; /***********************************************normal search***********************************************************/ // determine age of report and its style $scantime = substr($line->scantime,0,5); if ($scantime > date("m-d")) { $scantime = (date("Y")-1)."-".$scantime; } else { $scantime = date("Y")."-".$scantime; } $scantime = strtotime($scantime); if ($scantime < (time() - 86400*30)) { $scancolor = "farbe6"; } elseif ($scantime < (time() - 86400*14)) { $scancolor = "farbe5"; } elseif ($scantime < (time() - 86400*7)) { $scancolor = "farbe4"; } elseif ($scantime < (time() - 86400*4)) { $scancolor = "farbe3"; } elseif ($scantime < (time() - 86400*2)) { $scancolor = "farbe2"; } else { $scancolor = "farbe1"; } if ($_SESSION['s_searchtype'] == "normal") { // normal search echo "'; } else { echo 'galaxy:$line->system:".$line->planet.'" onmouseover="ShowObject(\'report'.$ajax_entry.'\',\'ajax_reports.php?coordinates='."$line->galaxy:$line->system:".$line->planet.'&moon=0\',true)">report'; } if ($line->notice_id != NULL) { if(!isset($notice_array[$line->player_id])) $notice_array[$line->player_id] = $line->player_id; echo ''; } else { echo ''; } echo ""; } else { /**********************************************extended search**********************************************************/ echo ""; // read corresponding report // draw table - exactly one entry - so no while needed foreach ($line as $key => $entry) { if ($key == "system" OR $key == "planet") { continue; } elseif ($key == "techs") { if ($line->planetname == $line->g_planetname) { $entry = $line->pwaffentech."/".$line->pschildtech."/".$line->prpz; echo ""; } else { echo ""; } break; // techs are the last column at this table, so exit foreach() to ignore the other entries } elseif ($key == "galaxy") { if ($line->moon == "true") { echo ""; } else { echo ""; } } elseif ($key == "metal" || $key == "crystal" || $key == "deuterium" || $key == "all_resources" ) { $resources = $line->metal + $line->crystal + $line->deuterium; $number_of_kt = ceil($resources / 5000); $number_of_gt = ceil($resources / 25000); $number_of_ss = ceil($resources / 1500); $html_text = utf8_encode(REPORTS_FOR_ALL_RES).htmlentities(":
"); $html_text .= utf8_encode(REPORTS_KT).htmlentities(": ".number_format($number_of_kt,0,",",".")."
"); $html_text .= utf8_encode(REPORTS_GT).htmlentities(": ".number_format($number_of_gt,0,",",".")."
"); $html_text .= utf8_encode(REPORTS_SS).htmlentities(": ".number_format($number_of_ss,0,",",".")."
"); echo ''; } elseif ($key == "fleet_resis") { $number_of_rec = ceil( ($entry * 0.3) / 20000); $html_text = REPORTS_FOR_TF.":
"; $html_text .= REPORTS_REC.": ".number_format($number_of_rec,0,",",".")."
"; echo ''; } elseif ($key == "defence_resis") { $number_of_rec = ceil($entry / 20000); $html_text = REPORTS_FOR_TF.":
"; $html_text .= REPORTS_REC.": ".number_format($number_of_rec,0,",",".")."
"; echo ''; } elseif ($key == "all_resis") { $number_of_rec = ceil( (($line->fleet_resis * 0.3) + $line->defence_resis)/ 20000); $html_text = REPORTS_FOR_TF.":
"; $html_text .= REPORTS_REC.": ".number_format($number_of_rec,0,",",".")."
"; echo ''; } else { echo ""; } } echo ""; } } if ($_SESSION['s_searchtype'] == "normal") { // normal search echo ' '; if ($results == 0) { echo ""; } if ($anzahl > $entries_per_page) { echo ""; } echo "
'.ALLYHISTORY_SHOW_ADDRESS.'".R_METAL."".R_CRYSTAL."".R_DEUTERIUM."".REPORTS_ALL_RESOURCES."".REPORTS_FLEET_RESIS."".REPORTS_DEFENCE_RESIS."".REPORTS_ALL_RESIS."".F_SMALLCARGOSHIP."".F_LARGECARGOSHIP."".F_LIGHFIGHTER."".F_HEAVYFIGHTER."".F_CRUISER."".F_BATTLESHIP."".F_COLONYSHIP."".F_RECYCLER."".F_ESPIONAGEPROBE."".F_BOMBER."".F_DESTROYER."".F_DEATHSTAR."".F_BATTLECRUISER."".F_SOLARSATELLITE."".D_MISSILELAUNCHER."".D_SMALLLASER."".D_HEAVYLASER."".D_IONCANNON."".D_GAUSSCANNON."".D_PLASMACANNON."".D_SMALLSHIELDDOME."".D_LARGESHILDDOME."".REPORTS_ALL_RESOURCES."".REPORTS_FLEET_RESIS."".REPORTS_DEFENCE_RESIS."".REPORTS_ALL_RESIS."".$report_text."".REPORTS_TECHS."
galaxy."&system=".$line->system."\">$line->galaxy:$line->system:$line->planet "; if ($line->moon == "true") { echo REPORTS_MOON; } echo " $line->scantime player_id."\">$line->playername "; $playerstatus = ""; if ($line->noob == "true") $playerstatus .= "n"; if ($line->vacation == "true") $playerstatus .= "u"; if ($line->banned == "true") $playerstatus .= "g"; if ($line->inactive == "true") $playerstatus .= "i"; if ($line->long_inactive == "true") $playerstatus .= "I"; switch ($_SESSION['lang']) { case "german" : print_status(false,$playerstatus); // banned, vacation, noob, inactive, long inactive break; case "polish" : print_status(false,$playerstatus,"g","u","s"); // banned, vacation, noob, inactive, long inactive break; case "english" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "spanish" : print_status(false,$playerstatus,"s","v","d"); // banned, vacation, noob, inactive, long inactive break; case "dutch" : print_status(false,$playerstatus,"g","v","z"); // banned, vacation, noob, inactive, long inactive break; case "balkan" : print_status(false,$playerstatus,"k","o","s"); // banned, vacation, noob, inactive, long inactive break; case "french" : print_status(false,$playerstatus,"b","v","d"); // banned, vacation, noob, inactive, long inactive break; case "portugues" : print_status(false,$playerstatus,"b","m","f"); // banned, vacation, noob, inactive, long inactive break; case "italian" : print_status(false,$playerstatus,"b","v","d"); // banned, vacation, noob, inactive, long inactive break; case "turkish" : print_status(false,$playerstatus,"c","t","z"); // banned, vacation, noob, inactive, long inactive break; case "danish" : print_status(false,$playerstatus,"s","f","n"); // banned, vacation, noob, inactive, long inactive break; case "brazilian" : print_status(false,$playerstatus,"b","m","f"); // banned, vacation, noob, inactive, long inactive break; case "russian" : print_status(false,$playerstatus,"з","РО","н"); // banned, vacation, noob, inactive, long inactive break; case "swedish" : print_status(false,$playerstatus,"b","s","k"); // banned, vacation, noob, inactive, long inactive break; case "greek" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "romanian" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "hungarian" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "czech" : print_status(false,$playerstatus,"b","z"); // banned, vacation, noob, inactive, long inactive break; case "korean" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "norwegian" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "taiwan" : print_status(false,$playerstatus,"g","u"); // banned, vacation, noob, inactive, long inactive break; case "japan" : print_status(false,$playerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "chineese" : print_status(false,$playerstatus,"g","u"); // banned, vacation, noob, inactive, long inactive break; default: break; } echo " alliance_id)."\">$line->allyname "; if ($line->moon == "true") { echo 'galaxy:$line->system:".$line->planet."&moon=1".'" onmouseover="ShowObject(\'report'.$ajax_entry.'\',\'ajax_reports.php?coordinates='."$line->galaxy:$line->system:".$line->planet.'&moon=1\',true)">reportnoticeno notice
$entry".$entry."galaxy:$line->system:$line->planet&moon=1\">$line->galaxy:$line->system:$line->planet Mgalaxy:$line->system:$line->planet&moon=0\">$line->galaxy:$line->system:$line->planet'.number_format($entry,0,",",".").''.number_format($entry/1000,0,",",".").''.number_format($entry/1000,0,",",".").''.number_format($entry/1000,0,",",".").'".number_format($entry,0,",",".")."
'.REPORTS_HITS.': '.(($page-1)*$entries_per_page+1).'-'.$to.' '.REPORTS_OF.' '.$anzahl.'
".REPORTS_NOTHING."
"; draw_pagenumbers($page,$anzahl,$entries_per_page,$_SERVER['PHP_SELF']."?action=searchres","page"); echo "

\n"; echo ' '; if ($results == 0) { echo ""; } if ($anzahl > $entries_per_page) { echo ""; } echo "
'; } else { // extended search echo '
'.REPORTS_HITS.': '.(($page-1)*$entries_per_page+1).'-'.$to.' '.REPORTS_OF.' '.$anzahl.'
".REPORTS_NOTHING."
"; draw_pagenumbers($page,$anzahl,$entries_per_page,$_SERVER['PHP_SELF']."?action=searchres","page"); echo "

\n"; echo ""; echo '
'; } ?>
1
2
3
4
5
6
0) { $reports = 0; while ($line = mysql_fetch_assoc($res)) { // store report_id $report_id = $line["id"]; // resis are not within reports, so we delete them here unset($line["fleet_resis"]); unset($line["defence_resis"]); if ($reports > 0) echo "

"; $moon = ($line["moon"] == "true") ? REPORTS_MOON : $line["planetname"]; echo ' '; foreach ($top_array as $key => $value) { break; // just get the first entry (Resources on) } echo ' '; $i = 0; switch ($line['scanned']) { case "ressources" : $scanned = 1; break; case "fleet" : $scanned = 2; break; case "defence" : $scanned = 3; break; case "buildings" : $scanned = 4; break; case "research" : $scanned = 5; break; default : $scanned = 1; } $playertechs = false; if ($line["planetname"] == $line["g_planetname"]) { // report belongs to the player - so use playertechs instead if (isset($line["last_tech_update"]) && $line["last_tech_update"] != "0000-00-00 00:00:00" ) { $playertechs = true; $line["spiolvl"] = $line["p_spiolvl"]; $line["computech"] = $line["p_computech"]; $line["waffentech"] = $line["p_waffentech"]; $line["schildtech"] = $line["p_schildtech"]; $line["rpz"] = $line["p_rpz"]; $line["energytech"] = $line["p_energytech"]; $line["hypertech"] = $line["p_hypertech"]; $line["vbt"] = $line["p_vbt"]; $line["impulse"] = $line["p_impulse"]; $line["hra"] = $line["p_hra"]; $line["lasertech"] = $line["p_lasertech"]; $line["iontech"] = $line["p_iontech"]; $line["plasmatech"] = $line["p_forschungsnetz"]; $line["gravi"] = $line["p_gravi"]; } } $speedsim_link = ""; foreach ($line as $key => $value) { $speedsim_link = update_speedsim_link($speedsim_link,$key,$value); if ($key != "id" && $key != "coordinates" && $key != "moon" && $key != "scantime" && $key != "scanned") { if ($key == "kt" || $key == "rak" || $key == "memi" || $key == "spiolvl") { if ($i % 2 != 0) echo ""; echo ""; $i = 0; } if ($key == 'metal' || $key == 'crystal' || $key == 'deuterium' || $key == 'energy') { if ($i % 2 == 0) echo ""; if (isset($flipped_probe_array) && is_array($flipped_probe_array)) { echo ""; } else { echo ""; } $i++; if ($i % 2 == 0) echo ""; } elseif ($value > 0) { if (isset($flipped_probe_array) && is_array($flipped_probe_array) && isset($db_array[$key])) { if ($i % 2 == 0) echo ""; echo ""; $i++; if ($i % 2 == 0) echo ""; } elseif (isset($db_array[$key])) { if ($i % 2 == 0) echo ""; echo ""; $i++; if ($i % 2 == 0) echo ""; } } } } $speedsim_link = substr($speedsim_link,0,strlen($speedsim_link)-5); if ($i % 2 != 0) echo ""; echo ""; echo ""; echo "
'.$key.' '.$moon." [".$coordinates_array[0].":".$coordinates_array[1].":".$coordinates_array[2].'] (\''.$line["playername"].'\')
'.$report_when.' '.$line['scantime'].'
'.REPORTS_RESOURCES.'
 
=2) ? "truespio" : "falsespio"; echo "\">".REPORTS_FLEET; break; case "rak" : echo " class=\""; echo ($scanned>=3) ? "truespio" : "falsespio"; echo "\">".REPORTS_DEFENCE; break; case "memi" : echo " class=\""; echo ($scanned>=4) ? "truespio" : "falsespio"; echo "\">".REPORTS_BUILDINGS; break; case "spiolvl" : echo " class=\""; if (!$playertechs) { echo ($scanned>=5) ? "truespio" : "falsespio"; } else { echo "playertechs"; } echo "\">".REPORTS_TECHNOLOGY; break; } echo "
".$flipped_probe_array[$db_array[$key]].":".number_format($value,0,",",".")."".$db_array[$key].":".number_format($value,0,",",".")."
".$flipped_probe_array[$db_array[$key]]."".number_format($value,0,",",".")."
".$db_array[$key]."".number_format($value,0,",",".")."
 
".REPORTS_DELETE."".REPORTS_SPEEDSIM."
\n"; $reports++; } } } } echo ''; for ($i=1;$i<=$_SESSION['s_hits'];$i++) { echo '
'."\n"; } foreach ($notice_array as $key => $value) { echo '
'."\n"; } makefooter(); function add_missing_null($value) { if ($value < 10) return "0".$value; else return $value; } function pulldowncode($name,$startval,$endval,$interval,$selected=0) { echo "\n"; } ?>