questa è la funzione
Codice PHP:
function i_index_site() {
// Indexes the site & writes it to file.
if (!isset($GLOBALS[s])) {
echo "
<div align=\"center\">
<h4>You have selected to index your site.</h4>
You can index your site using meta tag \"keywords\" or you can perform a \"full\" index.
Which action do you wish to perform?
<table border=\"0\"><tr>
<td align=\"center\"><form method=\"post\"><input type=\"hidden\" name=\"index\"><input type=\"hidden\" name=\"action\" value=\"index_site\"><input type=\"hidden\" name=\"s\" value=\"submit_meta\"><input type=\"hidden\" name=\"username\" value=\"$GLOBALS[username]\"><input type=\"hidden\" name=\"password\" value=\"$GLOBALS[password]\"><input type=\"submit\" value=\"Meta Tag Index\"></form></td>
<td align=\"center\"><form method=\"post\"><input type=\"hidden\" name=\"index\"><input type=\"hidden\" name=\"action\" value=\"index_site\"><input type=\"hidden\" name=\"s\" value=\"submit_full\"><input type=\"hidden\" name=\"username\" value=\"$GLOBALS[username]\"><input type=\"hidden\" name=\"password\" value=\"$GLOBALS[password]\"><input type=\"submit\" value=\"Full Index\"></form></td>
</tr></table></div>";
}
else {
if (is_dir($GLOBALS[file_root])) {
$file_array = i_get_files($GLOBALS[file_root]);
$file_array = i_strip_extentions($file_array);
$file_array = i_strip_files($file_array);
if(is_array($file_array)) {
set_time_limit(0);
$fd = @fopen($GLOBALS[index_file], "w") or die("<h3 align=\"center\">$GLOBALS[err_index]</h3>");
foreach ($file_array as $file) {
if (($GLOBALS[s] == "submit_full") || (substr($file, -3) == "txt")) $line = i_full_index_file($file);
elseif ($GLOBALS[s] == "submit_meta")$line = i_meta_index_file($file);
if (substr_count($line, "|") > 1) fputs($fd, "$line\n");
}
fclose($fd);
echo "<h3 align=\"center\">$GLOBALS[index_complete]</h3>";
}
else {
echo "<h3 align=\"center\">$GLOBALS[no_files]</h3>";
}
}
else {
echo "<h3 align=\"center\">$GLOBALS[no_dir]</h3>";
}
}
}
può essere un problema di variabili GLOBALI?
dies