PDA

View Full Version : Number of sites locked/being spidered


CentaurAtlas
12-09-2006, 03:38 AM
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";