All pastes #751689 Raw Edit

Miscellany

public php v1 · immutable
#751689 ·published 2007-10-27 16:55 UTC
rendered paste body
<?include "vsys.dr";$user=getUserDetails($_SESSION['isLogined'],"*");$re = array("<", ">", "'", "`", "java", "javascript", "var", ",", "*", "</", "&#", "/>","a","b","c","d","e");  $strErr = $cgi["strErr"];$sabbed = getSabbedWeapons($user);if ($sabbed){		for($i = 0; $i < sizeof($sabbed); $i++)        $strErr .= "\n<h4>Enemy spies have destroyed ".$sabbed[$i][count]." ".$conf['race'][$user->race][$sabbed[$i][isAtack]][$sabbed[$i][weapon]]['name']."!</h4>";        mysql_query("UPDATE `Weapon` SET sabbed = 0 WHERE userID = '$user->ID'");}// Repair Weapon	if($cgi[doatrepair]){		if($cgi[atrepair0]){$wepid=0;$wal=$cgi[atrepair0];}		if($cgi[atrepair1]){$wepid=1;$wal=$cgi[atrepair1];}		if($cgi[atrepair2]){$wepid=2;$wal=$cgi[atrepair2];}		if($cgi[atrepair3]){$wepid=3;$wal=$cgi[atrepair3];}		if($cgi[atrepair4]){$wepid=4;$wal=$cgi[atrepair4];}		if($cgi[atrepair5]){$wepid=5;$wal=$cgi[atrepair5];}		if($cgi[atrepair6]){$wepid=6;$wal=$cgi[atrepair6];}                if($cgi[atrepair7]){$wepid=7;$wal=$cgi[atrepair7];}		if($wal < 0){ $detail='Meh';}else{                $strip= mysql_real_escape_string(str_replace($re,"",$wal));                 $detail=RepairWeapon($wepid,$strip,$user,1);		header("Location: armory.dr?strErr=$detail");}}	if($cgi[dodefrepair]){		if($cgi[defrepair0]){$wepid=0;$wal=$cgi[defrepair0];}		if($cgi[defrepair1]){$wepid=1;$wal=$cgi[defrepair1];}		if($cgi[defrepair2]){$wepid=2;$wal=$cgi[defrepair2];}		if($cgi[defrepair3]){$wepid=3;$wal=$cgi[defrepair3];}		if($cgi[defrepair4]){$wepid=4;$wal=$cgi[defrepair4];}		if($cgi[defrepair5]){$wepid=5;$wal=$cgi[defrepair5];}                if($cgi[defrepair6]){$wepid=6;$wal=$cgi[defrepair6];}                if($cgi[defrepair7]){$wepid=7;$wal=$cgi[defrepair7];}                               if($wal < 0){ $detail='Meh';}else{                 $strip= mysql_real_escape_string(str_replace($re,"",$wal));   		$detail=RepairWeapon($wepid,$strip,$user,0);		header("Location: armory.dr?strErr=$detail");}}        if($cgi['repairall']){        if($user->gold >= $tot){        $wep=getUserWeapon($user);        $wepda=getDefUserWeapon($user);                    for($i=0;$i<count($wep);$i++){                  $x=$wep[$i]->weaponStrength;		  $y=$conf["race"][$user->race]["weapon"][$wep[$i]->weaponID]["strength"];		  $wow=$y-$x;                   $rem=round($y/4)*$wep[$i]->weaponCount;                  $id=$wep[$i]->weaponID;                  if($x < $y){                  RepairWeapon($id,$wow,$user,1); } }        for($i=0;$i<count($wepda);$i++){                  $a=$wepda[$i]->weaponStrength;		  $b=$conf["race"][$user->race]["defenseweapon"][$wepda[$i]->weaponID]["strength"];		  $pre=$b-$a;                   $rem=round($b/4)*$wepda[$i]->weaponCount;                  $id=$wepda[$i]->weaponID;                  if($x < $y){                  $detail=RepairWeapon($id,$pre,$user,0); } }                                                  }}// Sell Weapon	if($cgi[doatscrapsell]){		if($cgi[atscrapsell0]){$wepid=0;$wal=$cgi[atscrapsell0];}		if($cgi[atscrapsell1]){$wepid=1;$wal=$cgi[atscrapsell1];}		if($cgi[atscrapsell2]){$wepid=2;$wal=$cgi[atscrapsell2];}		if($cgi[atscrapsell3]){$wepid=3;$wal=$cgi[atscrapsell3];}		if($cgi[atscrapsell4]){$wepid=4;$wal=$cgi[atscrapsell4];}		if($cgi[atscrapsell5]){$wepid=5;$wal=$cgi[atscrapsell5];}		if($cgi[atscrapsell6]){$wepid=6;$wal=$cgi[atscrapsell6];}                if($cgi[atscrapsell7]){$wepid=7;$wal=$cgi[atscrapsell7];} 		if($wal < 0){ $detail=='Meh';}else{                $strip= mysql_real_escape_string(str_replace($re,"",$wal)); 		ScrapSell($wepid,$strip,$cgi[doscrapsell],$user,1);		}}	if($cgi[dodefscrapsell]){		if($cgi[defscrapsell0]){$wepid=0;$wal=$cgi[defscrapsell0];}		if($cgi[defscrapsell1]){$wepid=1;$wal=$cgi[defscrapsell1];}		if($cgi[defscrapsell2]){$wepid=2;$wal=$cgi[defscrapsell2];}		if($cgi[defscrapsell3]){$wepid=3;$wal=$cgi[defscrapsell3];}		if($cgi[defscrapsell4]){$wepid=4;$wal=$cgi[defscrapsell4];}		if($cgi[defscrapsell5]){$wepid=5;$wal=$cgi[defscrapsell5];}                if($cgi[defscrapsell6]){$wepid=6;$wal=$cgi[defscrapsell6];}                if($cgi[defscrapsell7]){$wepid=7;$wal=$cgi[defscrapsell7];}		if($wal < 0){ $detail=='Meh';}else{                $strip= mysql_real_escape_string(str_replace($re,"",$wal));  		ScrapSell($wepid,$strip,$cgi[doscrapsell],$user,0);		}}if($cgi[dospyscrapsell]){		if($cgi[spyscrapsell0]){$wepid=0;$wal=$cgi[spyscrapsell0];}		if($cgi[spyscrapsell1]){$wepid=1;$wal=$cgi[spyscrapsell1];}		if($cgi[spyscrapsell2]){$wepid=2;$wal=$cgi[spyscrapsell2];}		if($cgi[spyscrapsell3]){$wepid=3;$wal=$cgi[spyscrapsell3];}		if($cgi[spyscrapsell4]){$wepid=4;$wal=$cgi[spyscrapsell4];}		if($cgi[spyscrapsell5]){$wepid=5;$wal=$cgi[spyscrapsell5];}		if($cgi[spyscrapsell6]){$wepid=6;$wal=$cgi[spyscrapsell6];}		if($cgi[spyscrapsell7]){$wepid=7;$wal=$cgi[spyscrapsell7];}		if($cgi[spyscrapsell8]){$wepid=8;$wal=$cgi[spyscrapsell8];}                if($wal < 0){ $detail=='Meh';}else{                $strip= mysql_real_escape_string(str_replace($re,"",$wal));                ScrapSell($wepid,$strip,$cgi[doscrapsell],$user,2);		}}if($cgi[dosenscrapsell]){		if($cgi[senscrapsell0]){$wepid=0;$wal=$cgi[senscrapsell0];}		if($cgi[senscrapsell1]){$wepid=1;$wal=$cgi[senscrapsell1];}		if($cgi[senscrapsell2]){$wepid=2;$wal=$cgi[senscrapsell2];}		if($cgi[senscrapsell3]){$wepid=3;$wal=$cgi[senscrapsell3];}		if($cgi[senscrapsell4]){$wepid=4;$wal=$cgi[senscrapsell4];}		if($cgi[senscrapsell5]){$wepid=5;$wal=$cgi[senscrapsell5];}		if($cgi[senscrapsell6]){$wepid=6;$wal=$cgi[senscrapsell6];}		if($cgi[senscrapsell7]){$wepid=7;$wal=$cgi[senscrapsell7];}		if($cgi[senscrapsell8]){$wepid=8;$wal=$cgi[senscrapsell8];}                if($wal < 0){ $detail=='Meh';}else{	        $strip= mysql_real_escape_string(str_replace($re,"",$wal)); 		ScrapSell($wepid,$strip,$cgi[doscrapsell],$user,3);		}}// Buy Weapona	if($cgi[buybut]){	                	if($cgi[buy_w0]) {			if($cgi[buy_w0] < 0){ $detail=='Meh'; }else{                        $detail=BuyWeapon(0,$cgi[buy_w0],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_w1]) {                        if($cgi[buy_w1] < 0){ $detail=='Meh'; }else{ 			$detail=BuyWeapon(1,$cgi[buy_w1],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_w2]) {                         if($cgi[buy_w2] < 0){ $detail=='Meh'; }else{			 $detail=BuyWeapon(2,$cgi[buy_w2],1,$user);			 $user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_w3]) {                        if($cgi[buy_w3] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(3,$cgi[buy_w3],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_w4]) {                        if($cgi[buy_w4] < 0){ $detail=='Meh'; }else{ 			$detail=BuyWeapon(4,$cgi[buy_w4],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_w5]) {                        if($cgi[buy_w5] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(5,$cgi[buy_w5],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		 }}		if($cgi[buy_w6]) {                        if($cgi[buy_w6] < 0){ $detail=='Meh'; }else{  			$detail=BuyWeapon(6,$cgi[buy_w6],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");}}		if($cgi[buy_w7]) {                        if($cgi[buy_w7] < 0){ $detail=='Meh'; }else{  			$detail=BuyWeapon(7,$cgi[buy_w7],1,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_dw0]){                         if($cgi[buy_dw0] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(0,$cgi[buy_dw0],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_dw1]){                         if($cgi[buy_dw1] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(1,$cgi[buy_dw1],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_dw2]){                         if($cgi[buy_dw2] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(2,$cgi[buy_dw2],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_dw3]){                         if($cgi[buy_dw3] < 0){ $detail=='Meh'; }else{ 			$detail=BuyWeapon(3,$cgi[buy_dw3],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}}		if($cgi[buy_dw4]){                         if($cgi[buy_dw4] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(4,$cgi[buy_dw4],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");}}		if($cgi[buy_dw5]){                         if($cgi[buy_dw5] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(5,$cgi[buy_dw5],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		 }}		if($cgi[buy_dw6]){                         if($cgi[buy_dw6] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(6,$cgi[buy_dw6],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");}}		if($cgi[buy_dw7]){                         if($cgi[buy_dw7] < 0){ $detail=='Meh'; }else{			$detail=BuyWeapon(7,$cgi[buy_dw7],0,$user);			$user=getUserDetails($_SESSION['isLogined'],"*"); 		}}                 if($cgi[buy_sw0] >0  && $cgi[buy_sw0] >=1){ 			$detail=BuyWeapon(0,$cgi[buy_sw0],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw1] >0  && $cgi[buy_sw1] >=1){ 			$detail=BuyWeapon(1,$cgi[buy_sw1],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw2] >0  && $cgi[buy_sw2] >=1){ 			$detail=BuyWeapon(2,$cgi[buy_sw2],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw3] >0  && $cgi[buy_sw3] >=1){ 			$detail=BuyWeapon(3,$cgi[buy_sw3],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw4] >0  && $cgi[buy_sw4] >=1){ 			$detail=BuyWeapon(4,$cgi[buy_sw4],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}                if($cgi[buy_sw5] >0  && $cgi[buy_sw5] >=1){ 			$detail=BuyWeapon(5,$cgi[buy_sw5],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw6] >0  && $cgi[buy_sw6] >=1){ 			$detail=BuyWeapon(6,$cgi[buy_sw5],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw7] >0  && $cgi[buy_sw7] >=1){ 			$detail=BuyWeapon(7,$cgi[buy_sw7],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sw8] >0  && $cgi[buy_sw8] >=1){ 			$detail=BuyWeapon(8,$cgi[buy_sw8],2,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sew0] >0  && $cgi[buy_sew0] >=1){ 			$detail=BuyWeapon(0,$cgi[buy_sew0],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sew1] >0  && $cgi[buy_sew1] >=1){ 			$detail=BuyWeapon(1,$cgi[buy_sew1],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sew2] >0  && $cgi[buy_sew2] >=1){ 			$detail=BuyWeapon(2,$cgi[buy_sew2],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sew3] >0  && $cgi[buy_sew3] >=1){ 			$detail=BuyWeapon(3,$cgi[buy_sew3],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}		if($cgi[buy_sew4] >0  && $cgi[buy_sew4] >=1){ 			$detail=BuyWeapon(4,$cgi[buy_sew4],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}                if($cgi[buy_sew5] >0  && $cgi[buy_sew5] >=1){ 			$detail=BuyWeapon(5,$cgi[buy_sew5],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}			if($cgi[buy_sew6] >0  && $cgi[buy_sew6] >=1){ 			$detail=BuyWeapon(6,$cgi[buy_sew6],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}			if($cgi[buy_sew7] >0  && $cgi[buy_sew7] >=1){ 			$detail=BuyWeapon(7,$cgi[buy_sew7],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}			if($cgi[buy_sew8] >0  && $cgi[buy_sew8] >=1){ 			$detail=BuyWeapon(8,$cgi[buy_sew8],3,$user);			$user=getUserDetails($_SESSION['isLogined'],"*");		}				header("Location: armory.dr?strErr=$detail"); }		//Upgrade Fortification		if($cgi[upgrade_fortification])			{$detail=Upgrade($user,'fortification',$cgi[upgrade_fortification]);header("Location: armory.dr?strErr=$detail");}		//Upgrade Siege		if($cgi[upgrade_siege])			{$detail=Upgrade($user,'siege',$cgi[upgrade_siege]);header("Location: armory.dr?strErr=$detail");}?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE>Devil's Reign :: Armory</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><META content="devil's reign, devilsreign, assassins, angels, demons, trolls, 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="Devil's Reign is a Massively Multiplayer Online Role Playing Game with over 5,000 players. Players can choose one of four races: Angels, Demons, Assassins and Trolls, and build armies, recruit friends as officers, buy weapons, and spy and attack on each other." name=description /><META content="Devil's Reign" 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.dr";?><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.dr");        include ("islogined.dr");  ?>	</TD>    <TD style="PADDING-RIGHT: 15px; PADDING-LEFT: 15px; PADDING-TOP: 12px"     vAlign=top align=left>     <BR>      <H3>Armory</H3>      <P><strong><center><font color=red><? echo $cgi["strErr"];?></font></center></strong></p>		<TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" border=0>		  <TBODY>		  <TR>		    <TH align=middle colSpan=6>Current Weapon Inventory</TH></TR>					  <TR>		    <TH class=subh align=left>Attack Weapons</TH>		    <TH class=subh align=right>Quantity</TH>		    <TH class=subh>Strength</TH>		    <TH class=subh>Repair</TH>		    <TH class=subh>Scrap/Sell</TH></TR>		  <? $wep=getUserWeapon($user);		  for($i=0;$i<count($wep);$i++){		  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["weapon"][$wep[$i]->weaponID]["name"]);?>		  		  <TD align=right><? numecho($wep[$i]->weaponCount) ?></TD>		  <? $x=$wep[$i]->weaponStrength;		  $y=$conf["race"][$user->race]["weapon"][$wep[$i]->weaponID]["strength"];                  $z=$conf["race"][$user->race]["weapon"][$wep[$i]->weaponID]["price"]; ?>		  <TD align=middle><? numecho($x) ?>/<? numecho($y) ?></TD>		  <FORM action=armory.dr method=post>		  <TD><TABLE cellSpacing=0 cellPadding=2 width=\"100%\" border=0><TBODY><TR>		  <? $wow=$y-$x; $rem=round($y/4)*$wep[$i]->weaponCount;$id=$wep[$i]->weaponID; $tot+=$wow*$rem;?>		  <TD style="BORDER-BOTTOM: medium none"><INPUT type=input maxLength=4 size=2 value=<?=$wow ?> name=atrepair<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit		  value="<? numecho($rem) ?> Gold Per Point" name=doatrepair>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM>		  <FORM action=armory.dr method=post><TD><TABLE cellSpacing=0 cellPadding=1 width="100%" border=0><TBODY><TR>		  <TD style="BORDER-BOTTOM: medium none"><INPUT type=input maxLength=6 size=2 value=0 name=atscrapsell<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit value="<?		  $pr=round(($conf["race"][$user->race]["weapon"][$wep[$i]->weaponID]["price"])*(0.75));		  if($pr>0){echo "Sell for ";numecho($pr);echo " Gold";}		  else echo "Scrap"; ?>" name=doatscrapsell>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM></TR><? }?>				 <TR>		    <TH class=subh align=left>Defense Weapons</TH>		    <TH class=subh align=right>Quantity</TH>		    <TH class=subh>Strength</TH>		    <TH class=subh>Repair</TH>		    <TH class=subh>Scrap/Sell</TH></TR>		  <? $wep=getDefUserWeapon($user);		  for($i=0;$i<count($wep);$i++){		  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["defenseweapon"][$wep[$i]->weaponID]["name"]);?>		  		  <TD align=right><? numecho($wep[$i]->weaponCount) ?></TD>		  <? $x=$wep[$i]->weaponStrength;		  $y=$conf["race"][$user->race]["defenseweapon"][$wep[$i]->weaponID]["strength"];                  $z=$conf["race"][$user->race]["defenseweapon"][$wep[$i]->weaponID]["price"]; ?>		  <TD align=middle><? numecho($x) ?>/<? numecho($y) ?></TD>		  <FORM action=armory.dr method=post>		  <TD><TABLE cellSpacing=0 cellPadding=2 width=\"100%\" border=0><TBODY><TR>		  <? $meow=$y-$x; $rem=round($y/4)*$wep[$i]->weaponCount;$id=$wep[$i]->weaponID; $tot+=$meow*$rem;?>		  <TD style="BORDER-BOTTOM: medium none"><INPUT type=input maxLength=4 size=2 value=<? echo "$y"-"$x"; ?> name=defrepair<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit		  value="<? numecho($rem) ?> Gold Per Point" name=dodefrepair>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM>		  <FORM action=armory.dr method=post><TD><TABLE cellSpacing=0 cellPadding=1 width="100%" border=0><TBODY><TR>		  <TD style="BORDER-BOTTOM: medium none"><INPUT type=input maxLength=6 size=2 value=0 name=defscrapsell<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit value="<?		  $pr=round(($conf["race"][$user->race]["defenseweapon"][$wep[$i]->weaponID]["price"])*(0.75));		  if($pr>0){echo "Sell for ";numecho($pr);echo " Gold";}		  else echo "Scrap"; ?>" name=dodefscrapsell>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM></TR><? }?><? if($tot > 0){ ?><TR><TD></TD><TD></TD><TD colspan=2><form action="armory.dr" method=post name=repall><INPUT type=submit style="WIDTH: 80%" value="<?echo 'Repair all weapons for ';numecho($tot); echo ' Gold';?>" name=repairall></form></TD></TR><? } ?><TH align=middle colSpan=6>Current Covert Tools</TH><TR>		    <TH class=subh align=left>Spy Weapons</TH>		    <TH class=subh align=right>Quantity</TH>		    <TH class=subh>Strength</TH>                    <TH class=subh><font color=black>----</font></TH>                    <TH class=subh>Sell</TH></TR>		  <? $wep=getSpyUserWeapon($user);		  for($i=0;$i<count($wep);$i++){		  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["spyweapon"][$wep[$i]->weaponID]["name"]);?>		  		  <TD align=right><? numecho($wep[$i]->weaponCount) ?></TD>		  <? $x=$wep[$i]->weaponStrength;		  $y=$conf["race"][$user->race]["spyweapon"][$wep[$i]->weaponID]["strength"];		  $z=$conf["race"][$user->race]["spyweapon"][$wep[$i]->weaponID]["price"];?>		  <TD align=middle><? numecho($y) ?></TD>		  <FORM action=armory.dr method=post>		  <TD><TABLE cellSpacing=0 cellPadding=2 width=\"100%\" border=0><TBODY><TR>		  <? $rem=round($z/$y/4)*$wep[$i]->weaponCount;$id=$wep[$i]->weaponID;?>		  <TD style="BORDER-BOTTOM: medium none"><font color=black>No Repairs</font></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%">		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM>		  <FORM action=armory.dr method=post><TD><TABLE cellSpacing=0 cellPadding=1 width="100%" border=0><TBODY><TR>		  <TD style="BORDER-BOTTOM: medium none" rowspan=2><INPUT type=input maxLength=6 size=4 value=0 name=spyscrapsell<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit value="<?		  $pr=round(($conf["race"][$user->race]["spyweapon"][$wep[$i]->weaponID]["price"])*(0.5));		  if($pr>0){echo "Sell for ";numecho($pr);echo " Gold";}		  else echo "Scrap"; ?>" name=dospyscrapsell>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM></TR><? }?>		  <TR>		    <TH class=subh align=left>Sentry Weapons</TH>		    <TH class=subh align=right>Quantity</TH>		    <TH class=subh>Strength</TH>		    <TH class=subh><font color=black>----</font></TH>		    <TH class=subh>Sell</TH></TR>		  <? $wep=getSentryUserWeapon($user);		  for($i=0;$i<count($wep);$i++){		  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["sentryweapon"][$wep[$i]->weaponID]["name"]);?>		  		  <TD align=right><? numecho($wep[$i]->weaponCount) ?></TD>		  <? $x=$wep[$i]->weaponStrength;		  $y=$conf["race"][$user->race]["sentryweapon"][$wep[$i]->weaponID]["strength"];		  $z=$conf["race"][$user->race]["sentryweapon"][$wep[$i]->weaponID]["price"];?>		  <TD align=middle><? numecho($y) ?></TD>		  <FORM action=armory.dr method=post>		  <TD><TABLE cellSpacing=0 cellPadding=2 width=\"100%\" border=0><TBODY><TR>		  <? $rem=round($z/$y/4)*$wep[$i]->weaponCount;$id=$wep[$i]->weaponID;?><TD style="BORDER-BOTTOM: medium none"><font color=black>No Repairs</font></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%">		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM>		  <FORM action=armory.dr method=post><TD><TABLE cellSpacing=0 cellPadding=1 width="100%" border=0><TBODY><TR>		  <TD style="BORDER-BOTTOM: medium none"><INPUT type=input maxLength=6 size=4 value=0 name=senscrapsell<? echo $id; ?> ></TD>		  <TD style="BORDER-BOTTOM: medium none" width="100%"><INPUT style="WIDTH: 100%" type=submit value="<?		  $pr=round(($conf["race"][$user->race]["sentryweapon"][$wep[$i]->weaponID]["price"])*(0.5));		  if($pr>0){echo "Sell for ";numecho($pr);echo " Gold";}		  else echo "Scrap"; ?>" name=dosenscrapsell>		  </TD></TR></TBODY></TABLE></TD><INPUT type=hidden value=93aa2b6a02603399396203313b45827e name=hash></FORM></TR><? }?>	</TBODY></TABLE>      <P>	<TABLE width="100%">	<TBODY>		<TR>		<TD style="PADDING-RIGHT: 25px" vAlign=top width="50%">			<TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" border=0>			  <TBODY>			  <TR>			    <TH colSpan=3>Military Effectiveness</TH></TR>			  <TR>			    <TD><B>Strike Action</B></TD>			    <TD align=right><? numecho (getStrikeAction($user)) ?></TD>			    <TD align=right>Ranked <? 					if 	($userR->strikeActionRank){						numecho ($userR->strikeActionRank);					} 					else echo "#unranked";					?></TD></TR>			  <TR>                <TD><B>Defensive Action</B></TD>                <TD align=right><? numecho (getDefenseAction($user)) ?></TD>                <TD align=right>Ranked <? 					if 	($userR->defenceActionRank){						numecho ($userR->defenceActionRank);					} 					else echo "#unranked";					?></TD></TR>			  <TR>			    <TD><B>Spy Action</B></TD>			    <TD align=right><? numecho (getCovertAction($user)) ?></TD>			    <TD align=right>Ranked <? 					if 	($userR->covertActionRank ){						numecho ($userR->covertActionRank );					} 					else echo "#unranked";					?></TD></TR>                            <TR>			    <TD><B>Sentry Action</B></TD>			    <TD align=right><? numecho (getSentryAction($user)) ?></TD>			    <TD align=right>Ranked <? 					if 	($userR->sentryActionRank ){						numecho ($userR->sentryActionRank );					} 					else echo "#unranked";					?></TD></TR>			    </TBODY>			</TABLE><BR>							<TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" 	border=0>			  <TBODY>			  <TR>			    <TH colSpan=2>Personnel</TH></TR>			  <TR>			    <TD><B>Trained Attack Soldiers</B></TD>			    <TD align=right><? numecho ($user->trainedAttackSold)?></TD></TR>			  <TR>			    <TD><B>Trained Attack Mercenaries</B></TD>			    <TD align=right><? numecho ($user->trainedAttackMerc)?></TD></TR>			  <TR>			    <TD><B>Trained Defense Soldiers</B></TD>			    <TD align=right><? numecho ($user->trainedDefSold)?></TD></TR>			  <TR>			    <TD><B>Trained Defense Mercenaries</B></TD>			    <TD align=right><? numecho ($user->trainedDefMerc)?></TD></TR>			  <TR>			    <TD><B>Untrained Soldiers</B></TD>			    <TD align=right><? numecho ($user->untrainedSold)?></TD></TR>			  <TR>			    <TD><B>Untrained Mercenaries</B></TD>			    <TD align=right><? numecho ($user->untrainedMerc)?></TD></TR>			  <TR>			    <TD class=subh><B>Spies</B></TD>			    <TD class=subh align=right><? numecho ($user->spies)?></TD></TR>                          <TR>			    <TD class=subh><B>Sentries</B></TD>			    <TD class=subh align=right><? numecho ($user->sentries)?></TD></TR>			  <TR>			    <TD><B>Total Fighting Force</B></TD>				<TD align=right><? numecho (getTotalFightingForce($user))?></TD></TR></TBODY></TABLE><TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" 	border=0>			  <TBODY>				<script type="text/javascript"><!--google_ad_client = "pub-2685753848248785";google_ad_width = 300;google_ad_height = 250;google_ad_format = "300x250_as";google_ad_type = "image";//2007-07-11: gamegoogle_ad_channel = "2972825638";//--></script><script type="text/javascript"  src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></TBODY></TABLE>					</TD>		<TD vAlign=top width="50%">						<FORM action=armory.dr method=post>			<TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%"	border=0>			<TBODY>				<TR>					<TH colSpan=4>Buy Weapons</TH>				</TR>			<TR>				<TH class=subh align=left>Attack Weapons</Th> 				<TH class=subh align=right>Strength</Th> 				<TH class=subh align=right>Price</Th> 				<TH class=subh>Buy</Th>			</TR>			  <? for($i=0;$i<7;$i++){			  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["weapon"][$i]["name"]);?>			  <TD align=right><? numecho($conf["race"][$user->race]["weapon"][$i]["strength"])?></TD>			  <TD align=right><? numecho($conf["race"][$user->race]["weapon"][$i]["price"])?> Gold</TD>			  <? echo "<TD align=middle><INPUT size=3 value=0 name=buy_w$i></TD></TR>";}			  ?>			  <TR>			    <TH class=subh align=left>Defense Weapons</Th> 			    <TH class=subh align=right>Strength</Th> 			    <TH class=subh align=right>Price</Th> 			    <TH class=subh>Buy</Th></TR>			  <? for($i=0;$i<7;$i++){			  printf ("<TR><TD>%s</TD>",$conf["race"][$user->race]["defenseweapon"][$i]["name"]);?>			  <TD align=right><? numecho($conf["race"][$user->race]["defenseweapon"][$i]["strength"])?></TD>			  <TD align=right><? numecho($conf["race"][$user->race]["defenseweapon"][$i]["price"])?> Gold</TD>			  <? echo "<TD align=middle><INPUT size=3 value=0 name=buy_dw$i></TD></TR>";}			  ?>                                <tr><th colspan="5">Buy Tools</th></tr> <TR>                          			  	<TH class=subh align=left>Spy Weapons</TH>			  	<TH class=subh align=right>Strength</TH>			  	<TH class=subh align=right>Price</TH>			  	<TH class=subh>Buy</TH></TR>			  	<? for($i=0;$i<5;$i++) {			  		printf ("<TR><TD>%s</TD>", $conf["race"][$user->race]["spyweapon"][$i]["name"]);?>			  		<TD align=right><? numecho($conf["race"][$user->race]["spyweapon"][$i]["strength"])?></TD>			  		<TD align=right><? numecho($conf["race"][$user->race]["spyweapon"][$i]["price"])?></TD>			  		<? echo "<TD align=middle><INPUT size=3 value=0 name=buy_sw", $i ,"></TD></TR>";			  	}			  	?>			  <TR>			  	<TH class=subh align=left>Sentry Weapons</TH>			  	<TH class=subh align=right>Strength</TH>			  	<TH class=subh align=right>Price</TH>			  	<TH class=subh>Buy</TH></TR>			  	<? for($i=0;$i<5;$i++) {			  		printf ("<TR><TD>%s</TD>", $conf["race"][$user->race]["sentryweapon"][$i]["name"]);?>			  		<TD align=right><? numecho($conf["race"][$user->race]["sentryweapon"][$i]["strength"])?></TD>			  		<TD align=right><? numecho($conf["race"][$user->race]["sentryweapon"][$i]["price"])?></TD>			  		<? echo "<TD align=middle><INPUT size=3 value=0 name=buy_sew", $i ,"></TD></TR>";			  	}				?><INPUT type=hidden value=1 name=buying> 			    <TD align=middle colSpan=5><input onClick="document.buyform.buybut.value='Buying..'; document.buyform.buybut.disabled=true; document.buyform.submit();" type="submit" name="buybut" value="Process Order"></TD></TR><INPUT             type=hidden value=93aa2b6a02603399396203313b45827e name=hash>           </FORM></TD></TR></TBODY></TABLE></TABLE>        <FORM action=armory.dr method=post>      <TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" border=0>        <TBODY>            <TR>          <TH align=middle colSpan=2>Upgrade Fortification</TH></TR>           <TR>          <TH class=subh align=left>Current Fortification</TH>          <TH class=subh width="50%">Upgrade</TH></TR>        <TR>          <? $fl=$conf["race"][$user->race]["fortification"][$user->fortificationLevel]["name"];		  	if($conf["race"][$user->race]["fortification"][$user->fortificationLevel+1]["price"])			 { $kp=$conf["race"][$user->race]["fortification"][$user->fortificationLevel+1]["price"];                           $kq=number_format($kp);                            $kn=$kq.' Gold For '.$conf["race"][$user->race]["fortification"][$user->fortificationLevel+1]["name"].' (+'.$conf["race"][$user->race]["fortification"][$user->fortificationLevel+1]["defence"].'%)';}			else			 {$kn='No more upgrades available';}		  ?>		  <TD><?=$fl?></TD>          <TD align=middle><INPUT type=submit size=5 value="<?=$kn?>" width="100%" name=upgrade_fortification>		  </TD></TR></TBODY></TABLE><INPUT       type=hidden value=93aa2b6a02603399396203313b45827e name=hash> </FORM>      <FORM action=armory.dr method=post>      <TABLE class=table_lines cellSpacing=0 cellPadding=6 width="100%" border=0>        <TBODY>        <TR>          <TH align=middle colSpan=2>Upgrade Siege Technology</TH></TR>        <TR>          <TH class=subh align=left>Current Siege Technology</TH>          <TH class=subh width="50%">Upgrade</TH></TR>        <TR>          <? $sl=$conf["race"][$user->race]["siege"][$user->siegeLevel]["name"];		  	if($conf["race"][$user->race]["siege"][$user->siegeLevel+1]["price"])			 { $kp=$conf["race"][$user->race]["siege"][$user->siegeLevel+1]["price"];			   $kq=number_format($kp);                           $kn=$kq.' Gold For '.$conf["race"][$user->race]["siege"][$user->siegeLevel+1]["name"].' (+'.$conf["race"][$user->race]["siege"][$user->siegeLevel+1]["attack"].'%)';}			else			 {$kn='No more upgrades available';}		  ?>		  <TD><?=$sl?></TD>          <TD align=middle><INPUT type=submit size=5 value="<?=$kn?>" width="100%" name=upgrade_siege>		  </TD></TR></TBODY></TABLE><INPUT       type=hidden value=93aa2b6a02603399396203313b45827e name=hash> </FORM>      <?php include "lib/class.footer.php"; ?>      </TD>    </TR></TBODY></TABLE></BODY></HTML>