File: //home/awaldron/public_html/aw/love.php
<?php
session_start();
include('love_a.php');
include('love_m.php');
if (empty($_GET[ct])) {
$ct = 0;
$next = 1;
} else {
$ct = $_GET[ct];
$next = $ct + 1;
}
if (!isset($_SESSION['used'])) $_SESSION['used'] = '|';
if (!isset($_SESSION['challenges_complete'])) $_SESSION['challenges_complete'] = array();
$challenge = array_merge($challenge1, $challenge2);
$who = array('Alan','Melissa');
$alan = array('kiss/lick/suck', 'face', 'chest', 'hands', 'back', 'ass', 'cock', 'toes', 'wildcard' );
$meli = array('kiss/lick/suck', 'face', 'tits', 'hands', 'back', 'ass', 'pussy', 'toes', 'wildcard' );
$do_challenge = false; //(rand(0,7) == 3);
if ($do_challenge) {
do {
$thisChallenge = $challenge[rand(0,(count($challenge)-1))];
} while (in_array($thisChallenge, $_SESSION['challenges_complete']));
$_SESSION['challenges_complete'][] = $thisChallenge;
} else {
do {
$act1 = $alan[rand(0,8)];
$act2 = $meli[rand(0,8)];
$thisact = $act1.$act2.'|';
} while ( strstr($_SESSION['used'], '|'.$thisact) );
$_SESSION['used'] .= $thisact;
}
?>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
<!--
$(document).ready(function() {
var count = 70;
countdown = setInterval(function(){
if (count > 60) {
$("p.countdown").html((count-60) + " Seconds to Get Ready!");
if ((count <= 63) && (count > 60)) {
PlaySound('beep');
}
} else {
$("p.countdown").html(count + " Seconds Left!");
if (count == 60) {
PlaySound('chime');
}
if ((count <= 10) && (count >0)) {
PlaySound('beep');
}
if (count == 0) {
PlaySound('chime');
$("p.countdown").remove();
}
if (count == -3) {
//window.location = 'love.php?ct=<?=$next?>';
}
}
count--;
}, 1000);
});
function PlaySound(soundObj) {
var sound = document.getElementById(soundObj);
sound.play();
}
-->
</script>
</head>
<body style="background:#444;color:#FFF;font-size:36px;">
<audio id="beep">
<source src="beep.wav" type="audio/wav">
</audio>
<audio id="chime">
<source src="chime.wav" type="audio/wav">
</audio>
<table style="font-size:36px;">
<?php
if ($do_challenge) {
echo '<tr><td style="color:#e74c3c;">CHALLENGE! </td><td>'. $thisChallenge .'</td></tr>';
} else {
echo '<tr><td style="color:#e74c3c;">Director: </td><td style="color:#ffcc00;">'.$who[($ct%2)].'</td></tr>';
echo '<tr><td>Alan:</td><td>'. $act1 .'</td></tr>';
echo '<tr><td>Melissa:</td><td>'. $act2 .'</td></tr>';
}
//echo $_SESSION['used'];
?>
</table>
<p class="countdown"></p>
<p><button class="btn" onclick="location.href='love.php?ct=<?=$next?>'">NEXT »</button></p>
<style>
/* button div */
#buttons {
padding-top: 50px;
text-align: center;
}
/* start da css for da buttons */
.btn {
border-radius: 5px;
padding: 15px 25px;
font-size: 22px;
text-decoration: none;
margin: 20px;
color: #fff;
position: relative;
display: inline-block;
background-color: #e74c3c;
box-shadow: 0px 5px 0px 0px #CE3323;
}
.btn:active {
transform: translate(0px, 5px);
-webkit-transform: translate(0px, 5px);
box-shadow: 0px 1px 0px 0px;
}
</style>
</body>
</html>