PHP: [ Select all ]
// ################### HALLOWEEN #####################
global $userinfo;
$yourname = 'coRpSE';
$cookietime = 15; //Time between popups, (in miniutes). Set to 0 for no time between message showing up on page refreshes
$cookie_name = 'halloween'; //Cookie Name
$cookie_value = 'true';
$uname2 = $userinfo['username']; //Only used if you want to target specific people or only your self for testing purposes
$afdate = date("md"); //Check to see if today is Halloween
//############################################################
// if ((!isset($_COOKIE[$cookie_name]) && $afdate == '1031') || $uname2 == $yourname){ //Use this for testing.
if (!isset($_COOKIE[$cookie_name]) && $afdate == '1031'){ //Use this when not testing
echo "<link rel=\"stylesheet\" href=\"./includes/custom_files/halloween/css/hwscript.css\" type=\"text/css\">";
echo '<div class="foreground"></div>
<div class="midground">
<div class="tuna"></div>
</div>';
echo '<audio autoplay loop>
<source src="./includes/custom_files/halloween/song/tih_song.ogg" type="audio/ogg">
<source src="./includes/custom_files/halloween/song/tih_song.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>';
//create cookie
setcookie($cookie_name, $cookie_value, time() + (60 * $cookietime), "/" );
//cookie created
}
// ################### END HALLOWEEN ######################