adsense on download

All support enquiries for DFH go in here...

adsense on download

Postby pagan381 » Sun Apr 03, 2011 9:38 am

hi all

i see that we have a timer when peeps download and upload filess is there anyway that we could show ads while they wait for download / upload buttons to activate

kind regards

tony

admin
[URL REMOVED, NO SCRIPT FOUND ON URL}
pagan381
Newbie Member
 
Posts: 1
Joined: Tue Mar 15, 2011 8:05 pm

Re: adsense on download

Postby PeterS » Sun Apr 03, 2011 5:15 pm

pagan381 wrote:hi all

i see that we have a timer when peeps download and upload filess is there anyway that we could show ads while they wait for download / upload buttons to activate

kind regards

tony

admin
[URL REMOVED, NO SCRIPT FOUND ON URL}


Go to ./download.php add above/below the following piece of code.
Code: Select all
echo "<h1><center>Download Time Limit</center></h1>";
       ?><script type="text/javascript">

var running = false
var endTime = null
var timerID = null
var totalMinutes = <?php echo $counter;?>;

function startTimer() {
    running = true
    now = new Date()
    now = now.getTime()
    endTime = now + (1000 * totalMinutes);
    showCountDown()
}

function showCountDown() {
    var now = new Date()
    now = now.getTime()
    if (endTime - now <= 0) {
       clearTimeout(timerID)
       window.location.reload()

    } else {
        var delta = new Date(endTime - now)
        var theMin = delta.getMinutes()
        var theSec = delta.getSeconds()
        var theTime = theMin
        theTime += ((theSec < 10) ? ":0" : ":") + theSec
        document.getElementById('SessionTimeCount').innerHTML = 'Please wait ( <font color="#FF0000">' + theTime + '</font> ) Minutes for Download'
        if (running) {
            timerID = setTimeout("showCountDown()",1000)
        }
    }
}

window.onload=startTimer
</script>


<center><span id="SessionTimeCount"></span></center><br />
PeterS
Global Moderator
 
Posts: 159
Joined: Mon Feb 21, 2011 4:58 am


Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 5 guests

cron