LinkandEntity's bitwise job calculator in php/javascript

Applications/Tools written to make running DarkStar easier for the rest of us.
Post Reply
codiddle
Posts: 56
Joined: Sat Aug 11, 2012 12:58 pm

LinkandEntity's bitwise job calculator in php/javascript

Post by codiddle » Thu Dec 20, 2012 12:28 pm

Code: Select all

<!DOCTYPE html>
<!-- Designed by codiddle of the DSProject, son!
http://www.codiddle.com
-->
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>Darkstar Database Mod</title>
		<meta name="keywords" content="" />
		<meta name="description" content="" />
		<link href="default.css" rel="stylesheet" type="text/css" />
			<script type="text/javascript" language="javascript">
			
			function recalc(form)
			{
			  var total = 0;
			  for(var e = 0; e < form.elements.length; ++e)
			  {
				var fld = form.elements[e];
				if(fld.name.substring(0,4) == "ADD_")
				{
				  if(fld.checked) total += parseFloat(fld.value);
				}
			  }
			  form.total.value = total;
			}
			</script>
	</head>
	<body>
		<div id="menu">
			<ul>
				<li class = "active"><a href="index.php">Home</a></li>
			</ul>
		</div>
		<div id="image"><img src="images/ffxi_banner.jpg" alt="" width="780" height="312" />
		</div>
		<div id="body">
		<h2 class="title">Bitwise Job Calculator</h2>
      <form>
        <input type="checkbox" name="ADD_war" value="1" onclick="recalc(this.form);"/> : WAR<br />
        <input type="checkbox" name="ADD_mnk"  value="2" onclick="recalc(this.form);"/> : MNK<br />
        <input type="checkbox" name="ADD_whm"  value="4" onclick="recalc(this.form);"/> : WHM<br />
        <input type="checkbox" name="ADD_blm"  value="8" onclick="recalc(this.form);"/> : BLM<br />
        <input type="checkbox" name="ADD_rdm"  value="16" onclick="recalc(this.form);"/> : RDM<br />
        <input type="checkbox" name="ADD_thf"  value="32" onclick="recalc(this.form);"/> : THF<br />
        <input type="checkbox" name="ADD_pld"  value="64" onclick="recalc(this.form);"/> : PLD<br />
        <input type="checkbox" name="ADD_drk"  value="128" onclick="recalc(this.form);"/> : DRK<br />
        <input type="checkbox" name="ADD_bst"  value="256" onclick="recalc(this.form);"/> : BST<br />
        <input type="checkbox" name="ADD_brd"  value="512" onclick="recalc(this.form);"/> : BRD<br />
        <input type="checkbox" name="ADD_rng"  value="1024" onclick="recalc(this.form);"/> : RNG<br />
        <input type="checkbox" name="ADD_sam"  value="2048" onclick="recalc(this.form);"/> : SAM<br />
        <input type="checkbox" name="ADD_nin"  value="4096" onclick="recalc(this.form);"/> : NIN<br />
        <input type="checkbox" name="ADD_drg"  value="8192" onclick="recalc(this.form);"/> : DRG<br />
        <input type="checkbox" name="ADD_smn"  value="16384" onclick="recalc(this.form);"/> : SMN<br />
        <input type="checkbox" name="ADD_blu"  value="32768" onclick="recalc(this.form);"/> : BLU<br />
        <input type="checkbox" name="ADD_cor"  value="65536" onclick="recalc(this.form);"/> : COR<br />
        <input type="checkbox" name="ADD_pup"  value="131072" onclick="recalc(this.form);"/> : PUP<br />
        <input type="checkbox" name="ADD_dnc"  value="262144" onclick="recalc(this.form);"/> : DNC<br />
        <input type="checkbox" name="ADD_sch"  value="524288" onclick="recalc(this.form);"/> : SCH<br />
      <input type="text" readonly name="total" value="0" />
      </form>
  <br /><center>
	<div id="footer" class="footer-content">
	 <br />
	 <a href="http://forums.dspt.info/index.php">DarkStar</a>
	</div>
			<p>Copyright &copy; 2012 DSP Team</p>
	</center>
</body>
</html>

Post Reply