498) $system1 = 498; if ($system1 < 1) $system1 = 1; } if (isset($_POST['system2']) && !empty($_POST['system2'])) { $system2 = $_POST['system2']; $system2 = preg_replace("/([^0-9])/","",$system2); if ($system2 > 499) $system2 = 499; if ($system2 < 2) $system2 = 2; } if (isset($_POST['planet1']) && !empty($_POST['planet1'])) { $planet1 = $_POST['planet1']; $planet1 = preg_replace("/([^0-9])/","",$planet1); if ($planet1 > 14) $planet1 = 14; if ($planet1 < 1) $planet1 = 1; } if (isset($_POST['planet2']) && !empty($_POST['planet2'])) { $planet2 = $_POST['planet2']; $planet2 = preg_replace("/([^0-9])/","",$planet2); if ($planet2 > 15) $planet2 = 15; if ($planet2 < 2) $planet2 = 2; } $time_offset = 0; $operator = substr($_SESSION['s_timezone_offset'],0,1); $hours = substr($_SESSION['s_timezone_offset'],1,2); $minutes = substr($_SESSION['s_timezone_offset'],4,2); if ($operator == "+") { // date shall be specified as non-local timezone $time_offset += 60 * 60 * $hours; $time_offset += 60 * $minutes; } else { $time_offset -= 60 * 60 * $hours; $time_offset -= 60 * $minutes; } if (isset($_POST['datevalue']) && is_numeric($_POST['datevalue'])) { $date_value = (int)$_POST['datevalue']; } else $date_value = 0; if (isset($_POST['year']) && is_numeric($_POST['year'])) { $tyear = (int)$_POST['year']; } else $tyear = date("Y",time()+$time_offset); if (isset($_POST['month']) && is_numeric($_POST['month'])) { $tmonth = (int)$_POST['month']; } else $tmonth = date("m",time()+$time_offset); if (isset($_POST['day']) && is_numeric($_POST['day'])) { $tday = (int)$_POST['day']; } else $tday = date("d",time()+$time_offset); if (isset($_POST['hour']) && is_numeric($_POST['hour'])) { $thour = (int)$_POST['hour']; } else $thour = date("H",time()+$time_offset); if (isset($_POST['minute']) && is_numeric($_POST['minute'])) { $tminute = (int)$_POST['minute']; } else $tminute = date("i",time()+$time_offset); if (isset($_POST['second']) && is_numeric($_POST['second'])) { $tsecond = (int)$_POST['second']; } else $tsecond = date("s",time()+$time_offset); if (isset($_POST['metal']) && is_numeric($_POST['metal'])) { $metal = (int)$_POST['metal']; } else $metal = 0; if (isset($_POST['crystal']) && is_numeric($_POST['crystal'])) { $crystal = (int)$_POST['crystal']; } else $crystal = 0; if (isset($_POST['both']) && is_numeric($_POST['both'])) { $both = (int)$_POST['both']; } else $both = 0; if (isset($_POST['minrank']) && is_numeric($_POST['minrank'])) { $minrank = (int)$_POST['minrank']; } else $minrank = 0; if (isset($_POST['minfrank']) && is_numeric($_POST['minfrank'])) { $minfrank = (int)$_POST['minfrank']; } else $minfrank = 0; if (isset($_POST['maxrank']) && is_numeric($_POST['maxrank'])) { $maxrank = (int)$_POST['maxrank']; } else $maxrank = 0; if (isset($_POST['maxfrank']) && is_numeric($_POST['maxfrank'])) { $maxfrank = (int)$_POST['maxfrank']; } else $maxfrank = 0; if (isset($_POST['bb_code'])) { $bb_code = 1; } else $bb_code = 0; if (isset($_POST['status1'])) $status1 = "checked"; elseif (!isset($_POST['done'])) $status1 = "checked"; else $status1 = ""; if (isset($_POST['status2'])) $status2 = "checked"; else $status2 = ""; if (isset($_POST['status3'])) $status3 = "checked"; else $status3 = ""; $allystatus2 = (isset($_POST['allystatus2'])) ? "checked" : ""; $allystatus3 = (isset($_POST['allystatus3'])) ? "checked" : ""; $allystatus4 = (isset($_POST['allystatus4'])) ? "checked" : ""; $allystatus5 = (isset($_POST['allystatus5'])) ? "checked" : ""; $allystatus6 = (isset($_POST['allystatus6'])) ? "checked" : ""; $allystatus7 = (isset($_POST['allystatus7'])) ? "checked" : ""; $allystatus8 = (isset($_POST['allystatus8'])) ? "checked" : ""; if (is_numeric($system1) && (!is_numeric($system2))) $system2= 499; if (!is_numeric($system1) && (is_numeric($system2))) $system1= 1; if (is_numeric($planet1) && (!is_numeric($planet2))) $planet2 = 15; if (!is_numeric($planet1) && (is_numeric($planet2))) $planet1= 1; if (($moonsearch==1 || $noticesearch == 1 || $reportsearch == 1) && (!is_numeric($system1))) $system1=1; if (($moonsearch==1 || $noticesearch == 1 || $reportsearch == 1) && (!is_numeric($system2))) $system2=499; if ($colonysearch == 1 && !is_numeric($planet1)) $planet1 = 1; if ($colonysearch == 1 && !is_numeric($planet2)) $planet2 = 15; if (isset($_POST['sort'])) $sort = $_POST['sort']; else $sort = 0; if (isset($_POST['sortorder'])) $sortorder = $_POST['sortorder']; else $sortorder = 0; // Spielersortierung if ($sort == 0) { $sort = " ORDER BY galaxy,system,planet"; $schecked1 = "checked"; $schecked2 = ""; $schecked3 = ""; $schecked4 = ""; } if ($sort == 1) { $sort = " ORDER BY playername"; $schecked1 = ""; $schecked2 = "checked"; $schecked3 = ""; $schecked4 = ""; } if ($sort == 2) { $sort = " ORDER BY allyname"; $schecked1 = ""; $schecked2 = ""; $schecked3 = "checked"; $schecked4 = ""; } $sorder1 = ""; $sorder2 = ""; if ($sortorder == 0) { $sort .= " ASC"; $sorder1 = "checked"; } else { $sort .= " DESC"; $sorder2 = "checked"; } $date_checked0 = ""; $date_checked1 = ""; $date_checked2 = ""; if ($date_value == 0) { $date_checked0 = "checked"; } elseif ($date_value == 1) { $date_checked1 = "checked"; } elseif ($date_value == 2) { $date_checked2 = "checked"; } $allysuche = (!isset($_POST['ally']) && !isset($_GET['ally']) && isset($_SESSION['s_allysuche'])) ? $_SESSION['s_allysuche'] : $allysuche; $spielersuche = (!isset($_POST['spieler']) && !isset($_GET['spieler']) && isset($_SESSION['s_spielersuche'])) ? $_SESSION['s_spielersuche'] : $spielersuche; $moonsearch = (!isset($_POST['moonsearch']) && isset($_SESSION['s_moonsearch'])) ? $_SESSION['s_moonsearch'] : $moonsearch; $noticesearch = (!isset($_POST['noticesearch']) && isset($_SESSION['s_noticesearch'])) ? $_SESSION['s_noticesearch'] : $noticesearch; $colonysearch = (!isset($_POST['s_colonysearch']) && isset($_SESSION['s_colonysearch'])) ? $_SESSION['s_colonysearch'] : $colonysearch; $reportsearch = (!isset($_POST['reportsearch']) && isset($_SESSION['s_reportsearch'])) ? $_SESSION['s_reportsearch'] : $reportsearch; $schecked1 = (!isset($_POST['sort']) && isset($_SESSION['s_schecked1'])) ? $_SESSION['s_schecked1'] : $schecked1; $schecked2 = (!isset($_POST['sort']) && isset($_SESSION['s_schecked2'])) ? $_SESSION['s_schecked2'] : $schecked2; $schecked3 = (!isset($_POST['sort']) && isset($_SESSION['s_schecked3'])) ? $_SESSION['s_schecked3'] : $schecked3; $galaxie = (!isset($_POST['galaxie']) && isset($_SESSION['s_galaxie'])) ? $_SESSION['s_galaxie'] : $galaxie; $system1 = (!isset($_POST['system1']) && isset($_SESSION['s_system1'])) ? $_SESSION['s_system1'] : $system1; $system2 = (!isset($_POST['system2']) && isset($_SESSION['s_system2'])) ? $_SESSION['s_system2'] : $system2; $planet1 = (!isset($_POST['planet1']) && isset($_SESSION['s_planet1'])) ? $_SESSION['s_planet1'] : $planet1; $planet2 = (!isset($_POST['planet2']) && isset($_SESSION['s_planet2'])) ? $_SESSION['s_planet2'] : $planet2; $status1 = (!isset($_POST['sort']) && isset($_SESSION['s_status1'])) ? $_SESSION['s_status1'] : $status1; $status2 = (!isset($_POST['sort']) && isset($_SESSION['s_status2'])) ? $_SESSION['s_status2'] : $status2; $status3 = (!isset($_POST['sort']) && isset($_SESSION['s_status3'])) ? $_SESSION['s_status3'] : $status3; $allystatus2 = (!isset($_POST['allystatus2']) && isset($_SESSION['s_allystatus2'])) ? $_SESSION['s_allystatus2'] : $allystatus2; $allystatus3 = (!isset($_POST['allystatus3']) && isset($_SESSION['s_allystatus3'])) ? $_SESSION['s_allystatus3'] : $allystatus3; $allystatus4 = (!isset($_POST['allystatus4']) && isset($_SESSION['s_allystatus4'])) ? $_SESSION['s_allystatus4'] : $allystatus4; $allystatus5 = (!isset($_POST['allystatus5']) && isset($_SESSION['s_allystatus5'])) ? $_SESSION['s_allystatus5'] : $allystatus5; $allystatus6 = (!isset($_POST['allystatus6']) && isset($_SESSION['s_allystatus6'])) ? $_SESSION['s_allystatus6'] : $allystatus6; $allystatus7 = (!isset($_POST['allystatus7']) && isset($_SESSION['s_allystatus7'])) ? $_SESSION['s_allystatus7'] : $allystatus7; $allystatus8 = (!isset($_POST['allystatus8']) && isset($_SESSION['s_allystatus8'])) ? $_SESSION['s_allystatus8'] : $allystatus8; $sort = (!isset($_POST['sort']) && isset($_SESSION['s_sort'])) ? $_SESSION['s_sort'] : $sort; $date_value = (!isset($_POST['datevalue']) && isset($_SESSION['s_datevalue'])) ? $_SESSION['s_datevalue'] : $date_value; $tyear = (!isset($_POST['year']) && isset($_SESSION['s_tyear'])) ? $_SESSION['s_tyear'] : $tyear; $tmonth = (!isset($_POST['month']) && isset($_SESSION['s_tmonth'])) ? $_SESSION['s_tmonth'] : $tmonth; $tday = (!isset($_POST['day']) && isset($_SESSION['s_tday'])) ? $_SESSION['s_tday'] : $tday; $thour = (!isset($_POST['hour']) && isset($_SESSION['s_thour'])) ? $_SESSION['s_thour'] : $thour; $tminute = (!isset($_POST['minute']) && isset($_SESSION['s_tminute'])) ? $_SESSION['s_tminute'] : $tminute; $tsecond = (!isset($_POST['second']) && isset($_SESSION['s_tsecond'])) ? $_SESSION['s_tsecond'] : $tsecond; $metal = (!isset($_POST['metal']) && isset($_SESSION['s_metal'])) ? $_SESSION['s_metal'] : $metal; $crystal = (!isset($_POST['crystall']) && isset($_SESSION['s_crystall'])) ? $_SESSION['s_crystall'] : $crystal; $both = (!isset($_POST['both']) && isset($_SESSION['s_both'])) ? $_SESSION['s_both'] : $both; $minrank = (!isset($_POST['minrank']) && isset($_SESSION['s_minrank'])) ? $_SESSION['s_minrank'] : $minrank; $minfrank = (!isset($_POST['minfrank']) && isset($_SESSION['s_minfrank'])) ? $_SESSION['s_minfrank'] : $minfrank; $maxrank = (!isset($_POST['maxrank']) && isset($_SESSION['s_maxrank'])) ? $_SESSION['s_maxrank'] : $maxrank; $maxfrank = (!isset($_POST['maxfrank']) && isset($_SESSION['s_maxfrank'])) ? $_SESSION['s_maxfrank'] : $maxfrank; $bb_code = (!isset($_POST['bb_code']) && isset($_SESSION['s_bbcodes'])) ? $_SESSION['s_bbcodes'] : $bb_code; //$date = $tyear."-".$tmonth."-".$tday." ".$thour.":".$tminute.":".$tsecond." GMT"; $date = $tyear."-".$tmonth."-".$tday." ".$thour.":".$tminute.":".$tsecond.""; $time = strtotime($date); $operator = substr($_SESSION['s_timezone_offset'],0,1); $hours = substr($_SESSION['s_timezone_offset'],1,2); $minutes = substr($_SESSION['s_timezone_offset'],4,2); if ($operator == "-") { // date is specified in non-local timezone, so adjust it to local timezone $time += 60 * 60 * $hours; $time += 60 * $minutes; } else { $time -= 60 * 60 * $hours; $time -= 60 * $minutes; } $time = date("Y-m-d H:i:s",$time); $time = mysql_real_escape_string($time); // Gerinfgügige Ungenauigkeit durch Sommmer/Winterzeit gegeben (+-1 Stunde) ?>
hide or unhide extended search 1  hide or unhide extended search 2  hide or unhide extended search 3
0) "; else $whereclause.=" AND (n.id>0) "; $wheres++; } if ($reportsearch ==1) { if ($wheres == 0) $whereclause.=" (r.id>0) "; else $whereclause.=" AND (r.id>0) "; $wheres++; } if ($colonysearch ==1) { if ($wheres == 0) $whereclause.=" g.player_id='0' "; else $whereclause.=" AND (g.player_id='0') "; $wheres++; } if (is_numeric($galaxie)) { if ($wheres == 0) $whereclause.=" g.galaxy='$galaxie' "; else $whereclause.=" AND g.galaxy='$galaxie' "; $wheres++; } if (is_numeric($system1)) { if ($wheres == 0) $whereclause.=" (g.system BETWEEN '$system1' AND '$system2') "; else $whereclause.=" AND (g.system BETWEEN '$system1' AND '$system2') "; $wheres++; } if (is_numeric($planet1)) { if ($wheres == 0) $whereclause.=" (g.planet BETWEEN '$planet1' AND '$planet2') "; else $whereclause.=" AND (g.planet BETWEEN '$planet1' AND '$planet2') "; $wheres++; } if ($status1 != "checked") { if ($status2 == "checked") { if ($wheres == 0) $whereclause.=" (vacation='false' AND noob='false') AND (g.player_id > 0) "; else $whereclause.=" AND (banned='false' AND vacation='false' AND noob='false') AND (g.player_id > 0) "; $wheres+=2; } if ($status3 == "checked") { if ($wheres == 0) $whereclause.=" (inactive='true') AND (g.player_id > 0) "; else $whereclause.=" AND (inactive='true') AND (g.player_id > 0) "; $wheres+=2; } } else { if ($colonysearch != 1) { if ($wheres == 0) $whereclause.=" (g.player_id > 0) "; else $whereclause.=" AND (g.player_id > 0) "; $wheres++; } } // start for alliance status if ($wheres == 0) { $whereclause .= " 1 "; } $wheres2 = 0; if ($allystatus2 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'nap' "; else $whereclause.=" OR a.diplomatic_status = 'nap' "; $wheres2++; } if ($allystatus3 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'ally' "; else $whereclause.=" OR a.diplomatic_status = 'ally' "; $wheres2++; } if ($allystatus4 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'war' "; else $whereclause.=" OR a.diplomatic_status = 'war' "; $wheres2++; } if ($allystatus5 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'boycott' "; else $whereclause.=" OR a.diplomatic_status = 'boycott' "; $wheres2++; } if ($allystatus6 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'neutral' "; else $whereclause.=" OR a.diplomatic_status = 'neutral' "; $wheres2++; } if ($allystatus7 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'own' "; else $whereclause.=" OR a.diplomatic_status = 'own' "; $wheres2++; } if ($allystatus8 == "checked") { if ($wheres2 == 0) $whereclause .=" AND ( a.diplomatic_status = 'wing' "; else $whereclause.=" OR a.diplomatic_status = 'wing' "; $wheres2++; } if ($wheres2 > 0) $whereclause .= " ) "; if ($date_value == 1) { if ($wheres == 0) $whereclause.=" (g.last_update < '$time') "; else $whereclause.=" AND (g.last_update < '$time') "; $wheres++; } elseif ($date_value == 2) { if ($wheres == 0) $whereclause.=" (g.last_update > '$time') "; else $whereclause.=" AND (g.last_update > '$time') "; $wheres++; } if ($metal > 0) { if ($wheres == 0) $whereclause.=" (g.metal > $metal) "; else $whereclause.=" AND (g.metal > $metal) "; $wheres++; } if ($crystal > 0) { if ($wheres == 0) $whereclause.=" (g.crystal > $crystal) "; else $whereclause.=" AND (g.crystal > $crystal) "; $wheres++; } if ($both > 0) { if ($wheres == 0) $whereclause.=" (g.metal+g.crystal > $both) "; else $whereclause.=" AND (g.metal+g.crystal > $both) "; $wheres++; } if ($minrank > 0) { if ($wheres == 0) $whereclause.=" (p.rank >= $minrank AND p.rank != 0) "; else $whereclause.=" AND (p.rank >= $minrank AND p.rank != 0) "; $wheres++; } if ($minfrank > 0) { if ($wheres == 0) $whereclause.=" (p.frank >= $minfrank) "; else $whereclause.=" AND (p.frank >= $minfrank) "; $wheres++; } if ($maxrank > 0) { if ($wheres == 0) $whereclause.=" (p.rank <= $maxrank AND p.rank != 0) "; else $whereclause.=" AND (p.rank <= $maxrank AND p.rank != 0) "; $wheres++; } if ($maxfrank > 0) { if ($wheres == 0) $whereclause.=" (p.frank <= $maxfrank AND p.frank != 0) "; else $whereclause.=" AND (p.frank <= $maxfrank AND p.frank != 0) "; $wheres++; } $from_part = "FROM $dbtablename g ". "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 (g.player_id = n.player_id) ". "LEFT JOIN $reporttable r ON (g.galaxy = r.galaxy AND g.system = r.system AND g.planet = r.planet AND r.moon='false') "; $gesamtquery = "SELECT count(*) as anzahl $from_part $whereclause"; $allyquery = "SELECT g.galaxy,g.system,g.planet,g.moon,g.moonsize,g.metal,g.crystal, a.allyname,g.planetname,p.playername,p.noob,p.banned,p.vacation,p.inactive,p.long_inactive,DATE_FORMAT(CONVERT_TZ(g.last_update, '+00:00', '".$_SESSION['s_timezone_offset']."'), '%H:%i:%s
%d. %m. %Y') as glastupdate,n.id as notice_id ,r.id as report_id, p.rank,p.frank,p.rrank,p.points,p.fpoints,p.rpoints,g.player_id, p.alliance_id, a.rank as arank,a.frank as afrank, a.rrank as arrank, a.points as apoints, a.fpoints as afpoints, a.rpoints as arpoints, a.diplomatic_status as allystatus, a.members ".$from_part." ".$whereclause." ".$sort." ".$limit; $res = mysql_query($gesamtquery) or die(mysql_error()); $line = mysql_fetch_object($res); $anzahl = $line->anzahl; $res = mysql_query($allyquery) or die(mysql_error()); unset($_SESSION['s_allysuche']); unset($_SESSION['s_spielersuche']); unset($_SESSION['s_moonsearch']); unset($_SESSION['s_noticesearch']); unset($_SESSION['s_reportsearch']); unset($_SESSION['s_colonysearch']); unset($_SESSION['s_checked1']); unset($_SESSION['s_checked2']); unset($_SESSION['s_nchecked1']); unset($_SESSION['s_nchecked2']); unset($_SESSION['s_rchecked1']); unset($_SESSION['s_rchecked2']); unset($_SESSION['s_cchecked1']); unset($_SESSION['s_cchecked2']); unset($_SESSION['s_sorder1']); unset($_SESSION['s_sorder2']); unset($_SESSION['s_schecked1']); unset($_SESSION['s_schecked2']); unset($_SESSION['s_schecked3']); unset($_SESSION['s_schecked4']); unset($_SESSION['s_galaxie']); unset($_SESSION['s_system1']); unset($_SESSION['s_system2']); unset($_SESSION['s_planet1']); unset($_SESSION['s_planet2']); unset($_SESSION['s_status1']); unset($_SESSION['s_status2']); unset($_SESSION['s_status3']); unset($_SESSION['s_allystatus2']); unset($_SESSION['s_allystatus3']); unset($_SESSION['s_allystatus4']); unset($_SESSION['s_allystatus5']); unset($_SESSION['s_allystatus6']); unset($_SESSION['s_allystatus7']); unset($_SESSION['s_allystatus8']); unset($_SESSION['s_sort']); unset($_SESSION['s_datevalue']); unset($_SESSION['s_tyear']); unset($_SESSION['s_tmonth']); unset($_SESSION['s_tday']); unset($_SESSION['s_thour']); unset($_SESSION['s_minute']); unset($_SESSION['s_second']); unset($_SESSION['s_metal']); unset($_SESSION['s_crystal']); unset($_SESSION['s_both']); unset($_SESSION['s_minrank']); unset($_SESSION['s_minfrank']); unset($_SESSION['s_maxrank']); unset($_SESSION['s_maxfrank']); unset($_SESSION['s_bbcodes']); if ($anzahl > $entries_per_page) { $_SESSION['s_allysuche'] = str_replace("%","*",$allysuche); $_SESSION['s_spielersuche'] = str_replace("%","*",$spielersuche); $_SESSION['s_moonsearch'] = $moonsearch; $_SESSION['s_noticesearch'] = $noticesearch; $_SESSION['s_reportsearch'] = $reportsearch; $_SESSION['s_colonysearch'] = $colonysearch; $_SESSION['s_checked1'] = $checked1; $_SESSION['s_checked2'] = $checked2; $_SESSION['s_nchecked1'] = $nchecked1; $_SESSION['s_nchecked2'] = $nchecked2; $_SESSION['s_rchecked1'] = $rchecked1; $_SESSION['s_rchecked2'] = $rchecked2; $_SESSION['s_cchecked1'] = $cchecked1; $_SESSION['s_cchecked2'] = $cchecked2; $_SESSION['s_sorder1'] = $sorder1; $_SESSION['s_sorder2'] = $sorder2; $_SESSION['s_schecked1'] = $schecked1; $_SESSION['s_schecked2'] = $schecked2; $_SESSION['s_schecked3'] = $schecked3; $_SESSION['s_schecked4'] = $schecked4; $_SESSION['s_galaxie'] = $galaxie; $_SESSION['s_system1'] = $system1; $_SESSION['s_system2'] = $system2; $_SESSION['s_planet1'] = $planet1; $_SESSION['s_planet2'] = $planet2; $_SESSION['s_status1'] = $status1; $_SESSION['s_status2'] = $status2; $_SESSION['s_status3'] = $status3; $_SESSION['s_allystatus2'] = $allystatus2; $_SESSION['s_allystatus3'] = $allystatus3; $_SESSION['s_allystatus4'] = $allystatus4; $_SESSION['s_allystatus5'] = $allystatus5; $_SESSION['s_allystatus6'] = $allystatus6; $_SESSION['s_allystatus7'] = $allystatus7; $_SESSION['s_allystatus8'] = $allystatus8; $_SESSION['s_sort'] = $sort; $_SESSION['s_datevalue'] = $date_value; $_SESSION['s_tyear'] = $tyear; $_SESSION['s_tmonth'] = $tmonth; $_SESSION['s_tday'] = $tday; $_SESSION['s_thour'] = $thour; $_SESSION['s_minute'] = $tminute; $_SESSION['s_second'] = $tsecond; $_SESSION['s_metal'] = $metal; $_SESSION['s_crystal'] = $crystal; $_SESSION['s_both'] = $both; $_SESSION['s_minrank'] = $minrank; $_SESSION['s_minfrank'] = $minfrank; $_SESSION['s_maxrank'] = $maxrank; $_SESSION['s_maxfrank'] = $maxfrank; $_SESSION['s_bbcodes'] = $bb_code; } if ($anzahl > 0) { if (isset($_POST['searchbutton']) || $bb_code == 0) { starttable($anzahl,$page,true); $i = 1; while ($line = mysql_fetch_object($res)) { $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"; displayresult(false,$line->galaxy,$line->system,$line->planet,$line->moon,$line->moonsize,$line->metal, $line->crystal,$line->allyname,$line->planetname,$line->playername,$playerstatus, $line->glastupdate,$line->rank,$line->frank,$line->rrank,$line->points,$line->fpoints,$line->rpoints, $line->arank,$line->afrank,$line->arrank,$line->apoints,$line->afpoints,$line->arpoints, $line->members,$line->notice_id,$line->report_id,$line->allystatus,$line->player_id,$i,$line->alliance_id); $i++; } echo ""; if ($anzahl > $entries_per_page) draw_pagenumbers($page,$anzahl,$entries_per_page,$_SERVER['PHP_SELF'],"page"); echo ""; closetable(); } elseif ($bb_code == 1) { starttable($anzahl,$page,false); echo ' "; closetable(); } } else { echo "
".SHOW_NOTHING."
\n"; } } function displayresult($show_as_bb_code,$galaxie,$system,$planetnummer,$moon,$moonsize,$metall,$kristall,$ally,$planetname,$spielername,$spielerstatus,$zeit, $rank,$frank,$rrank,$points,$fpoints,$rpoints,$arank,$afrank,$arrank,$apoints,$afpoints,$arpoints, $members,$notice,$report,$allystats,$player_id,$entry_number,$alliance_id) { global $notice_array, $report_array; if ($moon == "true") { $moon = "M"; if ($moonsize > 0) $moonsize = number_format($moonsize,0,",",".")." km"; else $moonsize = SHOW_UKMOONSIZE; } else { $moon = " "; $moonsize = " "; } if ($metall > 0 || $kristall > 0) { $tf = 'M:'.number_format($metall,0,",",".").'
K:'.number_format($kristall,0,",","."); } else { $tf = ''; } if (!empty($members)) $a_alt = SHOW_RANK.": $arank / ".SHOW_MEMBERS.": $members"; else $a_alt = ""; if ($rank > 0) $p_alt = SHOW_RANK.": $rank / $frank"; else $p_alt = SHOW_NOTRANKED; if ($show_as_bb_code) { echo "[[COLOR=".$_SESSION['s_bb_coordinates']."]".$galaxie.':'.$system.':'.$planetnummer; echo "[/COLOR]]"; if ($moonsize != " ") echo "[[COLOR=".$_SESSION['s_bb_moon']."]".$moon." ".$moonsize."[/COLOR]]"; if (!empty($tf)) echo "[[COLOR=".$_SESSION['s_bb_debris']."]".strip_tags($tf)."[/COLOR]]"; if (!empty($ally)) echo "[[COLOR=".$_SESSION['s_bb_ally']."]".$ally."[/COLOR]]"; if (!empty($members) && !empty($arank)) echo "[[COLOR=".$_SESSION['s_bb_allydetails']."](".$members."/".$arank.")[/COLOR]]"; } else { echo' '.$galaxie.':'.$system.':'.$planetnummer.' '; if ($moonsize != " ") { echo ''.$moon.''; } else { echo ' '; } echo ' '.$tf.''; if (!empty($ally)) { echo ' '; echo "
').utf8_encode(STATS_ALLYSTATS).htmlentities(":
").utf8_encode(STATS_MEMBERS).htmlentities(": ".$members."
").utf8_encode(SHOW_RANK).htmlentities(": #".$arank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($apoints,0,",",".")."
").utf8_encode(STATS_FLEET).htmlentities(": #".$afrank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($afpoints,0,",",".")."
").utf8_encode(STATS_RESEARCH).htmlentities(": #".$arrank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($arpoints,0,",",".")).'")\' >'; } else { echo ' onmouseover=\'this.T_WIDTH=250;return escape("'.utf8_encode(SHOW_NOTRANKED).'")\' >'; } } else { echo " >"; } echo ''.$ally.'
"; } else { echo " "; } echo ' '.$planetname.' '; echo "
').utf8_encode(STATS_PLAYERSTATS).htmlentities(":
").utf8_encode(SHOW_RANK).htmlentities(": #".$rank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($points,0,",",".")."
").utf8_encode(STATS_FLEET).htmlentities(": #".$frank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($fpoints,0,",",".")."
").utf8_encode(STATS_RESEARCH).htmlentities(": #".$rrank." - ").utf8_encode(STATS_SCORE).htmlentities(": ".number_format($rpoints,0,",",".")).'")\' '; } else { echo ' onmouseover=\'this.T_WIDTH=250;return escape("'.utf8_encode(SHOW_NOTRANKED).'")\' '; } } if (!$show_as_bb_code) { echo ' class="resultlink" href="playerinformation.php?id='.$player_id.'">'; // Status $openspans = 0; if (strpos($spielerstatus,"g") !== false) { echo ""; $openspans++; } if (strpos($spielerstatus,"u") !== false) { echo ""; $openspans++; } elseif (strpos($spielerstatus,"n") !== false) { echo ""; $openspans++; } elseif (strpos($spielerstatus,"i") !== false) { echo ""; $openspans++; } elseif (strpos($spielerstatus,"I") !== false) { echo ""; $openspans++; } } if (!$show_as_bb_code) { echo $spielername; for ($i=$openspans;$i>0;$i--) { echo ""; } // endstatus echo '
"; echo ' '; } else { echo "[[COLOR=".$_SESSION['s_bb_playername']."]".$spielername."[/COLOR] "; } switch ($_SESSION['lang']) { case "german" : print_status($show_as_bb_code,$spielerstatus); // banned, vacation, noob, inactive, long inactive break; case "polish" : print_status($show_as_bb_code,$spielerstatus,"g","u","s"); // banned, vacation, noob, inactive, long inactive break; case "english" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "spanish" : print_status($show_as_bb_code,$spielerstatus,"s","v","d"); // banned, vacation, noob, inactive, long inactive break; case "dutch" : print_status($show_as_bb_code,$spielerstatus,"g","v","z"); // banned, vacation, noob, inactive, long inactive break; case "balkan" : print_status($show_as_bb_code,$spielerstatus,"k","o","s"); // banned, vacation, noob, inactive, long inactive break; case "french" : print_status($show_as_bb_code,$spielerstatus,"b","v","d"); // banned, vacation, noob, inactive, long inactive break; case "portugues" : print_status($show_as_bb_code,$spielerstatus,"b","m","f"); // banned, vacation, noob, inactive, long inactive break; case "italian" : print_status($show_as_bb_code,$spielerstatus,"b","v","d"); // banned, vacation, noob, inactive, long inactive break; case "turkish" : print_status($show_as_bb_code,$spielerstatus,"c","t","z"); // banned, vacation, noob, inactive, long inactive break; case "danish" : print_status($show_as_bb_code,$spielerstatus,"s","f","n"); // banned, vacation, noob, inactive, long inactive break; case "brazilian" : print_status($show_as_bb_code,$spielerstatus,"b","m","f"); // banned, vacation, noob, inactive, long inactive break; case "russian" : print_status($show_as_bb_code,$spielerstatus,"з","РО","н"); // banned, vacation, noob, inactive, long inactive break; case "swedish" : print_status($show_as_bb_code,$spielerstatus,"b","s","k"); // banned, vacation, noob, inactive, long inactive break; case "greek" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "romanian" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "hungarian" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "czech" : print_status($show_as_bb_code,$spielerstatus,"b","z"); // banned, vacation, noob, inactive, long inactive break; case "korean" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "norwegian" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "taiwan" : print_status($show_as_bb_code,$spielerstatus,"g","u"); // banned, vacation, noob, inactive, long inactive break; case "japan" : print_status($show_as_bb_code,$spielerstatus,"b","v"); // banned, vacation, noob, inactive, long inactive break; case "chinese" : print_status($show_as_bb_code,$spielerstatus,"g","u"); // banned, vacation, noob, inactive, long inactive break; case "bulgarian" : print_status($show_as_bb_code,$spielerstatus,"б","в","н"); // banned, vacation, noob, inactive, long inactive break; case "lithuanian" : print_status($show_as_bb_code,$spielerstatus,"b","v","n"); // banned, vacation, noob, inactive, long inactive break; case "latvian" : print_status($show_as_bb_code,$spielerstatus,"b","a","n"); // banned, vacation, noob, inactive, long inactive break; case "finnish" : print_status($show_as_bb_code,$spielerstatus,"b","v","n"); // banned, vacation, noob, inactive, long inactive break; default: break; } if ($show_as_bb_code) { echo "]"; } else { echo ' '.$zeit.' '; if ($notice != NULL) { if (!isset($notice_array[$player_id])) $notice_array[$player_id] = $player_id; echo 'notice'; } else { echo 'no notice'; } if ($report != NULL) { array_push($report_array,$entry_number); echo 'report'; } else { echo 'no report'; } echo "\n"; } } function starttable($number,$page,$show_tablehead = true) { global $entries_per_page; $to = ($page*$entries_per_page < $number) ? $page*$entries_per_page : $number; echo ''; echo ""; if ($show_tablehead) { echo "\n"; echo "\n"; echo' '; } } function closetable() { echo "
"; if ($number > $entries_per_page) draw_pagenumbers($page,$number,$entries_per_page,$_SERVER['PHP_SELF'],"page"); echo "
"; // Colors ?>                                                                                                
".SHOW_HITS.": ".(($page-1)*$entries_per_page+1)."-".$to." ".SHOW_OF." $number
'.SHOW_ADDRESS.' '.SHOW_MOON.' '.SHOW_DF.' '.SHOW_ALLYSORT.' '.SHOW_PLANET.' '.SHOW_PLAYERNAME.' '.SHOW_STATUS.' '.SHOW_CURRENTNESS.' '.SHOW_NOTICERES.' '.SHOW_REPORTS_SHORT.'
"; } function pulldowncode($name,$startval,$endval,$interval,$selected=0) { echo "\n"; } echo' '."\n"; foreach($notice_array as $key => $value) { echo '
'."\n"; } foreach($report_array as $key => $value) { echo '
'."\n"; } makefooter(); ?>