print $delay_message; } // clean the tempspider table $query = "DELETE FROM " . PHPDIG_DB_PREFIX . "tempspider WHERE site_id={$site_id} AND (error = 1 OR indexed = 1)"; mysql_query($query, $id_connect); // clean includes table if (LIMIT_TO_DIRECTORY) { $query = "DELETE FROM " . PHPDIG_DB_PREFIX . "includes WHERE in_site_id={$site_id}"; mysql_query($query, $id_connect); } // unlock site mysql_query('UPDATE ' . PHPDIG_DB_PREFIX . 'sites SET locked=0 WHERE site_id=' . $site_id, $id_connect); } } } phpdigFtpClose($ftp_id); print "Optimizing tables..." . $br; @mysql_query("OPTIMIZE TABLE " . PHPDIG_DB_PREFIX . "spider", $id_connect); @mysql_query("OPTIMIZE TABLE " . PHPDIG_DB_PREFIX . "engine", $id_connect); @mysql_query("OPTIMIZE TABLE " . PHPDIG_DB_PREFIX . "keywords", $id_connect); //display end of indexing phpdigPrnMsg('id_end'); if ($run_mode == 'http') { ?> <hr /> <a href="index.php?sid=<?php echo $sid; ?> " target="contentset">[<?php phpdigPrnMsg('back'); ?>
function phpdigFtpKeepAlive($ftp_id, $relative_script_path = false) { if (!$ftp_id) { return phpdigFtpConnect(); } elseif (!@ftp_pwd($ftp_id)) { phpdigFtpClose($ftp_id); return phpdigFtpConnect(); } else { @ftp_pasv($ftp_id, FTP_PASV); if ($relative_script_path) { phpdigWriteText($relative_script_path, 'keepalive', array('.'), $ftp_id); } return $ftp_id; } }