Help with collecting data from database and printing it
Code: Select all
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>Code: Select all
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MBCode: Select all
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MBCode: Select all
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>Code: Select all
Files 0
Downloads
Size 0,00 MB
Traffic 0,00]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "e;SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>"e;;
$content .= "e;</table>"e;;
?>
[/php:1:bb40cces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads"e;;
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>"e;;
$content .= "e;</table>"e;;
?>
[/php]
And this is the output:
[code:1:bDon't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= &I am doing wrong. When I use this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
TrafI am doing wrong. When I use this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr>&am;filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?adscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;&p]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>&qump;lt;?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td>&amutput is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr&to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5e, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr>&among. When I use this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "&laccess to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Anloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?downs;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?tion is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>"e;;
$content .= "e;</table>"e;;
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>"e;;
$content .= "e;&= $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",","."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr>&I am doing wrong. When I use this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$conteuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Trafe( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?e this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code:1:bb40ebc;
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong> location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>"e;;
$content .= "e;</table>"e;;
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downlo;
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $rowї$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>"e;;
$content .= "e;<tr><td><strong>Traffic</strong></td><td align=r filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,"e;,"e;,"e;."e;);
$gtransfer = number_format($gtransfer / 1048576,2,"e;,"e;,"e;."e;);
$content .= "e;<table border=0 cellspacing=0 cellpadding=1 width=100%>"e;;
$content .= "e;<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>"e;;
$content .= "e;<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>"e;;
$content .= "e;<tr><td><strong>Size</strong></td><td alamp;lt;?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB
[/code]
Any ideas for my problem?g. When I use this the output is 0 for everything.
[php]
<?
# Don't allow direct acces to the file
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
# Make sure you have access to core functions
global $database;
# Database Query
$query = "SELECT filesize, downloads FROM #_downloads";
$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $row[$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtransfer = $gtransfer + $dltransfer;
# Downloadscounter
$gdowns = $gdowns + $dldowns;
# Filebasesizecounter
$gsize = $gsize + $dlsize;
}
# Print the information onto the screen.
$gsize = number_format($gsize / 1048576,2,",",".");
$gtransfer = number_format($gtransfer / 1048576,2,",",".");
$content .= "<table border=0 cellspacing=0 cellpadding=1 width=100%>";
$content .= "<tr><td><strong>Files</strong></td><td align=right>$gcounter</td><tr>";
$content .= "<tr><td><strong>Downloads</strong></td><td align=right>$gdowns</td><tr>";
$content .= "<tr><td><strong>Size</strong></td><td align=right>$gsize MB</td><tr>";
$content .= "<tr><td><strong>Traffic</strong></td><td align=right>$gtransfer MB</td><tr>";
$content .= "</table>";
?>
[/php]
And this is the output:
[code]
Files 0
Downloads
Size 0,00 MB
Traffic 0,00 MB
[/code]
This is what the output should be (now):
[code]
Files 1
Downloads 5
Size 0,00 MB
Traffic 0,00 MB$database->setQuery($query);
# Set up the counters
$rownum = 0;
while($rows = $database->loadObjectList())
{
$rownum++;
$dlsize = $row[$rownum]->filesize;
$dldowns = $rowї$rownum]->downloads;
# Filecounter
$gcounter++;
# Trafficcounter
$dltransfer = $dlsize * $dldowns;
$gtr