Chris-2k
05-27-2011, 03:49 PM
Hi,
im giving full credits to tangoforce as he's written this mod for me :-)
// 24 hr limit mod start.
//Get time and cal for last 24 hr time stamp
$Time = time();
$Day = (60*60*24);
$Time = ($Time - $Day);
$Site = mysql_real_escape_string($_POST['sname']);
//Lookup site and get its ID for next 2 queries
$Query_Site = "select * from wcddl_sites where name='$Site'";
$Result_Site = mysql_query($Query_Site);
$Row_Site = mysql_fetch_array($Result_Site);
//Get number of downloads already stored within last 24hrs
$Query_Downloads = "select * from wcddl_downloads where sid='$Row_Site[id]' and dat > '$Time'";
$Result_Downloads = mysql_query($Query_Downloads);
$Count_Downloads = mysql_num_rows($Result_Downloads);
//Get number of downloads in queue
$Query_Queue = "select * from wcddl_queue where sid='$Row_Site[id]'";
$Result_Queue = mysql_query($Query_Queue);
if (!$Count_Queue = mysql_num_rows($Result_Queue))
{
//If nothing in queue and mysql_num_rows returns false, set to 0
$Count_Queue = 0;
}
//Get total count of everything submitted in last 24 hrs (inc queued items that have been submitted anytime)
$Total_Count = ($Count_Queue + $Count_Downloads + $Count_Downloads);
for($i=0; $i < count($titles); $i++) {//Loiop through download fields
//Non submitted fields still set due to dropdown menu
can any 1 help me on displaying tha time since lats submissions..
im giving full credits to tangoforce as he's written this mod for me :-)
// 24 hr limit mod start.
//Get time and cal for last 24 hr time stamp
$Time = time();
$Day = (60*60*24);
$Time = ($Time - $Day);
$Site = mysql_real_escape_string($_POST['sname']);
//Lookup site and get its ID for next 2 queries
$Query_Site = "select * from wcddl_sites where name='$Site'";
$Result_Site = mysql_query($Query_Site);
$Row_Site = mysql_fetch_array($Result_Site);
//Get number of downloads already stored within last 24hrs
$Query_Downloads = "select * from wcddl_downloads where sid='$Row_Site[id]' and dat > '$Time'";
$Result_Downloads = mysql_query($Query_Downloads);
$Count_Downloads = mysql_num_rows($Result_Downloads);
//Get number of downloads in queue
$Query_Queue = "select * from wcddl_queue where sid='$Row_Site[id]'";
$Result_Queue = mysql_query($Query_Queue);
if (!$Count_Queue = mysql_num_rows($Result_Queue))
{
//If nothing in queue and mysql_num_rows returns false, set to 0
$Count_Queue = 0;
}
//Get total count of everything submitted in last 24 hrs (inc queued items that have been submitted anytime)
$Total_Count = ($Count_Queue + $Count_Downloads + $Count_Downloads);
for($i=0; $i < count($titles); $i++) {//Loiop through download fields
//Non submitted fields still set due to dropdown menu
can any 1 help me on displaying tha time since lats submissions..