The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
Test
Posted by: kua | May 12, 2007 @ 11:57am
PHP Code
[
Download
]
<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']) { $clean = htmlentities(strip_tags( stripslashes($_REQUEST['clean']))); $scrollsingle = htmlentities(strip_tags( stripslashes($_REQUEST['scrollsingle']))); $val0 = htmlentities(strip_tags( stripslashes($_REQUEST['val0']))); $val1 = htmlentities(strip_tags( stripslashes($_REQUEST['val1']))); $val2 = htmlentities(strip_tags( stripslashes($_REQUEST['val2']))); $val3 = htmlentities(strip_tags( stripslashes($_REQUEST['val3']))); $val4 = htmlentities(strip_tags( stripslashes($_REQUEST['val4']))); $val5 = htmlentities(strip_tags( stripslashes($_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 /> <?php echo "$totalin";?> <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 echo round("$vekst", 1); ?> %. <br /> If you scrolled 10 items, you would most likely <?php if ("$totalin" > "$totalout") { number_format("$bonus"); } if ("$totalin" < "$totalout") { number_format("$bonus"); } echo number_format("$bonus"); ?> mesos. </html>
Syntax Highlighting
[
Open in new window
]
Author Comments
For Seph.
Rating
4.61 / 8
827 Votes
http://codebin.yi.org/28
page generated in 0.00 seconds