XX Files:
Inside Download Server
i want it to get the number of files, from the download server my admin hosts, the download server has a file, which executes a code to grab the number of files entered into the database...
heres that code for that script...
Code: Select all
<?php
include 'includes/dbconfig.php';
include 'includes/opendb.php';
$result = mysql_query("SELECT * FROM files");
$num_rows = mysql_num_rows($result);
echo($num_rows);
include 'includes/closedb.php';
?>i know a bit about php, not the best coder, but i know a fair bit, but ive gotten close, on the portal, ive edited where it shows the stats, and ive included the link to the above script... but the problem is, it shows the number right up the top of the page, not where its ment to be(right side, near bottom), and where it is ment to display it, it has the number '1' there..heres the portal code from the file i edited...
Code: Select all
<?
$content = "";
$link_user = $mklib_board->forum_link("profile");
$counter = $this->config['counter'];
$countdownload = include 'www.urltothedownloadserver.com/filecount.php';
$stat = $mklib_board->get_site_stat();
$count_holder = sprintf ("%07d", "$counter");
$query = $DB->query("SELECT id FROM mkp_gallery");
$countgal = $DB->get_num_rows($query);
$query = $DB->query("SELECT id FROM mkp_blog");
$countblog = $DB->get_num_rows($query);
$query = $DB->query("SELECT id FROM mkp_topsite WHERE validate = '1'");
$countsite = $DB->get_num_rows($query);
$query = $DB->query("SELECT id FROM mkp_reviews");
$countrev = $DB->get_num_rows($query);
for ($n = 0; $n < strlen($count_holder); $n++) ($nbhits .= "<img src=\"$this->images/led/{$count_holder[$n]}.gif\" style=\"border: solid 1px #ffffff;\" alt=\"\" />");
$content = "
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">{$stat['total_posts']}</span> {$this->lang['posts']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$stat['topics']} {$this->lang['topics']}
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$stat['replies']} {$this->lang['replies']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countblog</span> {$this->lang['blog']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['user_created']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countgal</span> {$this->lang['images']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_gallery']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countdownload</span> {$this->lang['files']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_download']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countsite</span> {$this->lang['sites']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_topsite']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">$countrev</span> {$this->lang['reviews']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['in_reviews']}<br />
</td>
</tr>
<tr>
<td class=\"tdblock\">
<span class=\"mktxtcontr\">{$stat['members']}</span> {$this->lang['u_registered']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
{$this->lang['last']}: <a class=\"uno\" href=\"$link_user={$stat['last_member']}\">{$stat['last_member_name']}</a>
</td>
</tr>
<tr>
<td class=\"tdblock\">
{$this->lang['access_counter']}:
</td>
</tr>
<tr>
<td class=\"tdglobal\">
<center>$nbhits</center>
</td>
</tr>
";
unset($link_user);
unset($counter);
unset($stat);
unset($count_holder);
unset($query);
unset($countgal);
unset($countdown);
unset($countblog);
unset($countsite);
unset($countrev);
?>THanks Mark...