Possible file upload attack
";
return;
}
$file = $_FILES['bots_list']['tmp_name'];
$lines = file($file);
if (trim($lines[0]) != '# FireStats bots list')
{
echo "
".fs_r('Incorrect file format')."";
echo "
Back";
}
else
{
require_once(dirname(__FILE__).'/db-sql.php');
$ok = true;
$type = $_POST['import_type'];
$remove_existing = $type == 'replace';
$res = fs_botlist_import_array($lines, $remove_existing);
if ($res != '')
{
echo "
".sprintf(fs_r('Error importing bots list : %s'),$res)."";
echo "
Back";
}
else
{
echo fs_r("bots list imported successfully")."
";
// update botlist and num excluded
?>