PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Submissions (http://www.phpdig.net/forum/forumdisplay.php?f=24)
-   -   Number of sites locked/being spidered (http://www.phpdig.net/forum/showthread.php?t=2711)

CentaurAtlas 12-09-2006 02:38 AM

Number of sites locked/being spidered
 
If you want to add the number of sites that are locked/being spidered to the admin page, open the admin/index.php file and do the following (1.8.8). ;-)

Look for these lines:
while (list($table,$name) = each($phpdig_tables))
{
$result = mysql_fetch_array(mysql_query("SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."$table"),MYSQL_ASSOC);
print "<tr>\n\t<td class=\"greyFormLight\">\n$name : </td>\n\t<td class=\"greyForm\">\n<b>".$result['num']."</b>".phpdigMsg('entries')."</td>\n</tr>\n";
}
print "</table>\n";

--------------------

Before the print "</table>\n"; line, insert the following:


$SQL = "select locked from phpdig_sites where locked = 1";

$result = mysql_query($SQL);
if (!$result) {
die('Invalid query (how many locked/being crawled): ' . mysql_error());
}

$num_rows = mysql_num_rows($result);
print "<tr><td class=\"greyFormLight\">";
print "Number of sites are locked:";
print "</td> \n";
print "<td class=\"greyForm\">";
print $num_rows;
print "\n";

print "</td>";
print "</tr> \n";


All times are GMT -8. The time now is 07:31 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.