 |
|
 |
Spanking Chat Chat about anything spanking related! |
Want to get rid of the annoying adverts? The answer is simple. There are 4 levels of advertising on AnimeOTK:
Level 1: (Your Level, guests and members with 0-9 posts) has maximum advertising.
Level 2: (A user with 10 or more posts who has been a member over two weeks) have vastly reduced advertising (including removal of the large full screen closable adverts)
Level 3: (A member who has been registered over a month and has over 50 posts, or has a special account like "artist" or "writer" sees minimal advertising.
Level 4: (VIP Donators) receive no advertising.
All donators of $10 or more will never see an advert on our site again!
|
 |
The Punishment Generator |
 |
January 9th, 2020, 07:35 PM
|
#1
|
Junior Member
epicfalcono is offline
Join Date: Jun 2016
Posts: 24
|
The Punishment Generator
Does anyone know where the code for the punishment generator is? I recently took a coding class and now I kind of want to see if I can improve it - fix the broken option and things like that.
|
|
|
February 20th, 2020, 10:40 PM
|
#2
|
It's Morphing Time!
Jac26qq308 is offline
Join Date: Dec 2012
Location: Cannonball Shores
Posts: 44,478
|
view-source: https://animeotk.com/punishment.php
Copy-paste all this in the url and you'll have the code. (Or just follow the URL, alt-click 'view page source'.)
|
|
|
 |
|
 |
February 24th, 2020, 05:44 AM
|
#3
|
VIP Donator
Ai is offline
Join Date: Feb 2007
Posts: 2,364
|
I wrote this in 2010... looking at it now is painful. The PHP is very, very old and creaky lol
Code:
<head><script type="text/javascript" src="util-functions.js"></script>
<script type="text/javascript" src="clear-default-text.js"></script> </head><body>
<?
$content = "<div align=center><h2>~Random Punishment Selector~</h2>";
if (isset($_GET['calculate'])) { $calculate = $_GET['calculate']; }
if ($calculate != "yes") {
$content .= "<form method='post' action='/punishment.php?calculate=yes'>
<table width = 95% border=2 padding=2>
<tr>
<td width = 50%>Spankee's Name: <br>(The person who will be getting the spanking)</td>
<td width = 50%><input type='text' name='spankeename' value='Enter Name' class='cleardefault' /></td>
</tr><tr>
<td width = 50%>Spanker's Name: <br>(The person who will be giving the spanking) </td>
<td width = 50%><input type='text' name='spankername' value='Enter Name' class='cleardefault' /></td>
</tr><tr>
<td>Reason for Punishment: </td>
<td><input type='text' name='reason' value='Enter Reason' class='cleardefault' /></td>
</tr><tr>
<td>Select Severity of Punishment</td>
<td>
<input type='radio' name='severity' value='vl' />Very Light: Base swats 10-30<br>
<input type='radio' name='severity' value='l' />Light: Base swats 20-50<br>
<input type='radio' name='severity' value='m' checked />Moderate: Base swats 40-100<br>
<input type='radio' name='severity' value='mh' />Moderately Hard: Base swats 80-160<br>
<input type='radio' name='severity' value='vh' />Very Hard: Base swats 120-200<br>
<input type='radio' name='severity' value='r' />Random: Base swats 10-200<br>
<input type='radio' name='severity' value='c' />Custom. Minimum base swats <input type='text' NAME='swatsmin' size='3' maxlength='3' value='10' class='cleardefault' />, Maximum base swats <input type='text' NAME='swatsmax' size='3' maxlength='3' value='200' class='cleardefault' /> (NOT WORKING YET - DO NOT SELECT!)
</td>
</tr><tr>
<td>Select Number of implements to use during punishment:</td>
<td>
<input type='radio' name='numimp' value='one' checked />1<br>
<input type='radio' name='numimp' value='two' />2<br>
<input type='radio' name='numimp' value='three' />3<br>
<input type='radio' name='numimp' value='four' />4<br>
<input type='radio' name='numimp' value='rand' />Random (1-4) </td>
</tr><tr>
<td>Select Available Implements (NOTE: You must choose at least one implement for each spanking you selected above)</td>
<td>
<input type='checkbox' name='hand' value='hand' />Hand. Swat Multiplier <input type='text' name='handmulti' size='3' maxlength='5' class='cleardefault' value='2' /><br>
<input type='checkbox' name='hairbrush' value='hairbrush' />Hairbrush. Swat Multiplier <input type='text' name='hairbrushmulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='paddle' value='paddle' />Wooden Paddle. Swat Multiplier <input type='text' name='paddlemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='leather' value='leather' />Leather Paddle. Swat Multiplier <input type='text' name='leathermulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='switch' value='switch' />Switch. Swat Multiplier <input type='text' name='switchmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='spoon' value='spoon' />Wooden Spoon. Swat Multiplier <input type='text' name='spoonmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='cane' value='cane' />Cane. Swat Multiplier <input type='text' name='canemulti' size='3' maxlength='5' class='cleardefault' value='0.2' /><br>
<input type='checkbox' name='bath' value='bath' />Bath Brush. Swat Multiplier <input type='text' name='bathmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='belt' value='belt' />Belt. Swat Multiplier <input type='text' name='beltmulti' size='3' maxlength='5' class='cleardefault' value='0.5'/ ><br>
<input type='checkbox' name='tawse' value='tawse' />Tawse. Swat Multiplier <input type='text' name='tawsemulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='strap' value='strap' />Strap. Swat Multiplier <input type='text' name='strapmulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='ruler' value='ruler' />Ruler. Swat Multiplier <input type='text' name='rulermulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='slipper' value='slipper' />Slipper. Swat Multiplier <input type='text' name='slippermulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='flogger' value='flogger' />Flogger. Swat Multiplier <input type='text' name='floggermulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='crop' value='crop' />Riding Crop. Swat Multiplier <input type='text' name='cropmulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='customone' value='customone' />Custom Implement One. Name: <input type='text' name='customonename' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customonemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customtwo' value='customtwo' />Custom Implement two. Name: <input type='text' name='customtwoname' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customtwomulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customthree' value='customthree' />Custom Implement three. Name: <input type='text' name='customthreename' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customthreemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customfour' value='customfour' />Custom Implement four. Name: <input type='text' name='customfourname' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customfourmulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
</td>
</tr><tr>
<td>Select Position(s) to randomly choose from. (NOTE: You may select just one spanking position which will be used for multiple spankings)</td>
<td>
<input type='checkbox' name='otk' value='otk' checked />Over the knee<br>
<input type='checkbox' name='overbed' value='overbed' />Laying on the bed<br>
<input type='checkbox' name='diaperpos' value='diaperpos' />Diaper position (laying on back, legs up)<br>
<input type='checkbox' name='chair' value='chair' />Bend over a chair<br>
<input type='checkbox' name='bend' value='bend' />Bending Over<br>
<input type='checkbox' name='toes' value='toes' />Touching Toes<br>
<input type='checkbox' name='customposone' value='customposone' /><input type='text' name='customposonename' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='custompostwo' value='custompostwo' /><input type='text' name='custompostwoname' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='customposthree' value='customposthree' /><input type='text' name='customposthreename' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='customposfour' value='customposfour' /><input type='text' name='customposfourname' value='Enter Custom Position' class='cleardefault' /><br>
</td>
</tr><tr>
<td>Select states of dress to choose randomly from. (NOTE: One state of dress will be selected for all of the spankings if more than one will happen)</td>
<td>
<input type='checkbox' name='clothed' value='clothed' checked />Fully Clothed<br>
<input type='checkbox' name='panties' value='panties' />Over Underwear<br>
<input type='checkbox' name='bare' value='bare' />Bare Bottom<br>
<input type='checkbox' name='waist' value='waist' />Naked from the waist down<br>
<input type='checkbox' name='naked' value='naked' />Fully naked<br>
</td>
</tr><tr>
<td>How many extra punishments are required?</td>
<td>
<input type='radio' name='numextra' value='none' checked />None<br>
<input type='radio' name='numextra' value='one' />1<br>
<input type='radio' name='numextra' value='two' />2<br>
<input type='radio' name='numextra' value='three' />3<br>
<input type='radio' name='numextra' value='four' />4<br>
<input type='radio' name='numextra' value='rand' />Random (1-4)<br>
<input type='radio' name='numextra' value='randone' />Random (0-1)<br>
<input type='radio' name='numextra' value='randtwo' />Random (0-2)<br>
<input type='radio' name='numextra' value='randthree' />Random (0-3)<br>
<input type='radio' name='numextra' value='randfour' />Random (0-4)
</td>
</tr><tr>
<td>Select the extra punishments to choose from:</td>
<td>
<input type='checkbox' name='corner' value='corner' />Corner Time<br>
<input type='checkbox' name='bed' value='bed' />Early Bedtime<br>
<input type='checkbox' name='dessert' value='dessert' />No Dessert<br>
<input type='checkbox' name='soap' value='soap' />Mouth Soaping<br>
<input type='checkbox' name='enema' value='enema' />Enema<br>
<input type='checkbox' name='cross' value='cross' />Forced Cross Dressing<br>
<input type='checkbox' name='spank' value='spank' />Extra Bedtime Spanking<br>
<input type='checkbox' name='grounded' value='grounded' />Grounded<br>
<input type='checkbox' name='notv' value='notv' />No TV<br>
<input type='checkbox' name='nopc' value='nopc' />No PC / Internet<br>
<input type='checkbox' name='lines' value='lines' />Written Lines<br>
<input type='checkbox' name='fig' value='fig' />Ginger Fig<br>
<input type='checkbox' name='tiger' value='tiger' />\"Tiger Balm\" / \"Icy Hot\" bottom rub<br>
</td>
</tr>
</table>
<input type='submit' value='Let the punishment begin'>
</form>";
}
else {
//set up the autocounts
$extra = "0";
$implement = "0";
$position = "0";
$dress = "0";
//Names and Numbers
if (isset($_POST['spankeename'])) { $spankeename = $_POST['spankeename']; }
if (isset($_POST['spankername'])) { $spankername = $_POST['spankername']; }
if (isset($_POST['reason'])) { $reason = $_POST['reason']; }
if (isset($_POST['severity'])) { $severity = $_POST['severity']; }
if (isset($_POST['numimp'])) { $numimp = $_POST['numimp']; }
if (isset($_POST['numextra'])) { $numextra = $_POST['numextra']; }
//Extras
$thirty = Array("5","10","15","20","25","30");
$sixty = Array("5","10","15","20","25","30","35","40","45","50","55","60");
$hundred = Array("10","20","30","40","50","60","70","80","90","100");
$twohundred = Array("10","20","30","40","50","60","70","80","90","100","110","120","130","140","150","160","170","180","190","200");
$seventytwo = Array("6","12","18","24","30","36","42","48","54","60","66","72");
$fifteen = Array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15");
$extraarray = Array();
if (isset($_POST['corner'])) { $corner = $_POST['corner']; $extra++; shuffle($sixty); $time = $sixty[0]; $cornertime = " " . $time . " minutes of corner time"; $extraarray[$extra] = $cornertime ; }
if (isset($_POST['bed'])) { $bed = $_POST['bed']; $extra++; $early=rand(1,7); $bedtime=" " . $early . " day(s) of early bedtime"; $extraarray[$extra] = $bedtime; }
if (isset($_POST['dessert'])) { $dessert = $_POST['dessert']; $extra++; $nodessert=rand(1,7); $dessertdays = " " . $nodessert . " day(s) with no dessert "; $extraarray[$extra] = $dessertdays; }
if (isset($_POST['soap'])) { $soap = $_POST['soap']; $extra++; $extraarray[$extra] = "A mouth soaping before the spanking. No rinsing until after."; }
if (isset($_POST['enema'])) { $enema = $_POST['enema']; $extra++; shuffle($thirty); $enematime=$thirty[0]; $enemamessage = "An enema retained for " . $enematime . " minutes"; $extraarray[$extra] = $enemamessage; }
if (isset($_POST['cross'])) { $cross = $_POST['cross']; $extra++; shuffle($seventytwo); $crosstime=$seventytwo[0]; $crossmessage = " " . $crosstime . " hours of forced cross dressing"; $extraarray[$extra] = $crossmessage; }
if (isset($_POST['spank'])) { $spank = $_POST['spank']; $extra++; $bedspank=rand(1,7); $beddays = " " . $bedspank . " day(s) of bedtime spankings ";$extraarray[$extra] = $beddays; }
if (isset($_POST['grounded'])) { $grounded = $_POST['grounded']; $extra++; $isgrounded=rand(1,7); $groundeddays = " " . $isgrounded . " day(s) of being grounded";$extraarray[$extra] = $groundeddays; }
if (isset($_POST['notv'])) { $notv = $_POST['notv']; $extra++; $notvdays=rand(1,7); $tvdays = " " . $notvdays . " day(s) of no TV"; $extraarray[$extra] = $tvdays; }
if (isset($_POST['nopc'])) { $nopc = $_POST['nopc']; $extra++; $nopcdays=rand(1,7); $pcdays = " " . $nopcdays . " day(s) of no PC access"; $extraarray[$extra] = $pcdays; }
if (isset($_POST['lines'])) { $lines = $_POST['lines']; $extra++; shuffle($twohundred); $linesrand=$twohundred[0]; $linestotal = " " . $linesrand . " written lines of the spanker's choosing"; $extraarray[$extra] = $linestotal; }
if (isset($_POST['fig'])) { $fig = $_POST['fig']; $extra++; shuffle($fifteen); $figrand=$fifteen[0]; $figtotal = " " . $figrand . " minutes with a ginger fig inserted"; $extraarray[$extra] = $figtotal; }
if (isset($_POST['tiger'])) { $tiger = $_POST['tiger']; $extra++; $tigertotal = "A coating of \"Tiger Balm\", \"Icy Hot\" or similar rubbed into their bottom at the end of the spanking"; $extraarray[$extra] = $tigertotal; }
//Implements
$implementarray = Array();
$multipler = Array();
if (isset($_POST['hand'])) { $hand = $_POST['hand']; $handmulti = $_POST['handmulti']; $implement++; $implementarray[$implement] = Array("a <strong>hand</strong>",$handmulti); }
if (isset($_POST['hairbrush'])) { $hairbrush = $_POST['hairbrush']; $hairbrushmulti = $_POST['hairbrushmulti']; $implement++; $implementarray[$implement] = Array("a <strong>hairbrush</strong>",$hairbrushmulti); }
if (isset($_POST['paddle'])) { $paddle = $_POST['paddle']; $paddlemulti = $_POST['paddlemulti']; $implement++; $implementarray[$implement] = Array("a <strong>wooden paddle</strong>",$paddlemulti); }
if (isset($_POST['switch'])) { $switch = $_POST['switch']; $switchmulti = $_POST['switchmulti']; $implement++; $implementarray[$implement] = Array("a <strong>switch</strong>",$switchmulti); }
if (isset($_POST['spoon'])) { $spoon = $_POST['spoon']; $spoonmulti = $_POST['spoonmulti']; $implement++; $implementarray[$implement] = Array("a <strong>wooden spoon</strong>",$spoonmulti); }
if (isset($_POST['cane'])) { $cane = $_POST['cane']; $canemulti = $_POST['canemulti']; $implement++; $implementarray[$implement] = Array("a <strong>cane</strong>",$canemulti); }
if (isset($_POST['bath'])) { $bath = $_POST['bath']; $bathmulti = $_POST['bathmulti']; $implement++; $implementarray[$implement] = Array("a <strong>bath brush</strong>",$bathmulti); }
if (isset($_POST['belt'])) { $belt = $_POST['belt']; $implement++; $beltmulti = $_POST['beltmulti']; $implementarray[$implement] = Array("a <strong>belt</strong>",$beltmulti); }
if (isset($_POST['tawse'])) { $tawse = $_POST['tawse']; $implement++; $tawsemulti = $_POST['tawsemulti']; $implementarray[$implement] = Array("a <strong>tawse</strong>",$tawsemulti); }
if (isset($_POST['strap'])) { $strap = $_POST['strap']; $implement++; $strapmulti = $_POST['strapmulti']; $implementarray[$implement] = Array("a <strong>strap</strong>",$strapmulti); }
if (isset($_POST['ruler'])) { $ruler = $_POST['ruler']; $implement++; $rulermulti = $_POST['rulermulti']; $implementarray[$implement] = Array("a <strong>ruler</strong>",$rulermulti); }
if (isset($_POST['leather'])) { $leather = $_POST['leather']; $leathermulti = $_POST['leathermulti']; $implement++; $implementarray[$implement] = Array("a <strong>leather paddle</strong>",$leathermulti); }
if (isset($_POST['crop'])) { $crop = $_POST['crop']; $cropmulti = $_POST['cropmulti']; $implement++; $implementarray[$implement] = Array("a <strong>riding crop</strong>",$cropmulti); }
if (isset($_POST['flogger'])) { $flogger = $_POST['flogger']; $floggermulti = $_POST['floggermulti']; $implement++; $implementarray[$implement] = Array("a <strong>flogger</strong>",$floggermulti); }
if (isset($_POST['slipper'])) { $slipper = $_POST['slipper']; $slippermulti = $_POST['slippermulti']; $implement++; $implementarray[$implement] = Array("a <strong>slipper</strong>",$slippermulti); }
if (isset($_POST['customone'])) { $customonename = $_POST['customonename']; $customonemulti = $_POST['customonemulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customonename . "</strong>",$customonemulti); }
if (isset($_POST['customtwo'])) { $customtwoname = $_POST['customtwoname']; $customtwomulti = $_POST['customtwomulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customtwoname . "</strong>",$customtwomulti); }
if (isset($_POST['customthree'])) { $customthreename = $_POST['customthreename']; $customthreemulti = $_POST['customthreemulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customthreename . "</strong>",$customthreemulti); }
if (isset($_POST['customfour'])) { $customfourname = $_POST['customfourname']; $customfourmulti = $_POST['customfourmulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customfourname . "</strong>",$customfourmulti); }
//Positions
$positionarray = Array();
if (isset($_POST['otk'])) { $otk = $_POST['otk']; $position++; $positionarray[$position] = "<strong>over the knee</strong>"; }
if (isset($_POST['overbed'])) { $overbed = $_POST['overbed']; $position++; $positionarray[$position] = "<strong>laying on the bed</strong>"; }
if (isset($_POST['diaperpos'])) { $diaperpos = $_POST['diaperpos']; $position++; $positionarray[$position] = "<strong>in the diaper position</strong>"; }
if (isset($_POST['chair'])) { $chair = $_POST['chair']; $position++; $positionarray[$position] = "<strong>bent over a chair</strong>"; }
if (isset($_POST['bend'])) { $bend = $_POST['bend']; $position++; $positionarray[$position] = "<strong>bent over</strong>"; }
if (isset($_POST['toes'])) { $toes = $_POST['toes']; $position++; $positionarray[$position] = "<strong>touching their toes</strong>"; }
if (isset($_POST['customposone'])) { $customposone = $_POST['customposone']; $customposonename = $_POST['customposonename']; $position++; $positionarray[$position] = "<strong>" . $customposonename . "</strong>"; }
if (isset($_POST['custompostwo'])) { $custompostwo = $_POST['custompostwo']; $custompostwoname = $_POST['custompostwoname']; $position++; $positionarray[$position] = "<strong>" . $custompostwoname . "</strong>"; }
if (isset($_POST['customposthree'])) { $customposthree = $_POST['customposthree']; $customposthreename = $_POST['customposthreename']; $position++; $positionarray[$position] = "<strong>" . $customposthreename . "</strong>"; }
if (isset($_POST['customposfour'])) { $customposfour = $_POST['customposfour']; $customposfourname = $_POST['customposfourname']; $position++; $positionarray[$position] = "<strong>" . $customposfourname . "</strong>"; }
//State of Dress
$dressarray = Array();
if (isset($_POST['clothed'])) { $clothed = $_POST['clothed']; $dress++; $dressarray[$dress] = "1"; }
if (isset($_POST['panties'])) { $panties = $_POST['panties']; $dress++; $dressarray[$dress] = "2"; }
if (isset($_POST['bare'])) { $bare = $_POST['bare']; $dress++; $dressarray[$dress] = "3"; }
if (isset($_POST['waist'])) { $waist = $_POST['waist']; $dress++; $dressarray[$dress] = "4"; }
if (isset($_POST['naked'])) { $naked = $_POST['naked']; $dress++; $dressarray[$dress] = "5"; }
//Sanity Checks
$sanity = "0";
$sanitycheck = "The following errors were detected:<br>";
if ($spankeename == ""){ $sanity++; $sanitycheck .= " " . $sanity . ". Please write a name for the spankee on the entry page - this can also be a nickname<br>"; }
if ($spankername == ""){ $sanity++; $sanitycheck .= " " . $sanity . ". Please write a name for the spanker on the entry page - this can also be a nickname<br>"; }
if ($reason == "") { $sanity++; $sanitycheck .= " " . $sanity . ". Please write a reason for the punishment - if you can't think of one, \"fun\" would be acceptable!<br>"; }
if ($implement == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one implement!<br>"; }
if ($extra == "0") {if ($numextra != "none") { $sanity++; $sanitycheck .= " " . $sanity . ". You must pick at least one extra punishment if you choose to have more than none<br>"; }}
if ($position == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one spanking position!<br>"; }
if ($dress == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one state of dress<br>"; }
if ($sanity != "0") { echo $sanitycheck; exit("<br>Please press the \"back\" button on your browser and correct these errors!"); }
//convert to numbers
if ($numimp == "one") { $impno = "1"; }
elseif ($numimp == "two") { $impno = "2"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br>"; }}
elseif ($numimp == "three") { $impno = "3"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br>"; }}
elseif ($numimp == "four") { $impno = "4"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br> "; }}
elseif ($numimp == "rand") { $impno = rand(1,4); if ($implement < $impno) {$impno = $implement; }}
else { exit("ERROR!"); }
if ($numextra == "one") { $extras = "1"; }
elseif ($numextra == "two") { $extras = "2"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "three") { $extras = "3"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "four") { $extras = "4"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "rand") { $extras = rand(1,4); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randone") { $extras = rand(0,1); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randtwo") { $extras = rand(0,2); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randthree") { $extras = rand(0,3); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randfour") { $extras = rand(0,4); if ($extra < $extras) {$extras = $extra;}}
//set up swats
if ($severity == "vl") { if ($impno == "1") { $swatsone = rand(10,30); } elseif ($impno == "2") { $swatsone = rand(5,15); $swatstwo = rand(5,15); } elseif ($impno == "3") { $swatsone = rand(4,10); $swatstwo = rand(3,10); $swatsthree = rand(4,10); } elseif ($impno == "4") { $swatsone = rand(3,8); $swatstwo = rand(2,7); $swatsthree = rand(3,7); $swatsfour = rand(3,8); }}
elseif ($severity == "l") { if ($impno == "1") { $swatsone = rand(20,50); } elseif ($impno == "2") { $swatsone = rand(10,25); $swatstwo = rand(10,25); } elseif ($impno == "3") { $swatsone = rand(7,17); $swatstwo = rand(7,17); $swatsthree = rand(7,17); } elseif ($impno == "4") { $swatsone = rand(5,13); $swatstwo = rand(5,12); $swatsthree = rand(5,13); $swatsfour = rand(5,12); }}
elseif ($severity == "m") { if ($impno == "1") { $swatsone = rand(40,100); } elseif ($impno == "2") { $swatsone = rand(20,50); $swatstwo = rand(20,50); } elseif ($impno == "3") { $swatsone = rand(13,34); $swatstwo = rand(14,33); $swatsthree = rand(14,34); } elseif ($impno == "4") { $swatsone = rand(10,25); $swatstwo = rand(10,25); $swatsthree = rand(10,25); $swatsfour = rand(10,25); } }
elseif ($severity == "mh") { if ($impno == "1") { $swatsone = rand(80,160); } elseif ($impno == "2") { $swatsone = rand(40,80); $swatstwo = rand(40,80); } elseif ($impno == "3") { $swatsone = rand(27,54); $swatstwo = rand(28,53); $swatsthree = rand(28,54); } elseif ($impno == "4") { $swatsone = rand(20,40); $swatstwo = rand(20,40); $swatsthree = rand(20,40); $swatsfour = rand(20,40); }}
elseif ($severity == "vh") { if ($impno == "1") { $swatsone = rand(120,200); } elseif ($impno == "2") { $swatsone = rand(60,100); $swatstwo = rand(60,100); } elseif ($impno == "3") { $swatsone = rand(40,67); $swatstwo = rand(40,66); $swatsthree = rand(40,67); } elseif ($impno == "4") { $swatsone = rand(30,50); $swatstwo = rand(30,50); $swatsthree = rand(30,50); $swatsfour = rand(30,50); }}
elseif ($severity == "r") { if ($impno == "1") { $swatsone = rand(30,200); } elseif ($impno == "2") { $swatsone = rand(15,100); $swatstwo = rand(15,100); } elseif ($impno == "3") { $swatsone = rand(3,67); $swatstwo = rand(3,67); $swatsthree = rand(3,67); } elseif ($impno == "4") { $swatsone = rand(4,50); $swatstwo = rand(4,50); $swatsthree = rand(4,50); $swatsfour = rand(4,50); }}
//Randomise Arrays
if ($implement != "0") { shuffle($implementarray); }
if ($extras != "0") { shuffle($extraarray); }
//set up implements
if ($impno == "1") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; }
elseif ($impno == "2") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; }
elseif ($impno == "3") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; $implementthree = $implementarray[2][0]; $multithree = $implementarray[2][1]; }
elseif ($impno == "4") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; $implementthree = $implementarray[2][0]; $multithree = $implementarray[2][1]; $implementfour = $implementarray[3][0]; $multifour = $implementarray[3][1]; }
//set up extras
if ($extras != "0") {
if ($extras == "1") { $extraone = $extraarray[0]; }
if ($extras == "2") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; }
if ($extras == "3") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; $extrathree = $extraarray[2]; }
if ($extras == "4") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; $extrathree = $extraarray[2]; $extrafour = $extraarray[3]; }
}
//set up swats multiplier
if ($impno == "1") { $swatsmultione = $swatsone * $multione; }
elseif ($impno == "2") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; }
elseif ($impno == "3") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; $swatsmultithree = $swatsthree * $multithree; }
elseif ($impno == "4") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; $swatsmultithree = $swatsthree * $multithree; $swatsmultifour = $swatsfour * $multifour; }
//set up positions
shuffle($positionarray);
$positionone = $positionarray[0];
shuffle($positionarray);
$positiontwo = $positionarray[0];
shuffle($positionarray);
$positionthree = $positionarray[0];
shuffle($positionarray);
$positionfour = $positionarray[0];
//set up state of dress
shuffle($dressarray);
if ($dressarray[0] == "1") { $stateofdress = "with " . $spankeename . " fully clothed."; }
elseif ($dressarray[0] == "2") { $stateofdress = "over " . $spankeename . "'s panties."; }
elseif ($dressarray[0] == "3") { $stateofdress = "with " . $spankeename . "'s bottom bare."; }
elseif ($dressarray[0] == "4") { $stateofdress = "with " . $spankeename . " naked from the waist down."; }
elseif ($dressarray[0] == "5") { $stateofdress = "with " . $spankeename . " completely naked."; }
else { exit("ERROR! something went wrong with state of dress!"); }
$content .= "<table border=2 padding=2><tr><td align = center><h2>Punishment Certificate</h2>This certificate dictates that " . $spankeename . ", for the reason of " . $reason . " will receive the folllowing punishment<br><br>";
if ($impno == "1") { $content .= "A single spanking, consisting of <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone .".<br>This spanking will be carried out " . $stateofdress . "."; }
elseif ($impno == "2") { $content .= "Two sets of spankings. <br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo .".<br>These spankings will be carried out " . $stateofdress . "."; }
elseif ($impno == "3") { $content .= "Three sets of spankings. <br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo ."<br>Set Three: <strong>" . (int)$swatsmultithree . "</strong> swats with " . $implementthree . " and " . $spankeename . " " . $positionthree .".<br>These spankings will be carried out " . $stateofdress . "."; }
elseif ($impno == "4") { $content .= "Four sets of spankings.<br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo ."<br>Set Three: <strong>" . (int)$swatsmultithree . "</strong> swats with " . $implementthree . " and " . $spankeename . " " . $positionthree ."<br>Set Four: <strong>" . (int)$swatsmultifour . "</strong> swats with " . $implementfour . " and " . $spankeename . " " . $positionfour .".<br>These spankings will be carried out " . $stateofdress . "."; }
$content .= "<br><br>";
if ($extras == "1") { $content .= "In addition, " . $spankeename . " will receive the following extra punishment: <br>" . $extraone . "<br>"; }
if ($extras == "2") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>"; }
if ($extras == "3") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>" . $extrathree . "<br>"; }
if ($extras == "4") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>" . $extrathree . "<br>" . $extrafour . "<br>"; }
$content .= "<br><br>Signed: AnimeOTK</td></tr></table>";
}
echo $content;
echo "© AnimeOTK 2010, Coded by Ai";
?>
|
|
|
December 17th, 2020, 09:01 AM
|
#4
|
Probationary User
Silentsnaky is offline
Join Date: Mar 2019
Posts: 7
|
i know this site is old but its awesome:
i have a question i would love it if there would be the option to be able to write something in the penalties below, as is the case with the positions, many thanks if it would be possible but if it is too old the page is it's okay too, but that's the only sensible side I've found in the direction of generator for spankings
i hope you can read this it is written with google translated  
|
|
|
 |
How to Run? |
 |
November 25th, 2023, 11:14 PM
|
#5
|
Probationary User
lezax1234 is offline
Join Date: Nov 2014
Posts: 2
|
How to Run?
Quote:
Originally Posted by Ai
I wrote this in 2010... looking at it now is painful. The PHP is very, very old and creaky lol
Code:
<head><script type="text/javascript" src="util-functions.js"></script>
<script type="text/javascript" src="clear-default-text.js"></script> </head><body>
<?
$content = "<div align=center><h2>~Random Punishment Selector~</h2>";
if (isset($_GET['calculate'])) { $calculate = $_GET['calculate']; }
if ($calculate != "yes") {
$content .= "<form method='post' action='/punishment.php?calculate=yes'>
<table width = 95% border=2 padding=2>
<tr>
<td width = 50%>Spankee's Name: <br>(The person who will be getting the spanking)</td>
<td width = 50%><input type='text' name='spankeename' value='Enter Name' class='cleardefault' /></td>
</tr><tr>
<td width = 50%>Spanker's Name: <br>(The person who will be giving the spanking) </td>
<td width = 50%><input type='text' name='spankername' value='Enter Name' class='cleardefault' /></td>
</tr><tr>
<td>Reason for Punishment: </td>
<td><input type='text' name='reason' value='Enter Reason' class='cleardefault' /></td>
</tr><tr>
<td>Select Severity of Punishment</td>
<td>
<input type='radio' name='severity' value='vl' />Very Light: Base swats 10-30<br>
<input type='radio' name='severity' value='l' />Light: Base swats 20-50<br>
<input type='radio' name='severity' value='m' checked />Moderate: Base swats 40-100<br>
<input type='radio' name='severity' value='mh' />Moderately Hard: Base swats 80-160<br>
<input type='radio' name='severity' value='vh' />Very Hard: Base swats 120-200<br>
<input type='radio' name='severity' value='r' />Random: Base swats 10-200<br>
<input type='radio' name='severity' value='c' />Custom. Minimum base swats <input type='text' NAME='swatsmin' size='3' maxlength='3' value='10' class='cleardefault' />, Maximum base swats <input type='text' NAME='swatsmax' size='3' maxlength='3' value='200' class='cleardefault' /> (NOT WORKING YET - DO NOT SELECT!)
</td>
</tr><tr>
<td>Select Number of implements to use during punishment:</td>
<td>
<input type='radio' name='numimp' value='one' checked />1<br>
<input type='radio' name='numimp' value='two' />2<br>
<input type='radio' name='numimp' value='three' />3<br>
<input type='radio' name='numimp' value='four' />4<br>
<input type='radio' name='numimp' value='rand' />Random (1-4) </td>
</tr><tr>
<td>Select Available Implements (NOTE: You must choose at least one implement for each spanking you selected above)</td>
<td>
<input type='checkbox' name='hand' value='hand' />Hand. Swat Multiplier <input type='text' name='handmulti' size='3' maxlength='5' class='cleardefault' value='2' /><br>
<input type='checkbox' name='hairbrush' value='hairbrush' />Hairbrush. Swat Multiplier <input type='text' name='hairbrushmulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='paddle' value='paddle' />Wooden Paddle. Swat Multiplier <input type='text' name='paddlemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='leather' value='leather' />Leather Paddle. Swat Multiplier <input type='text' name='leathermulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='switch' value='switch' />Switch. Swat Multiplier <input type='text' name='switchmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='spoon' value='spoon' />Wooden Spoon. Swat Multiplier <input type='text' name='spoonmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='cane' value='cane' />Cane. Swat Multiplier <input type='text' name='canemulti' size='3' maxlength='5' class='cleardefault' value='0.2' /><br>
<input type='checkbox' name='bath' value='bath' />Bath Brush. Swat Multiplier <input type='text' name='bathmulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='belt' value='belt' />Belt. Swat Multiplier <input type='text' name='beltmulti' size='3' maxlength='5' class='cleardefault' value='0.5'/ ><br>
<input type='checkbox' name='tawse' value='tawse' />Tawse. Swat Multiplier <input type='text' name='tawsemulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='strap' value='strap' />Strap. Swat Multiplier <input type='text' name='strapmulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='ruler' value='ruler' />Ruler. Swat Multiplier <input type='text' name='rulermulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='slipper' value='slipper' />Slipper. Swat Multiplier <input type='text' name='slippermulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='flogger' value='flogger' />Flogger. Swat Multiplier <input type='text' name='floggermulti' size='3' maxlength='5' class='cleardefault' value='0.75' /><br>
<input type='checkbox' name='crop' value='crop' />Riding Crop. Swat Multiplier <input type='text' name='cropmulti' size='3' maxlength='5' class='cleardefault' value='0.5' /><br>
<input type='checkbox' name='customone' value='customone' />Custom Implement One. Name: <input type='text' name='customonename' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customonemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customtwo' value='customtwo' />Custom Implement two. Name: <input type='text' name='customtwoname' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customtwomulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customthree' value='customthree' />Custom Implement three. Name: <input type='text' name='customthreename' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customthreemulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
<input type='checkbox' name='customfour' value='customfour' />Custom Implement four. Name: <input type='text' name='customfourname' value='Enter Implement Name' class='cleardefault' /> Swat Multiplier <input type='text' name='customfourmulti' size='3' maxlength='5' class='cleardefault' value='1' /><br>
</td>
</tr><tr>
<td>Select Position(s) to randomly choose from. (NOTE: You may select just one spanking position which will be used for multiple spankings)</td>
<td>
<input type='checkbox' name='otk' value='otk' checked />Over the knee<br>
<input type='checkbox' name='overbed' value='overbed' />Laying on the bed<br>
<input type='checkbox' name='diaperpos' value='diaperpos' />Diaper position (laying on back, legs up)<br>
<input type='checkbox' name='chair' value='chair' />Bend over a chair<br>
<input type='checkbox' name='bend' value='bend' />Bending Over<br>
<input type='checkbox' name='toes' value='toes' />Touching Toes<br>
<input type='checkbox' name='customposone' value='customposone' /><input type='text' name='customposonename' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='custompostwo' value='custompostwo' /><input type='text' name='custompostwoname' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='customposthree' value='customposthree' /><input type='text' name='customposthreename' value='Enter Custom Position' class='cleardefault' /><br>
<input type='checkbox' name='customposfour' value='customposfour' /><input type='text' name='customposfourname' value='Enter Custom Position' class='cleardefault' /><br>
</td>
</tr><tr>
<td>Select states of dress to choose randomly from. (NOTE: One state of dress will be selected for all of the spankings if more than one will happen)</td>
<td>
<input type='checkbox' name='clothed' value='clothed' checked />Fully Clothed<br>
<input type='checkbox' name='panties' value='panties' />Over Underwear<br>
<input type='checkbox' name='bare' value='bare' />Bare Bottom<br>
<input type='checkbox' name='waist' value='waist' />Naked from the waist down<br>
<input type='checkbox' name='naked' value='naked' />Fully naked<br>
</td>
</tr><tr>
<td>How many extra punishments are required?</td>
<td>
<input type='radio' name='numextra' value='none' checked />None<br>
<input type='radio' name='numextra' value='one' />1<br>
<input type='radio' name='numextra' value='two' />2<br>
<input type='radio' name='numextra' value='three' />3<br>
<input type='radio' name='numextra' value='four' />4<br>
<input type='radio' name='numextra' value='rand' />Random (1-4)<br>
<input type='radio' name='numextra' value='randone' />Random (0-1)<br>
<input type='radio' name='numextra' value='randtwo' />Random (0-2)<br>
<input type='radio' name='numextra' value='randthree' />Random (0-3)<br>
<input type='radio' name='numextra' value='randfour' />Random (0-4)
</td>
</tr><tr>
<td>Select the extra punishments to choose from:</td>
<td>
<input type='checkbox' name='corner' value='corner' />Corner Time<br>
<input type='checkbox' name='bed' value='bed' />Early Bedtime<br>
<input type='checkbox' name='dessert' value='dessert' />No Dessert<br>
<input type='checkbox' name='soap' value='soap' />Mouth Soaping<br>
<input type='checkbox' name='enema' value='enema' />Enema<br>
<input type='checkbox' name='cross' value='cross' />Forced Cross Dressing<br>
<input type='checkbox' name='spank' value='spank' />Extra Bedtime Spanking<br>
<input type='checkbox' name='grounded' value='grounded' />Grounded<br>
<input type='checkbox' name='notv' value='notv' />No TV<br>
<input type='checkbox' name='nopc' value='nopc' />No PC / Internet<br>
<input type='checkbox' name='lines' value='lines' />Written Lines<br>
<input type='checkbox' name='fig' value='fig' />Ginger Fig<br>
<input type='checkbox' name='tiger' value='tiger' />\"Tiger Balm\" / \"Icy Hot\" bottom rub<br>
</td>
</tr>
</table>
<input type='submit' value='Let the punishment begin'>
</form>";
}
else {
//set up the autocounts
$extra = "0";
$implement = "0";
$position = "0";
$dress = "0";
//Names and Numbers
if (isset($_POST['spankeename'])) { $spankeename = $_POST['spankeename']; }
if (isset($_POST['spankername'])) { $spankername = $_POST['spankername']; }
if (isset($_POST['reason'])) { $reason = $_POST['reason']; }
if (isset($_POST['severity'])) { $severity = $_POST['severity']; }
if (isset($_POST['numimp'])) { $numimp = $_POST['numimp']; }
if (isset($_POST['numextra'])) { $numextra = $_POST['numextra']; }
//Extras
$thirty = Array("5","10","15","20","25","30");
$sixty = Array("5","10","15","20","25","30","35","40","45","50","55","60");
$hundred = Array("10","20","30","40","50","60","70","80","90","100");
$twohundred = Array("10","20","30","40","50","60","70","80","90","100","110","120","130","140","150","160","170","180","190","200");
$seventytwo = Array("6","12","18","24","30","36","42","48","54","60","66","72");
$fifteen = Array("1","2","3","4","5","6","7","8","9","10","11","12","13","14","15");
$extraarray = Array();
if (isset($_POST['corner'])) { $corner = $_POST['corner']; $extra++; shuffle($sixty); $time = $sixty[0]; $cornertime = " " . $time . " minutes of corner time"; $extraarray[$extra] = $cornertime ; }
if (isset($_POST['bed'])) { $bed = $_POST['bed']; $extra++; $early=rand(1,7); $bedtime=" " . $early . " day(s) of early bedtime"; $extraarray[$extra] = $bedtime; }
if (isset($_POST['dessert'])) { $dessert = $_POST['dessert']; $extra++; $nodessert=rand(1,7); $dessertdays = " " . $nodessert . " day(s) with no dessert "; $extraarray[$extra] = $dessertdays; }
if (isset($_POST['soap'])) { $soap = $_POST['soap']; $extra++; $extraarray[$extra] = "A mouth soaping before the spanking. No rinsing until after."; }
if (isset($_POST['enema'])) { $enema = $_POST['enema']; $extra++; shuffle($thirty); $enematime=$thirty[0]; $enemamessage = "An enema retained for " . $enematime . " minutes"; $extraarray[$extra] = $enemamessage; }
if (isset($_POST['cross'])) { $cross = $_POST['cross']; $extra++; shuffle($seventytwo); $crosstime=$seventytwo[0]; $crossmessage = " " . $crosstime . " hours of forced cross dressing"; $extraarray[$extra] = $crossmessage; }
if (isset($_POST['spank'])) { $spank = $_POST['spank']; $extra++; $bedspank=rand(1,7); $beddays = " " . $bedspank . " day(s) of bedtime spankings ";$extraarray[$extra] = $beddays; }
if (isset($_POST['grounded'])) { $grounded = $_POST['grounded']; $extra++; $isgrounded=rand(1,7); $groundeddays = " " . $isgrounded . " day(s) of being grounded";$extraarray[$extra] = $groundeddays; }
if (isset($_POST['notv'])) { $notv = $_POST['notv']; $extra++; $notvdays=rand(1,7); $tvdays = " " . $notvdays . " day(s) of no TV"; $extraarray[$extra] = $tvdays; }
if (isset($_POST['nopc'])) { $nopc = $_POST['nopc']; $extra++; $nopcdays=rand(1,7); $pcdays = " " . $nopcdays . " day(s) of no PC access"; $extraarray[$extra] = $pcdays; }
if (isset($_POST['lines'])) { $lines = $_POST['lines']; $extra++; shuffle($twohundred); $linesrand=$twohundred[0]; $linestotal = " " . $linesrand . " written lines of the spanker's choosing"; $extraarray[$extra] = $linestotal; }
if (isset($_POST['fig'])) { $fig = $_POST['fig']; $extra++; shuffle($fifteen); $figrand=$fifteen[0]; $figtotal = " " . $figrand . " minutes with a ginger fig inserted"; $extraarray[$extra] = $figtotal; }
if (isset($_POST['tiger'])) { $tiger = $_POST['tiger']; $extra++; $tigertotal = "A coating of \"Tiger Balm\", \"Icy Hot\" or similar rubbed into their bottom at the end of the spanking"; $extraarray[$extra] = $tigertotal; }
//Implements
$implementarray = Array();
$multipler = Array();
if (isset($_POST['hand'])) { $hand = $_POST['hand']; $handmulti = $_POST['handmulti']; $implement++; $implementarray[$implement] = Array("a <strong>hand</strong>",$handmulti); }
if (isset($_POST['hairbrush'])) { $hairbrush = $_POST['hairbrush']; $hairbrushmulti = $_POST['hairbrushmulti']; $implement++; $implementarray[$implement] = Array("a <strong>hairbrush</strong>",$hairbrushmulti); }
if (isset($_POST['paddle'])) { $paddle = $_POST['paddle']; $paddlemulti = $_POST['paddlemulti']; $implement++; $implementarray[$implement] = Array("a <strong>wooden paddle</strong>",$paddlemulti); }
if (isset($_POST['switch'])) { $switch = $_POST['switch']; $switchmulti = $_POST['switchmulti']; $implement++; $implementarray[$implement] = Array("a <strong>switch</strong>",$switchmulti); }
if (isset($_POST['spoon'])) { $spoon = $_POST['spoon']; $spoonmulti = $_POST['spoonmulti']; $implement++; $implementarray[$implement] = Array("a <strong>wooden spoon</strong>",$spoonmulti); }
if (isset($_POST['cane'])) { $cane = $_POST['cane']; $canemulti = $_POST['canemulti']; $implement++; $implementarray[$implement] = Array("a <strong>cane</strong>",$canemulti); }
if (isset($_POST['bath'])) { $bath = $_POST['bath']; $bathmulti = $_POST['bathmulti']; $implement++; $implementarray[$implement] = Array("a <strong>bath brush</strong>",$bathmulti); }
if (isset($_POST['belt'])) { $belt = $_POST['belt']; $implement++; $beltmulti = $_POST['beltmulti']; $implementarray[$implement] = Array("a <strong>belt</strong>",$beltmulti); }
if (isset($_POST['tawse'])) { $tawse = $_POST['tawse']; $implement++; $tawsemulti = $_POST['tawsemulti']; $implementarray[$implement] = Array("a <strong>tawse</strong>",$tawsemulti); }
if (isset($_POST['strap'])) { $strap = $_POST['strap']; $implement++; $strapmulti = $_POST['strapmulti']; $implementarray[$implement] = Array("a <strong>strap</strong>",$strapmulti); }
if (isset($_POST['ruler'])) { $ruler = $_POST['ruler']; $implement++; $rulermulti = $_POST['rulermulti']; $implementarray[$implement] = Array("a <strong>ruler</strong>",$rulermulti); }
if (isset($_POST['leather'])) { $leather = $_POST['leather']; $leathermulti = $_POST['leathermulti']; $implement++; $implementarray[$implement] = Array("a <strong>leather paddle</strong>",$leathermulti); }
if (isset($_POST['crop'])) { $crop = $_POST['crop']; $cropmulti = $_POST['cropmulti']; $implement++; $implementarray[$implement] = Array("a <strong>riding crop</strong>",$cropmulti); }
if (isset($_POST['flogger'])) { $flogger = $_POST['flogger']; $floggermulti = $_POST['floggermulti']; $implement++; $implementarray[$implement] = Array("a <strong>flogger</strong>",$floggermulti); }
if (isset($_POST['slipper'])) { $slipper = $_POST['slipper']; $slippermulti = $_POST['slippermulti']; $implement++; $implementarray[$implement] = Array("a <strong>slipper</strong>",$slippermulti); }
if (isset($_POST['customone'])) { $customonename = $_POST['customonename']; $customonemulti = $_POST['customonemulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customonename . "</strong>",$customonemulti); }
if (isset($_POST['customtwo'])) { $customtwoname = $_POST['customtwoname']; $customtwomulti = $_POST['customtwomulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customtwoname . "</strong>",$customtwomulti); }
if (isset($_POST['customthree'])) { $customthreename = $_POST['customthreename']; $customthreemulti = $_POST['customthreemulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customthreename . "</strong>",$customthreemulti); }
if (isset($_POST['customfour'])) { $customfourname = $_POST['customfourname']; $customfourmulti = $_POST['customfourmulti']; $implement++; $implementarray[$implement] = Array("a <strong>" . $customfourname . "</strong>",$customfourmulti); }
//Positions
$positionarray = Array();
if (isset($_POST['otk'])) { $otk = $_POST['otk']; $position++; $positionarray[$position] = "<strong>over the knee</strong>"; }
if (isset($_POST['overbed'])) { $overbed = $_POST['overbed']; $position++; $positionarray[$position] = "<strong>laying on the bed</strong>"; }
if (isset($_POST['diaperpos'])) { $diaperpos = $_POST['diaperpos']; $position++; $positionarray[$position] = "<strong>in the diaper position</strong>"; }
if (isset($_POST['chair'])) { $chair = $_POST['chair']; $position++; $positionarray[$position] = "<strong>bent over a chair</strong>"; }
if (isset($_POST['bend'])) { $bend = $_POST['bend']; $position++; $positionarray[$position] = "<strong>bent over</strong>"; }
if (isset($_POST['toes'])) { $toes = $_POST['toes']; $position++; $positionarray[$position] = "<strong>touching their toes</strong>"; }
if (isset($_POST['customposone'])) { $customposone = $_POST['customposone']; $customposonename = $_POST['customposonename']; $position++; $positionarray[$position] = "<strong>" . $customposonename . "</strong>"; }
if (isset($_POST['custompostwo'])) { $custompostwo = $_POST['custompostwo']; $custompostwoname = $_POST['custompostwoname']; $position++; $positionarray[$position] = "<strong>" . $custompostwoname . "</strong>"; }
if (isset($_POST['customposthree'])) { $customposthree = $_POST['customposthree']; $customposthreename = $_POST['customposthreename']; $position++; $positionarray[$position] = "<strong>" . $customposthreename . "</strong>"; }
if (isset($_POST['customposfour'])) { $customposfour = $_POST['customposfour']; $customposfourname = $_POST['customposfourname']; $position++; $positionarray[$position] = "<strong>" . $customposfourname . "</strong>"; }
//State of Dress
$dressarray = Array();
if (isset($_POST['clothed'])) { $clothed = $_POST['clothed']; $dress++; $dressarray[$dress] = "1"; }
if (isset($_POST['panties'])) { $panties = $_POST['panties']; $dress++; $dressarray[$dress] = "2"; }
if (isset($_POST['bare'])) { $bare = $_POST['bare']; $dress++; $dressarray[$dress] = "3"; }
if (isset($_POST['waist'])) { $waist = $_POST['waist']; $dress++; $dressarray[$dress] = "4"; }
if (isset($_POST['naked'])) { $naked = $_POST['naked']; $dress++; $dressarray[$dress] = "5"; }
//Sanity Checks
$sanity = "0";
$sanitycheck = "The following errors were detected:<br>";
if ($spankeename == ""){ $sanity++; $sanitycheck .= " " . $sanity . ". Please write a name for the spankee on the entry page - this can also be a nickname<br>"; }
if ($spankername == ""){ $sanity++; $sanitycheck .= " " . $sanity . ". Please write a name for the spanker on the entry page - this can also be a nickname<br>"; }
if ($reason == "") { $sanity++; $sanitycheck .= " " . $sanity . ". Please write a reason for the punishment - if you can't think of one, \"fun\" would be acceptable!<br>"; }
if ($implement == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one implement!<br>"; }
if ($extra == "0") {if ($numextra != "none") { $sanity++; $sanitycheck .= " " . $sanity . ". You must pick at least one extra punishment if you choose to have more than none<br>"; }}
if ($position == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one spanking position!<br>"; }
if ($dress == "0") { $sanity++; $sanitycheck .= " " . $sanity . ". Please select at least one state of dress<br>"; }
if ($sanity != "0") { echo $sanitycheck; exit("<br>Please press the \"back\" button on your browser and correct these errors!"); }
//convert to numbers
if ($numimp == "one") { $impno = "1"; }
elseif ($numimp == "two") { $impno = "2"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br>"; }}
elseif ($numimp == "three") { $impno = "3"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br>"; }}
elseif ($numimp == "four") { $impno = "4"; if ($implement < $impno) {$impno = $implement; $content .= "NOTE: Not enough implements selected, number of spankings reduced to match implements<br> "; }}
elseif ($numimp == "rand") { $impno = rand(1,4); if ($implement < $impno) {$impno = $implement; }}
else { exit("ERROR!"); }
if ($numextra == "one") { $extras = "1"; }
elseif ($numextra == "two") { $extras = "2"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "three") { $extras = "3"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "four") { $extras = "4"; if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "rand") { $extras = rand(1,4); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randone") { $extras = rand(0,1); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randtwo") { $extras = rand(0,2); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randthree") { $extras = rand(0,3); if ($extra < $extras) {$extras = $extra;}}
elseif ($numextra == "randfour") { $extras = rand(0,4); if ($extra < $extras) {$extras = $extra;}}
//set up swats
if ($severity == "vl") { if ($impno == "1") { $swatsone = rand(10,30); } elseif ($impno == "2") { $swatsone = rand(5,15); $swatstwo = rand(5,15); } elseif ($impno == "3") { $swatsone = rand(4,10); $swatstwo = rand(3,10); $swatsthree = rand(4,10); } elseif ($impno == "4") { $swatsone = rand(3,8); $swatstwo = rand(2,7); $swatsthree = rand(3,7); $swatsfour = rand(3,8); }}
elseif ($severity == "l") { if ($impno == "1") { $swatsone = rand(20,50); } elseif ($impno == "2") { $swatsone = rand(10,25); $swatstwo = rand(10,25); } elseif ($impno == "3") { $swatsone = rand(7,17); $swatstwo = rand(7,17); $swatsthree = rand(7,17); } elseif ($impno == "4") { $swatsone = rand(5,13); $swatstwo = rand(5,12); $swatsthree = rand(5,13); $swatsfour = rand(5,12); }}
elseif ($severity == "m") { if ($impno == "1") { $swatsone = rand(40,100); } elseif ($impno == "2") { $swatsone = rand(20,50); $swatstwo = rand(20,50); } elseif ($impno == "3") { $swatsone = rand(13,34); $swatstwo = rand(14,33); $swatsthree = rand(14,34); } elseif ($impno == "4") { $swatsone = rand(10,25); $swatstwo = rand(10,25); $swatsthree = rand(10,25); $swatsfour = rand(10,25); } }
elseif ($severity == "mh") { if ($impno == "1") { $swatsone = rand(80,160); } elseif ($impno == "2") { $swatsone = rand(40,80); $swatstwo = rand(40,80); } elseif ($impno == "3") { $swatsone = rand(27,54); $swatstwo = rand(28,53); $swatsthree = rand(28,54); } elseif ($impno == "4") { $swatsone = rand(20,40); $swatstwo = rand(20,40); $swatsthree = rand(20,40); $swatsfour = rand(20,40); }}
elseif ($severity == "vh") { if ($impno == "1") { $swatsone = rand(120,200); } elseif ($impno == "2") { $swatsone = rand(60,100); $swatstwo = rand(60,100); } elseif ($impno == "3") { $swatsone = rand(40,67); $swatstwo = rand(40,66); $swatsthree = rand(40,67); } elseif ($impno == "4") { $swatsone = rand(30,50); $swatstwo = rand(30,50); $swatsthree = rand(30,50); $swatsfour = rand(30,50); }}
elseif ($severity == "r") { if ($impno == "1") { $swatsone = rand(30,200); } elseif ($impno == "2") { $swatsone = rand(15,100); $swatstwo = rand(15,100); } elseif ($impno == "3") { $swatsone = rand(3,67); $swatstwo = rand(3,67); $swatsthree = rand(3,67); } elseif ($impno == "4") { $swatsone = rand(4,50); $swatstwo = rand(4,50); $swatsthree = rand(4,50); $swatsfour = rand(4,50); }}
//Randomise Arrays
if ($implement != "0") { shuffle($implementarray); }
if ($extras != "0") { shuffle($extraarray); }
//set up implements
if ($impno == "1") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; }
elseif ($impno == "2") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; }
elseif ($impno == "3") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; $implementthree = $implementarray[2][0]; $multithree = $implementarray[2][1]; }
elseif ($impno == "4") { $implementone = $implementarray[0][0]; $multione = $implementarray[0][1]; $implementtwo = $implementarray[1][0]; $multitwo = $implementarray[1][1]; $implementthree = $implementarray[2][0]; $multithree = $implementarray[2][1]; $implementfour = $implementarray[3][0]; $multifour = $implementarray[3][1]; }
//set up extras
if ($extras != "0") {
if ($extras == "1") { $extraone = $extraarray[0]; }
if ($extras == "2") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; }
if ($extras == "3") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; $extrathree = $extraarray[2]; }
if ($extras == "4") { $extraone = $extraarray[0]; $extratwo = $extraarray[1]; $extrathree = $extraarray[2]; $extrafour = $extraarray[3]; }
}
//set up swats multiplier
if ($impno == "1") { $swatsmultione = $swatsone * $multione; }
elseif ($impno == "2") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; }
elseif ($impno == "3") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; $swatsmultithree = $swatsthree * $multithree; }
elseif ($impno == "4") { $swatsmultione = $swatsone * $multione; $swatsmultitwo = $swatstwo * $multitwo; $swatsmultithree = $swatsthree * $multithree; $swatsmultifour = $swatsfour * $multifour; }
//set up positions
shuffle($positionarray);
$positionone = $positionarray[0];
shuffle($positionarray);
$positiontwo = $positionarray[0];
shuffle($positionarray);
$positionthree = $positionarray[0];
shuffle($positionarray);
$positionfour = $positionarray[0];
//set up state of dress
shuffle($dressarray);
if ($dressarray[0] == "1") { $stateofdress = "with " . $spankeename . " fully clothed."; }
elseif ($dressarray[0] == "2") { $stateofdress = "over " . $spankeename . "'s panties."; }
elseif ($dressarray[0] == "3") { $stateofdress = "with " . $spankeename . "'s bottom bare."; }
elseif ($dressarray[0] == "4") { $stateofdress = "with " . $spankeename . " naked from the waist down."; }
elseif ($dressarray[0] == "5") { $stateofdress = "with " . $spankeename . " completely naked."; }
else { exit("ERROR! something went wrong with state of dress!"); }
$content .= "<table border=2 padding=2><tr><td align = center><h2>Punishment Certificate</h2>This certificate dictates that " . $spankeename . ", for the reason of " . $reason . " will receive the folllowing punishment<br><br>";
if ($impno == "1") { $content .= "A single spanking, consisting of <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone .".<br>This spanking will be carried out " . $stateofdress . "."; }
elseif ($impno == "2") { $content .= "Two sets of spankings. <br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo .".<br>These spankings will be carried out " . $stateofdress . "."; }
elseif ($impno == "3") { $content .= "Three sets of spankings. <br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo ."<br>Set Three: <strong>" . (int)$swatsmultithree . "</strong> swats with " . $implementthree . " and " . $spankeename . " " . $positionthree .".<br>These spankings will be carried out " . $stateofdress . "."; }
elseif ($impno == "4") { $content .= "Four sets of spankings.<br>Set One: <strong>" . (int)$swatsmultione . "</strong> swats with " . $implementone . " and " . $spankeename . " " . $positionone ."<br>Set Two: <strong>" . (int)$swatsmultitwo . "</strong> swats with " . $implementtwo . " and " . $spankeename . " " . $positiontwo ."<br>Set Three: <strong>" . (int)$swatsmultithree . "</strong> swats with " . $implementthree . " and " . $spankeename . " " . $positionthree ."<br>Set Four: <strong>" . (int)$swatsmultifour . "</strong> swats with " . $implementfour . " and " . $spankeename . " " . $positionfour .".<br>These spankings will be carried out " . $stateofdress . "."; }
$content .= "<br><br>";
if ($extras == "1") { $content .= "In addition, " . $spankeename . " will receive the following extra punishment: <br>" . $extraone . "<br>"; }
if ($extras == "2") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>"; }
if ($extras == "3") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>" . $extrathree . "<br>"; }
if ($extras == "4") { $content .= "In addition, " . $spankeename . " will receive the following extra punishments: <br>" . $extraone . "<br>" . $extratwo . "<br>" . $extrathree . "<br>" . $extrafour . "<br>"; }
$content .= "<br><br>Signed: AnimeOTK</td></tr></table>";
}
echo $content;
echo "© AnimeOTK 2010, Coded by Ai";
?>
|
So, how would one take this code and upload it or make it usable somewhere? What programs and languages are used here? I have several changes I want to make to this program, for private or public use, but idk how to actually get it uploaded/working/running.
|
|
|
 |
|
 |
December 14th, 2023, 04:23 AM
|
#6
|
Artist
flashmaster63 is online now
Join Date: Jul 2007
Location: Alberta, Canada
Posts: 773
|
Quote:
Originally Posted by lezax1234
So, how would one take this code and upload it or make it usable somewhere? What programs and languages are used here? I have several changes I want to make to this program, for private or public use, but idk how to actually get it uploaded/working/running.
|
I have no knowledge of php, so I refactored everything into javascript.
I THINK everything works - it's possible I've messed something up with my limited testing. Also, it currently generates the certificate at the bottom of the page, instead of a new page. Also fixed the custom option... Should work now.
Here you go:
https://mega.nz/file/xlklSCBD#FA4YJg...peOaUKjr85BtMg
You should be able to run the .html document on the browser and as long as the .js file is in the same folder it should work.
Basic web programming - your html is the structure of the web page, where things are, what kind of items they are (label, checkbox, radio button) and the javascript is the part that makes it work. When you click the button at the bottom, the javascript file is what makes everything happen, takes the info from the page that you entered, and generates the certificate after performing a few calculations.
Last edited by flashmaster63; December 14th, 2023 at 01:17 PM.
Reason: Also fixed the custom option... Should work now.
|
|
|
January 25th, 2024, 07:32 AM
|
#7
|
Junior Member
avatarjay is offline
Join Date: Jan 2024
Posts: 11
|
This is so interesting. I hope someone will perfect the code.
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Total page views: , page views today: 0
All times are GMT. The time now is 04:32 AM.
|
|