All pastes #437105 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-12 21:29 UTC
rendered paste body
<?
include "vsys.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0043)http://www.kingsofchaos.com/battlefield.php -->
<HTML><HEAD><TITLE>Kings of Chaos :: Battlefield</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><!-- ZoneLabs Privacy Insertion -->
<SCRIPT language=javascript src="js/js"></SCRIPT>
<LINK href="css/common.css" type=text/css rel=stylesheet><LINK 
href="css/Elves.css" type=text/css rel=stylesheet>
<META 
content="kingsofchaos, chaos, elves, humans, dwarves, orcs, rpg, mmorpg, role playing, game, online game, text based game, armory, mercenaries, spy, attack, army, battle, recruit, spies, spy skill, weapons, messaging, sabotage, recon, intelligence, pnp, mud, games, stockade, free, browser game" 
name=keywords>
<META 
content="Kings of Chaos is a Massively Multiplayer Online Role Playing Game with over 500,000 players. Players can choose one of four races: Orcs, Humans,  Elves and Dwarves and build armies, recruit friends as officers, buy weapons, and spy and attack on each other." 
name=description>
<META content="Kings of Chaos" name=author>
<SCRIPT language=javascript type=text/javascript>
		<!--
		function checkCR(evt) {
		var evt = (evt) ? evt : ((event) ? event : null);
		var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
		if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
		}
		document.onkeypress = checkCR;
		//-->
		</SCRIPT>

<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY text=#ffffff bgColor=#000000 leftMargin=0 topMargin=0 marginheight="0" 
marginwidth="0">
<?
include "top.php";
?>
<TABLE cellSpacing=0 cellPadding=5 width="100%" border=0>
  <TBODY>
  <TR>
    <TD class=menu_cell style="PADDING-LEFT: 15px" vAlign=top width=140>
<?
	include ("left.php");
?>
	</TD>
      <TD style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; PADDING-TOP: 12px" 
    vAlign=top align=left>
	
	 <BR>
      <TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" 
border=0>
          <TBODY>
            <TR> 
              <TH>Name</TH>
              <TH>Rank</TH>
              <TH colSpan=2>Army Size</TH>
              <TH>Treasury</TH>
            </TR>
            <?
			
			if (!$cgi['page']){
				$cgi['page']=1;
			}
			if ($cgi['search']){
				$strS=$cgi['search'];
				if($cgi['search_type']=='s'){
					$strS.="%";
				}elseif($cgi['search_type']=='c'){
					$strS="%".$strS."%";
				}else{
					$strS="%".$strS;
				}
				$users=searchRanksUsersList($cgi['page'],$strS);
			}else{
				$users=getRanksUsersList($cgi['page']);
			}
			for ($i=0; $i<count($users);$i++){
			?>
			<TR> 
              <TD><A  href="stats.php?id=<?=$users[$i]->ID?>"><?=$users[$i]->userName?></A></TD>
              <TD style="PADDING-RIGHT: 20px" align=right><? numecho($users[$i]->rank);?></TD>
              <TD align=right><? 
			  		numecho($users[$i]->trainedAttackSold +$users[$i]->trainedAttackMerc +$users[$i]->trainedDefSold +$users[$i]->trainedDefMerc +$users[$i]->untrainedSold+$users[$i]->untrainedMerc+$users[$i]->spies);
					 ?></TD>
              <TD align=left><?=$conf["race"][$users[$i]->race]["name"]?></TD>
              <TD style="PADDING-RIGHT: 20px" align=right><? numecho($users[$i]->gold);?> Gold</TD>
            </TR>
			<?
			}
				
			?>
            <TR> 
              <TD><?
	    	    if ($cgi['search']){
					$activeUsersC=searchRanksUsersListCount($strS);
				}else{
					$activeUsersC=getActiveUsersCount();
				}
				$pCount=$activeUsersC/$conf["users_per_page"];
				//echo $pCount;
				$pCountF=floor($pCount);
				$pCountF+=(($pCount>$pCountF)?1:0);	
				if ($cgi['page']>1){
					echo "<A href='battlefield.php?page=".($cgi['page']-1)."&search=".$cgi['search']."&search_type=".$cgi['search_type']."'>&lt;&lt; Previous</A>";
				}else {echo "&nbsp;";}	
			  ?>
			  </TD>
              <TD align=middle colSpan=3><?  numecho ($activeUsersC)?> players total | page <?=$cgi['page']?> of <?	numecho ($pCountF); ?></TD>
              <TD align=right><?
			  if ($cgi['page']<$pCountF){	
				echo '<A href="battlefield.php?page='.($cgi['page']+1).'&search='.$cgi["search"].'&search_type='.$cgi["search_type"].'">Next &gt;&gt;</A>';
				}else {echo "&nbsp;";}
			?>
			</TD>
            </TR>
          </TBODY>
        </TABLE>
      <P>
      <FORM action=battlefield.php method=get>
      <TABLE class=table_lines cellSpacing=0 cellPadding=6 width=550 
      align=center border=0>
        <TBODY>
        <TR>
          <TH align=middle colSpan=2>Search</TH></TR>
        <TR>
          <TD align=right>Jump to page:</TD>
          <TD align=left><INPUT maxLength=5 size=5 name=page> <INPUT type=submit value=Go></TD></TR>
        <TR>
          <TD align=right>Search by username:</TD>
          <TD align=left><SELECT name=search_type> <OPTION value=s selected 
              label="starts with">starts with</OPTION> <OPTION value=c 
              label="contains">contains</OPTION> <OPTION value=e 
              label="ends with">ends with</OPTION></SELECT> <INPUT name=search> <INPUT type=submit value=Go></TD></TR></TBODY></TABLE></FORM>
      <P>
      <?
  include ("bottom.php");
?>	

	  </TD></TR></TBODY></TABLE></BODY></HTML>