rendered paste body<?phpsession_start();global $Pilots;global $header;global $creationTimestamp;global $isCategorized;global $sourceURL;global $ResultSet;global $statsSaveFile;global $menuSelection;global $Vaults;global $hasFactionResults;global $ResultSetTotals;$sourceURL="./flstat.html";class PilotData { var $Pos; var $Name; var $Rank; var $Money; var $MoneyAsNumber = NULL; var $Kills; var $KillsAsNumber = NULL; var $TimeOnline; var $TimeOnlineSecs = NULL; var $Missions; var $MissionsAsNumber = NULL; var $Systems; var $Bases; var $Holes; var $LastLogin; var $LastLoginComparable = NULL; function PilotData($position, $nam, $rnk, $mon, $kil, $time, $miss, $syst, $bas, $hol, $last) { $this->Pos = $position; $this->Name=$nam; $this->Rank=$rnk; $this->Money = $mon; // convert money from string to number by removing alphanum chars $this->MoneyAsNumber = eregi_replace(",", "", str_replace("\$","", $mon )); $this->KillsAsNumber = eregi_replace(",", "", $kil); $this->Kills = $kil; $this->TimeOnline = $time; // convert time to a comparable time format $timeparts = explode(":",$time); $tmp = 0; $this->TimeOnlineSecs = ($timeparts[0]*3600 + $timeparts[1]*60 + $timeparts[2]); $timeparts = NULL; $this->MissionsAsNumber = eregi_replace(",", "", $miss); $this->Missions = $miss; $this->Systems = $syst; $this->Bases = $bas; $this->Holes = $hol; $this->LastLogin = $last; $this->LastLoginComparable = NULL; } function setLastLoginComparable( $newVal) { $this->LastLoginComparable = $newVal; } function printTableRow( $linenr=' ', $fgcolor='black', $bgcolor='white' ) { echo "\t<tr style='background-color:".$bgcolor.";color:".$fgcolor.";'>\n"; echo "\t\t<td align='right' class='style1'>$linenr</td>\n"; echo "\t\t<td class='style1'>$this->Name</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Rank</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Money</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Kills</td>\n"; echo "\t\t<td align='right' class='style1'>$this->TimeOnline</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Missions</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Systems</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Bases</td>\n"; echo "\t\t<td align='right' class='style1'>$this->Holes</td>\n"; echo "\t\t<td class='style1'>$this->LastLogin</td>\n"; echo "\t</tr>\n"; } // give $statsCreationDate as timestamp of CreationDate 00:00:00 function updateLastLoginComparable( $statsCreationDate ) { $TimeAndDate = explode("-",$this->LastLogin ); // TimeAndDate[0] = Time // TimeAndDate[1] = Date // Time can be kept, Date needs to be altered. if (eregi("Today", $this->LastLogin) ) { // replace yesterday with todays date - 1 day $this->LastLoginComparable = 0+(date("Ymd", $statsCreationDate)).eregi_replace(":","", trim($TimeAndDate[0])); } elseif (eregi("Yesterday", $this->LastLogin) ) { // replace today with current date $this->LastLoginComparable = 0+(date("Ymd", $statsCreationDate-86400)).eregi_replace(":","", trim($TimeAndDate[0])); } else { $DateParts = explode(" ", trim($TimeAndDate[1])); // make new String $tmpDate = (2000+$DateParts[2]).""; switch($DateParts[1]) { case "Jan": $tmpDate.="01"; break; case "Feb": $tmpDate.="02"; break; case "Mar": $tmpDate.="03"; break; case "Apr": $tmpDate.="04"; break; case "May": $tmpDate.="05"; break; case "Jun": $tmpDate.="06"; break; case "Jul": $tmpDate.="07"; break; case "Aug": $tmpDate.="08"; break; case "Sep": $tmpDate.="09"; break; case "Oct": $tmpDate.="10"; break; case "Nov": $tmpDate.="11"; break; case "Dec": $tmpDate.="12"; break; } $tmpDate.=$DateParts[0]; $tmpDate.=(eregi_replace(":","", trim($TimeAndDate[0]))); $this->setLastLoginComparable(0+$tmpDate); } // echo "$this->LastLogin ---> $this->LastLoginComparable\n"; } }; function initPilots() { global $Pilots; global $header; global $sourceURL; global $statsSaveFile; /* if pilots was not yet loaded - load stats and create display */ if ($Pilots==NULL) { $maxColumns = 0; // nr of Colums $running = 1; // current record /* for future use if ( !file_exists($statsSaveFile)) { if (@!copy($sourceURL,$statsSaveFile)) { echo "Error on storing Statistisfile"; session_destroy(); exit(); } } * */ $source = @fopen($sourceURL, "r"); if ( !$source ) { echo "The Asgard Statistics File could not be loaded. Please try again later."; session_destroy(); exit(); } while(!feof($source)){ $aLine=trim(fgets($source)); if ( eregi("<table", $aLine) || eregi("<th", $aLine) || eregi("<tr", $aLine) || eregi("</tr", $aLine) || eregi("<td", $aLine) || eregi("</table", $aLine) ) { // put all data in sortable array if ( eregi("<tr", $aLine)) { if (eregi("class=\"Footer\"",$aLine)) { // is last line ... retrieve Today Date from here // update all PilotsRecords LastLoginDatesComparable /* <TR CLASS="Footer"> <TD COLSPAN="100" ALIGN="CENTER"><I>- Last updated on <B>Sat Jul 23 02:00:27 2005</B> - Generated by <A HREF="http://www.cryosphere.f2s.com/Freelancer/flstat.html"><b>FLstat v1.4</b></A>, in 25 secs -</I></TD> </TR> */ if ( $Pilots ) { $aLine=trim(fgets($source)); // get creationTimestamp $fields = explode(" ",trim(str_replace("-"," ",strip_tags($aLine)))); switch($fields[4]) { case "Jan": $mon="1"; break; case "Feb": $mon="2"; break; case "Mar": $mon="3"; break; case "Apr": $mon="4"; break; case "May": $mon="5"; break; case "Jun": $mon="6"; break; case "Jul": $mon="7"; break; case "Aug": $mon="8"; break; case "Sep": $mon="9"; break; case "Oct": $mon="10"; break; case "Nov": $mon="11"; break; case "Dec": $mon="12"; break; } $creationTimestamp = mktime(2,0,0,$mon,$fields[5],$fields[7]); } break; } else { // new record $column = 1; } } if (eregi("</tr", $aLine)) { // end record $maxColumns = $column; if (!$isHeader) { // create record for class $pd = new PilotData( $pilot[$running]["Pos"], $pilot[$running]["Name"], $pilot[$running]["Rank"], $pilot[$running]["Money"], $pilot[$running]["Kills"], $pilot[$running]["Time Online"], $pilot[$running]["Missions"], $pilot[$running]["Systems"], $pilot[$running]["Bases"], $pilot[$running]["Holes"], $pilot[$running]["Last Login"] ); $Pilots[ $running ] = $pd; $pilot[$running] = NULL; // no longer needed $running++; } } if ( eregi("<th", $aLine)) { // parse Column header $isHeader = true; $header[$column] = strip_tags($aLine); // get headercontent Name $column++; } if ( eregi("<td", $aLine)) { // parse record $isHeader = false; $colName = $header[$column]; $pilot[$running][$colName]=strip_tags($aLine); // ...parsed column $column++; } } } // while fclose($source); // if there is any pilots - update the LastLoginComparble. if ($Pilots != NULL) { $i=1; $max_i = count($Pilots); for($i=1;$i<=$max_i;$i++) { $Pilots[$i]->updateLastLoginComparable($creationTimestamp); } return $Pilots; } else { return NULL; } } // if ($Pilots==NULL) else return $Pilots;} //default sort Rank/Cash function sortByRank($a,$b) { if ($a->Pos == $b->Pos) return 0; return ($a->Pos < $b->Pos) ? -1 : 1; } function sortByName($a,$b) { $aU = strtoupper($a->Name); $bU = strtoupper($b->Name); if (!strcmp($aU,$bU)) return 0; return (strcmp($aU,$bU) < 0) ? -1 : 1; } function sortByCash($a,$b) { if ($a->MoneyAsNumber == $b->MoneyAsNumber) return 0; return ($a->MoneyAsNumber > $b->MoneyAsNumber) ? -1 : 1; } function sortByKills($a,$b) { if ($a->KillsAsNumber == $b->KillsAsNumber) return 0; return ($a->KillsAsNumber > $b->KillsAsNumber) ? -1 : 1; } function sortByTime($a,$b) { if ($a->TimeOnlineSecs == $b->TimeOnlineSecs) return 0; return ($a->TimeOnlineSecs > $b->TimeOnlineSecs) ? -1 : 1; } function sortByMissions($a,$b) { if ($a->MissionsAsNumber == $b->MissionsAsNumber) return 0; return ($a->MissionsAsNumber > $b->MissionsAsNumber) ? -1 : 1; } function sortByLastLogin($a,$b) { if ($a->LastLoginComparable == $b->LastLoginComparable) return 0; return ($a->LastLoginComparable > $b->LastLoginComparable) ? -1 : 1; } function printResultTableHeader() { global $header; echo "<p align=center style='color:silver; font-weight:normal; font-size:15px;'>Click on Name, Rank, Money, Kills, Missions, Time Online or Last Login to sort</p>\n"; echo "<table style='width:100%;border:solid 1px silver;' cellspacing=0 cellpadding=1 border=1>\n"; echo "\t<tr style='background-color:navy; color:white'>\n"; foreach ($header as $cName) { echo "\t\t<TD><b>"; switch($cName){ case "Name": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Name>$cName</a>"; break; case "Rank": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Rank>$cName</a>"; break; case "Money": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Cash>$cName</a>"; break; case "Time Online": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Time>$cName</a>"; break; case "Kills": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Kills>$cName</a>"; break; case "Missions": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Missions>$cName</a>"; break; case "Last Login": echo "<a href="; echo $_SERVER['PHP_SELF']; echo "?sort=Login>$cName</a>"; break; default: echo $cName; } // switch echo "</b></TD>\n"; } echo "\t</tr>\n";} function printResultTableFoot(){ echo "</table>\n"; echo "<br>";}function printResultTable( $Table ) { echo "<center>"; if ($Table != NULL) { $i=1; printResultTableHeader(); foreach ( $Table as $Rec ) { if ($i % 2 == 0) { $Rec->printTableRow($i, "black", "silver"); } else{ $Rec->printTableRow($i, "black", "white"); } $i++; } printResultTableFoot(); } else { echo "SORRY THERE IS NO DATA TO DISPLAY"; } echo "</center>"; }function printMenuLink(){echo <<< ende<center><a href=ende; echo $_SERVER['PHP_SELF']."?action=ShowMenu"; echo <<< ende>Main Menu</a></center>ende;}function showMenu() {echo <<< ende<center><p style='padding-top:0px'> </p><p style='font-size:14px;text-color:yellow;'> <table border=0> <tr> <th align=center style='text-decoration:underline;font-size:16px;text-color:white;padding-bottom:5px;'>Main Menu</th> </tr> <tr> <td align=left><a href='ende;echo $_SERVER['PHP_SELF']."?action=ShowRankings'";echo <<< ende><br><div align="center" style='text-decoration:underline;font-size:13px;text-color:white;padding-bottom:5px;'>Show Sortable Pilot Rankings</div></a> </tr>ende;echo <<< ende <tr> <td align=left><a href='ende;echo $_SERVER['PHP_SELF']."?action=ShowFactionDisplayForm'";echo <<< ende><div align="center" style='text-decoration:underline;font-size:13px;text-color:white;padding-bottom:5px;'>Show Faction Overview</div></a> </tr> </table></p></center>ende;}function showTitle($titleline) { if ($titleline != NULL) { echo "<h2 align=center style='border-bottom:1px solid rgb(255,255,255); color:rgb(255,255,255);padding-bottom:10px'>$titleline</h2>"; }}function showRankings($sorting) {global $ResultSetTotals;global $ResultSet; $ResultSet = initPilots(); if ($ResultSet && $sorting) { switch($sorting){ case "Name": usort($ResultSet, "sortByName" ); break; case "Cash": usort($ResultSet, "sortByCash" ); break; case "Time": usort($ResultSet, "sortByTime" ); break; case "Missions": usort($ResultSet, "sortByMissions" ); break; case "Kills": usort($ResultSet, "sortByKills" ); break; case "Login": usort($ResultSet, "sortByLastLogin" ); break; case "Rank": default: usort($ResultSet, "sortByRank" ); } // switch } showTitle("Sortable Pilot Listing"); printResultTable($ResultSet); echo "<br>"; printMenuLink(); } function showFactionDisplayForm($errMsg=NULL) {global $Pilots;global $Vaults;global $ResultSet;global $hasFactionResults;global $ResultSetTotals;// clear current Resultsif ($ResultSet != NULL) { $ResultSet = NULL; $ResultSetTotals = NULL; $hasFactionResults = false; session_register("hasFactionResults");}// TAG <CTP> causes trouble and is not recognized when entered in the // Form// init Pilots if needed and Vaults if neededif ($Pilots==NULL) { initPilots();}if ($Pilots != NULL && $Vaults == NULL ) { usort($Pilots,"sortByName"); $i=1; foreach ( $Pilots as $Pilot ) { if (eregi(".*VAULT.*",strtoupper($Pilot->Name))) { $Vaults[$i++] = $Pilot; } } if ( $Vaults != NULL ) { session_register( "Vaults" ); }}// echo "Pilots:".count($Pilots)." Vaults:".count($Vaults)."<br>";showTitle("Faction Overview");if ($errMsg != NULL) { echo "<h3 style='color:red'>$errMsg</h3>"; echo "<br>";}echo "<center>";echo "\n<FORM action='".$_SERVER['PHP_SELF']."?action=ShowFactionDisplay' method=post>";echo "<table border=0>\n";echo "\t<tr>\n";echo "\t\t<td align='right' class='style1'>Enter full Faction Tag here (e.g. [ASG]):</td>\n";echo "\t\t<td> </td>\n";echo "\t\t<td><input type=text name='FacTag' maxlength=10 size=10></td>\n";echo "\t\t<td>";if ( ($Vaults!=NULL) && (count($Vaults)>0)) { echo "<select name=SelVault size=1>"; echo "\t<option value=0>Select Vault to include here</option>"; $i=1; foreach ($Vaults as $V) { echo "\t<option value=".$i++.">".$V->Name."</option>"; } echo "</select>";}echo "\t\t</td>";echo "\t\t<td><input type=submit value='Submit'></td>\n";echo "</table>\n";echo "</FORM>\n";echo "</center>";echo "<br>";echo "<br>";printMenuLink();}// init FactionDisplay with Form requested Datafunction initFactionDisplay($faction, $vaultID=NULL) {global $Pilots;global $Vaults;global $ResultSet;global $hasFactionResults;if ($Pilots == NULL) { initPilots();}if ( $ResultSet == NULL ) { // filter $Pilots $searchForFac = $faction; if ($vaultID > 0 && $Vaults != NULL && count($Vaults)>0 ) { $searchVault = $Vaults[$vaultID]->Pos; } $i = 1; $len = strlen($searchForFac); foreach ($Pilots as $P) { $comparison = (strlen($P->Name) >= $len)? (substr($P->Name, 0,$len)):($P->Name); // echo "compare $searchForFac <--> $comparison ($len)"."<br>"; if ((strcmp($searchForFac, $comparison)==0) || ($P->Pos == $searchVault)) { $ResultSet[$i++] = $P; } } if ($ResultSet != NULL && count($ResultSet)>0) { $hasFactionResults = true; session_register("hasFactionResults"); usort($ResultSet,"sortByRank"); session_register("ResultSet"); initResultSetTotals(); return true; } else { return false; }}}function showFactionResult($sorting=NULL) {global $hasFactionResults;global $ResultSet;global $ResultSetTotals;showTitle("Faction Overview");if ($hasFactionResults) { if ($sorting) { switch($sorting){ case "Name": usort($ResultSet, "sortByName" ); break; case "Cash": usort($ResultSet, "sortByCash" ); break; case "Time": usort($ResultSet, "sortByTime" ); break; case "Missions": usort($ResultSet, "sortByMissions" ); break; case "Kills": usort($ResultSet, "sortByKills" ); break; case "Login": usort($ResultSet, "sortByLastLogin" ); break; case "Rank": default: usort($ResultSet, "sortByRank" ); } // switch } printResultTable($ResultSet); echo "<center>"; printTotals(); echo "<br>"; echo "</center>"; echo "<center>"; echo "<a href='".$_SERVER['PHP_SELF']."?action=ShowFactionDisplayForm'>Return to Form</a><br>"; printMenuLink(); echo "</center>"; } else { echo "NO MATCHING DATA FOUND<br><br>"; echo "<center>"; echo "<a href='".$_SERVER['PHP_SELF']."?action=ShowFactionDisplayForm'>Return to Form</a><br>"; printMenuLink(); echo "</center>";}}function initResultSetTotals() {global $ResultSet;global $ResultSetTotals; $ResultSetTotals["Rank"] = 0; $ResultSetTotals["Money"] = 0; $ResultSetTotals["Kills"] = 0; $ResultSetTotals["Time"] = 0; $ResultSetTotals["Missions"]= 0; $ResultSetTotals["AVRank"] = 0; $ResultSetTotals["AVMoney"] = 0; $ResultSetTotals["AVKills"] = 0; $ResultSetTotals["AVTime"] = 0; $ResultSetTotals["AVMissions"]= 0; $vaultIncluded = false; if ($ResultSet!=NULL) { foreach ($ResultSet as $P) { if (!vaultIncluded && eregi("VAULT",strtoupper($P->Name))) { $vaultIncluded = true; } $ResultSetTotals["Rank"]+=$P->Rank; $ResultSetTotals["Money"]+=$P->MoneyAsNumber; $ResultSetTotals["Kills"]+=$P->KillsAsNumber; $ResultSetTotals["Time"] +=$P->TimeOnlineSecs; $ResultSetTotals["Missions"]+=$P->MissionsAsNumber; } $membercount = count($ResultSet); if ($vaultIncluded) { $membercount--; } if ($membercount>0) { $ResultSetTotals["AVRank"] = "".round ($ResultSetTotals["Rank"]/$membercount,0)." *"; $ResultSetTotals["AVMoney"] = "\$".number_format( $ResultSetTotals["Money"]/$membercount,2,'.',','); $ResultSetTotals["AVKills"] = number_format( $ResultSetTotals["Kills"]/$membercount,2,'.',','); $ResultSetTotals["AVTime"] = $ResultSetTotals["Time"]/$membercount; $h = intval($ResultSetTotals["AVTime"] / 3600); $m = (($ResultSetTotals["AVTime"]-($h*3600))/60); $s = $ResultSetTotals["AVTime"]%60; $ResultSetTotals["AVTime"]=sprintf("%dh %02dm %02ds **",$h,$m,$s); $ResultSetTotals["AVMissions"]= number_format( $ResultSetTotals["Missions"]/$membercount,2,'.',','); } else { $ResultSetTotals["AVRank"] = "No average due lack of members *"; $ResultSetTotals["AVMoney"] = "No average due lack of members"; $ResultSetTotals["AVKills"] = "No average due lack of members"; $ResultSetTotals["AVTime"] = "No average due lack of members"; $ResultSetTotals["AVMissions"]= "No average due lack of members"; } // format the values in readable Form $ResultSetTotals["Money"] = "\$".number_format($ResultSetTotals["Money"],2,'.',','); $h = intval($ResultSetTotals["Time"] / 3600); $m = (($ResultSetTotals["Time"]-($h*3600))/60); $s = $ResultSetTotals["Time"]%60; $ResultSetTotals["Time"]=sprintf("%dh %02dm %02ds",$h,$m,$s); if (!session_is_registered("ResultSetTotals")) session_register("ResultSetTotals"); }}function printTotals(){ global $ResultSetTotals; if ($ResultSetTotals != NULL && count($ResultSetTotals) > 0 ) { echo "<center>"; echo "<table border=0 cellspacing=0 cellpadding=2 style='background-color:white; color:black'>"; echo "<tr style='background-color:navy; color:white;'>"; echo "<th style='width:32%'> </th>"; echo "<th style='width:4%'> </th>"; echo "<th style='width:32%'>Totals</th>"; echo "<th style='width:4%'> </th>"; echo "<th style='width:32%'>Averages</th>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:32%'><b>Rank:</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["Rank"]."</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["AVRank"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:32%'><b>Cash:</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["Money"]."</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["AVMoney"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:32%'><b>Kills:</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["Kills"]."</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["AVKills"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:32%'><b>Missions:</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["Missions"]."</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["AVMissions"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td style='width:32%'><b>Time Online:</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["Time"]."</td>"; echo "<td style='width:4%'> </td>"; echo "<td style='width:32%'>".$ResultSetTotals["AVTime"]."</td>"; echo "</tr>"; echo "<tr>"; echo "<td colspan=5 style='font-size:9px;border-top:1px solid navy'>*) math. rounded value<br>**) fractions of seconds are not regarded</tr>"; echo "</table>"; echo "</center>"; }}/** restore session variables if available */if (session_is_registered("Pilots")) { session_register("Pilots");} else { $Pilots=NULL;}if (session_is_registered("ResultSet")) { session_register("ResultSet");} else { $ResultSet=NULL;}if (session_is_registered("Vaults")) { session_register("Vaults");} else { $Vaults=NULL;}if (session_is_registered("header")) { session_register("header");} else { $header=NULL;}if (session_is_registered("menuSelection")) { session_register("menuSelection");} else { $menuSelection=NULL;}if (session_is_registered("hasFactionResults")) { session_register("hasFactionResults");} else { $hasFactionResults=false;}if (session_is_registered("isCategorized")) { session_register("isCategorized");} else { $isCategorized=false;}// ------ output ----?><HTML> <head> <TITLE>Asgard RPG - Advanced Rankings Display</TITLE> <STYLE> A{text-decoration:none; color:white;} A:hover {text-decoration:none; color:#999999;} BODY {background-color:#2c323b; color:white; margin:10 10 10 10;font-family:Verdana,Arial,Helvetica,SansSerif}.style2 {font-size: 10px} .style3 { color: #999999; font-size: 12px;} .style4 {font-size: 12px}.style1 {font-size: 14px} </STYLE> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><center><p style='width:95%;color:red; font-weight:bolder; font-size:32px;border-bottom:1pt solid white;margin-bottom:5px;'><span class="style2">Top 250 Players showed in rankings </span> <br> <span class="style3"><a href="flstat.php?action=ShowMenu">Main menu</a></span><br> <a href="http://gamer-forums.com/asgard/index.php" class="style4">Forum</a> </p><p style='width:95%;color:silver; font-weight:100; font-size:12px;margin-bottom:10px;'> <?php/** split up operation below* display a list of options here so user may select what he wants to do* */$asgard_sort = "Rank";import_request_variables("Pg", "asgard_");if ($asgard_action != NULL ) { if (strcmp($asgardAction,$menuSelection)!=0) { $menuSelection = $asgard_action; }} else { if (($menuSelection == NULL)) { $menuSelection = "ShowMenu"; }}if (strcmp($menuSelection, "ShowFactionDisplay")==0 && !$hasFactionResults) { // check post parameters /** print_r ($_POST); echo "<br>"; print_r ($_GET); echo "<br"; * */ if (strcmp(trim($asgard_FacTag),"")==0 || $asgard_FacTag == NULL ) { $menuSelection = "ShowFactionDisplayForm"; $FacFormErr = true; } else { $asgard_FacTag = htmlentities(trim($asgard_FacTag)); initFactionDisplay($asgard_FacTag,$asgard_SelVault); }}switch($menuSelection){ case "ShowRankings": showRankings($asgard_sort); break; case "ShowFactionDisplayForm": if ($FacFormErr) { showFactionDisplayForm("Please enter a full faction tag like e.g. [ASG]"); } else { showFactionDisplayForm(); } break; case "ShowFactionDisplay": showFactionResult($asgard_sort); break; case "ShowMenu": showMenu(); break; default:} // switchif (!session_is_registered("header") && ($header != NULL)) { session_register("header");}if (!session_is_registered("Pilots") && ($Pilots != NULL)) { session_register("Pilots");}if (!session_is_registered("ResultSet") && ($ResultSet != NULL)) { session_register("ResultSet");}if (!session_is_registered("Vaults") && ($Vaults != NULL)) { session_register("Vaults");}if (!session_is_registered("menuSelection") && ($menuSelection != NULL)) { session_register("menuSelection");}?></p></center></BODY></HTML>