213 lines
10 KiB
PHP
213 lines
10 KiB
PHP
|
|
<script type="text/javascript">
|
||
|
|
function update_bwadclick(bwadid,theadhour){
|
||
|
|
theurl="/include/analytics/bw_adclick.php";
|
||
|
|
jQuery.ajax({
|
||
|
|
url: theurl,
|
||
|
|
datatype:'json',
|
||
|
|
type: 'GET',
|
||
|
|
cache: false,
|
||
|
|
data:{bwadid:bwadid,theadhour:theadhour},
|
||
|
|
success: function(data) {
|
||
|
|
//do nothing
|
||
|
|
},
|
||
|
|
error: function(resp, textStatus, errorThrown){
|
||
|
|
//alert(resp.responseText); do nothing
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
<div style="text-align:center;width:100%;margin-bottom:10px;"><a href="https://twitter.com/bateworld" target="_blank" style="text-decoration:none;"><img src="/images/sm_icons/twitter_1.png" width="33" height="33" alt="Bateworld Twitter" /></a><a href="http://bateworld.tumblr.com/" target="_blank" style="text-decoration:none;"><img src="/images/sm_icons/tumblr_1.png" width="33" height="33" alt="Bateworld Tumblr" style="margin:0 2px 0 4px" /></a><a href="https://www.instagram.com/bateworld/" target="_blank" style="text-decoration:none;"><img src="/images/sm_icons/instagram_1.png" width="33" height="33" alt="Bateworld Instagram" style="margin:0 2px 0 2px"/></a><a href="https://plus.google.com/100567032879959524338" target="_blank" style="text-decoration:none;"><img src="/images/sm_icons/googleplus.png" width="33" height="33" alt="Bateword Google+" style="margin:0 4px 0 2px" /></a><a href="https://www.youtube.com/user/BateWorld" target="_blank" style="text-decoration:none;"><img src="/images/sm_icons/youtube_1.png" width="33" height="33" alt="Bateword Youtube" /></a></div>
|
||
|
|
<?php
|
||
|
|
//Couldn't create a dynamic app because the database crashed all the time. Couldn't move it to another server (best choice). All strange, but once you figure out what is going on - makes sense. Watch you back and maintain a safe version. Check modification dates against your local file. Don't be surprised if modifications are made that introduce errors. Given how difficult it is to maintain a file like this - remember, 90% of the time the mistakes are yours. Don't let the other occassions rattle you.
|
||
|
|
|
||
|
|
// think about what can be cached on the client side as well as page load / performance
|
||
|
|
|
||
|
|
$wh_ad="";
|
||
|
|
$wh_adchoice=1;
|
||
|
|
$wh_adhour = date('H');
|
||
|
|
if(!isset($_SESSION["whadhour"])){$_SESSION["whadhour"]=$wh_adhour;}
|
||
|
|
|
||
|
|
if($_SESSION["whadhour"] != $wh_adhour){
|
||
|
|
$_SESSION["whadhour"]=$wh_adhour;
|
||
|
|
$_SESSION["whadchoice"]=0;
|
||
|
|
}
|
||
|
|
$wh_adgroup=1;
|
||
|
|
$wh_adtag="";
|
||
|
|
if($wh_adhour >= 0 && $wh_adhour < 1){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 1 && $wh_adhour < 2){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 2 && $wh_adhour < 3){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 3 && $wh_adhour < 4){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 4 && $wh_adhour < 6){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 6 && $wh_adhour < 7){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 7 && $wh_adhour < 8){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 8 && $wh_adhour < 9){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 9 && $wh_adhour < 10){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 10 && $wh_adhour < 11){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 11 && $wh_adhour < 12){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 12 && $wh_adhour < 13){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 13 && $wh_adhour < 14){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 14 && $wh_adhour < 15){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 15 && $wh_adhour < 16){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 16 && $wh_adhour < 17){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 17 && $wh_adhour < 18){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 18 && $wh_adhour < 19){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 19 && $wh_adhour < 20){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 20 && $wh_adhour < 21){$wh_adtag="sex toys";}
|
||
|
|
if($wh_adhour >= 21 && $wh_adhour < 22){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 22 && $wh_adhour < 23){$wh_adtag="batefuel";}
|
||
|
|
if($wh_adhour >= 23 && $wh_adhour <= 24){$wh_adtag="sex toys";}
|
||
|
|
|
||
|
|
//substain is number of times to show individual ads
|
||
|
|
if(!isset($_SESSION["whadsustainad"])){$_SESSION["whadsustainad"]=0;}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
$_SESSION["whadsustainad"]=$_SESSION["whadsustainad"]+1;
|
||
|
|
if($_SESSION["whadsustainad"]==3 || $_SESSION["whadsustainad"] > 3)
|
||
|
|
{
|
||
|
|
$_SESSION["whadsustainad"]=0;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
if(!isset($_SESSION["whadchoice"])){$_SESSION["whadchoice"]=0;}
|
||
|
|
|
||
|
|
if($wh_adtag==""){$wh_adtag="batefuel";}
|
||
|
|
//Check to see if we need to rotate ad - if so, rotate. Obviously if this is the first time for client select ad
|
||
|
|
if($wh_adtag=="batefuel"){
|
||
|
|
if($_SESSION["whadsustainad"]==0 || $_SESSION["whadchoice"]==0)
|
||
|
|
{
|
||
|
|
$wh_adchoice=mt_rand(1, 5); // rand selection from total number of ads in a given tag batefuel/sex toys
|
||
|
|
$_SESSION["whadchoice"]=$wh_adchoice;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
$wh_adchoice=$_SESSION["whadchoice"];
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adtag=="sex toys"){
|
||
|
|
|
||
|
|
if($_SESSION["whadsustainad"]==0 || $_SESSION["whadchoice"]==0)
|
||
|
|
{
|
||
|
|
$wh_adchoice=mt_rand(1, 3);
|
||
|
|
$_SESSION["whadchoice"]=$wh_adchoice;
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
$wh_adchoice=$_SESSION["whadchoice"];
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
$wh_adtag="batefuel";
|
||
|
|
$wh_adchoice=1;
|
||
|
|
if($wh_adtag=="batefuel")
|
||
|
|
{
|
||
|
|
//$adchoice=3;
|
||
|
|
if($wh_adchoice==1)
|
||
|
|
{
|
||
|
|
//Club Amateur USA
|
||
|
|
$bw_whad='<a href="http://signup.clubamateurusa.com/track/OTQ2OC4xLjMuMy4wLjAuMC4wLjA" target="_blank" onclick=""><img src="https://www.thebatorblog.com/images/club-amateur-200x200.jpg" width="200" height="200" alt="Club Amateur One Batefuel" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Gayhoopla
|
||
|
|
$bw_whad='<a href="http://join.gayhoopla.com/track/MjQ4NzU1MC4xLjEuMS4wLjAuMC4wLjA" target="_blank" onclick=""><img src="/images/footer/gayhoopla_200x300.jpg" width="200" height="300" alt="Gayhoopla Two Batefuel" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
}
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//3D Boyfriends
|
||
|
|
$bw_whad='<a href="http://www.3dboyfriends.com/?t=403348,2,11,0" target="_blank" onclick=""><img src="/images/footer/3dboyfriends_200x167.jpg" width="200" height="167" alt="3D Boyfriends" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Spunk Worthy
|
||
|
|
$bw_whad='<a href="http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=940009-0000&PA=2511149" target="_blank" onclick=""><img src="/images/footer/spunkworthy_200x203.jpg" width="200" height="203" alt="Spunk Worthy" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Straight Guys For Gay Eyes
|
||
|
|
$bw_whad='<a href="http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=917833-0000&PA=2387773&html=http://tour.sg4ge.com/tour/" target="_blank" onclick=""><img src="/images/footer/sgfge_200x219.jpg" width="200" height="219" alt="Straight Guys For Gay Eyes" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
//echo $bw_whad;
|
||
|
|
}
|
||
|
|
|
||
|
|
$wh_adtag="sex toys";
|
||
|
|
if($wh_adtag=="sex toys")
|
||
|
|
{
|
||
|
|
//$adchoice=1;
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Joe Gage Sex Files 23 Jack's New Job
|
||
|
|
$bw_whad='<a href="https://raydragonvideo.com/cart/product.php?productid=16757&bid=226&partner=2081" target="_blank" onclick=""><img src="/images/footer/SF23-jacksnewjob-200x283.jpg" width="200" height="283" alt="Jack%27s New Job" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//boyzshop penis pumps - till middle of may
|
||
|
|
$bw_whad='<a href="https://www.boyzshop.com/penis-pumps_62/?a=bateworld" target="_blank"><img src="/images/footer/boyzhop-pumps-200x188.jpg" width="200" height="188" alt="boyzshop penis pumps" /></a>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Fort Troff Nip Tuggers
|
||
|
|
$bw_whad='<div><a href="http://www.forttroff.com/product/62319.html?tap_a=5309-626e47&tap_s=38970-b5654f" target="_blank"><img src="/images/footer/ft-niptuggers-200x267.jpg" width="200" height="267" alt="FT Nip Tugger" style="display:block;"/></a></div><div><a class="jackbox" href="/images/footer/videos/ft_magno_nip_tuggers_paul_charles_iPhone.mp4" data-group="ftnip" data-autoplay="true" data-title="<a href=\'http://www.forttroff.com/product/62319.html?tap_a=5309-626e47&tap_s=38970-b5654f\' target=\'_blank\'>Nip Tuggers</a>" data-description="" style="text-decoration:none;" data-thumbnail=""><img src="/images/footer/ft-niptuggers-video_200x40_a.jpg" alt="FT Nip Tugger" width="200" height="40" style="diplay:block;"/></a></div>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
//Quick Extender Sale ends 05/10
|
||
|
|
$bw_whad='<div><a href="http://www.shareasale.com/r.cfm?u=560288&b=229032&m=27170&afftrack=&urllink=www%2Equickextenderpro%2Ecom%2Fbuy%2Dpenis%2Dextender" target="_blank"><img src="/images/footer/quick_extender_200x180.jpg" width="200" height="180" alt="Quick Extender Sale" style="display:block;"/></a></div><div><a class="jackbox" href="https://www.youtube.com/watch?v=pCWX3jdteRw" data-group="quickextender" data-autoplay="true" data-title="Quick Extender" data-description="" style="text-decoration:none;" data-thumbnail=""><img src="/images/footer/quick_extender_video_200x52.jpg" alt="Quick Extender Sale" width="200" height="52" style="diplay:block;"/></a></div>';
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
|
||
|
|
$bw_whad='<a href="https://www.stockroom.com/sale/masturbation-month-week-3.html?acc=c9f0f895fb98ab9159f51fd0297e236d" target="_blank"><img src="/images/footer/stockroom-mm-200x148.jpg" width="200" height="148" alt="Stockroom Masturbation Month" /></a>';
|
||
|
|
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
if($wh_adchoice == 1)
|
||
|
|
{
|
||
|
|
|
||
|
|
$bw_whad='<a href="http://www.forttroff.com/nl/store-2017-06-01/73840_FT_RAW_JIZZ_JACKET?tap_a=5309-626e47&tap_s=38970-b5654f" target="_blank"><img src="/images/footer/ft-jizzjacket_200x267.jpg" width="200" height="267" alt="Jizz Jacket" /></a>';
|
||
|
|
|
||
|
|
echo $bw_whad;
|
||
|
|
$wh_aid=0;
|
||
|
|
//include_once('/home/thebate/public_html/include/analytics/adviews.php');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//echo $bw_whad;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|