<html>
<form method="POST" action="leke.php">
Clean item prize: <input type="text" maxlength="12" size="12" name="clean" /><br />
<br />
Prize per scroll: <input type="text" maxlength="12" size="12" name="scrollsingle" /><br
/>
<br />
Input the value on the item with 0 slots left.<br />
Item (+0) prize: <input type="text" maxlength="12" size="12" name="val0" value="<?php
echo $val0; ?>"/><br />
Item (+1) prize: <input type="text" maxlength="12" size="12" name="val1" /><br />
Item (+2) prize: <input type="text" maxlength="12" size="12" name="val2" /><br />
Item (+3) prize: <input type="text" maxlength="12" size="12" name="val3" /><br />
Item (+4) prize: <input type="text" maxlength="12" size="12" name="val4" /><br />
Item (+5) prize: <input type="text" maxlength="12" size="12" name="val5" /><br />
<input type="submit" value="Calculate!" /><br />
</form>
<?php
$slot5prob60n0 = 0.01;
$slot5prob60n1 = 0.077;
$slot5prob60n2 = 0.23;
$slot5prob60n3 = 0.346;
$slot5prob60n4 = 0.259;
$slot5prob60n5 = 0.078;
if ($_REQUEST['clean'] && $_REQUEST['scrollsingle'] && $_REQUEST['val0'] &&
$_REQUEST['val1'] && $_REQUEST['val2'] && $_REQUEST['val3'] && $_REQUEST['val4'] &&
$_REQUEST['val5'])
{
$xval0 = "$val0" * "$slot5prob60n0";
$xval1 = "$val1" * "$slot5prob60n1";
$xval2 = "$val2" * "$slot5prob60n2";
$xval3 = "$val3" * "$slot5prob60n3";
$xval4 = "$val4" * "$slot5prob60n4";
$xval5 = "$val5" * "$slot5prob60n5";
$totalin = "$xval0" + "$xval1" + "$xval2" + "$xval3" + "$xval4" + "$xval5";
$scroll = "$scrollsingle" * "5";
$totalout = "$clean" + "$scroll";
$vekst = ("$totalin" / "$totalout" * "100") - "100";
$bonus = ("$totalin" - "$totalout") * "10";
}
else
{
echo "ERROR: You left a field blank.";
}
?>
<br />
<br />
----------<br />
<?php echo "$totalout";?>
<br /><br />
<?php
if ("$totalin" > "$totalout")
{
echo "This is a good deal!";
}
if ("$totalin" < "$totalout")
{
echo "This is not a good deal.";
}
?>
<br />
Total growth: <?php
?> %.
<br />
If you scrolled 10 items, you would most likely
<?php
if ("$totalin" > "$totalout")
{
}
if ("$totalin" < "$totalout")
{
}
?> mesos.
</html>