First off I’d like to say sorry for making so many topics I"m just creating my own admin panel and I really don’t know how to do a lot of things. So my question is how can I display the .deb version number of the package and show at least 10 downloaders instead of when someone downloads the package the current info gets replaced with the new info.
Here’s the download.php:
[php]<?PHP
include(“config.php”);
$result = mysql_query(“SELECT * FROM download ORDER BY dldate DESC”);
echo “”;
echo "";
while($row = mysql_fetch_array($result)) {
$trimed1 = str_replace(“downloads/”, “”, $row[filename]);
$trimed2 = str_replace(".deb", “”, $trimed1);
echo "
";}
echo “
Deb | Downloads | Last downloaded | IP | Device | Firmware | Agent |
---|---|---|---|---|---|---|
$trimed2 | $row[stats] | $row[dldate] | $row[ip] | $row[device] | $row[firmware] | $row[agent] |
?>[/php]
Here is the code I use to display the number of downloads:
[php]<?PHP
$path = $_SERVER[‘DOCUMENT_ROOT’];
$path .= “config.php”;
include_once($path);
$query = “SELECT stats FROM download WHERE filename = ‘downloads/adblockerplus.deb’”;
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
echo $row[0];
}
?>[/php]
Now I’m going for something like in the pictures that are attached.