Empty commit

This commit is contained in:
Git 2011-09-14 08:00:13 +00:00
parent 9725ab2dfa
commit 360020482b
2 changed files with 12 additions and 6 deletions

View File

@ -33,6 +33,12 @@
}
}
if (substr($_REQUEST['action'],0,12) == 'update_geoip' && !isset($argv[1])) {
if (!check_perms('site_debug')) {
error(403);
}
}
include(SERVER_ROOT."/classes/class_validate.php");
$Val=NEW VALIDATE;

View File

@ -2,16 +2,16 @@
ini_set('memory_limit', -1);
set_time_limit(0);
if (!check_perms('site_debug')) { error(403); }
//if (!check_perms('site_debug')) { error(403); }
show_header();
//requires wget, unzip commands to be installed
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'02.zip');
shell_exec('unzip GeoLiteCity_'.date('Ym').'02.zip');
shell_exec('rm GeoLiteCity_'.date('Ym').'02.zip');
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'06.zip');
shell_exec('unzip GeoLiteCity_'.date('Ym').'06.zip');
shell_exec('rm GeoLiteCity_'.date('Ym').'06.zip');
if(($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
if(($Locations = file("GeoLiteCity_".date('Ym')."06/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
error("Download or extraction of maxmind database failed");
}
array_shift($Locations);
@ -30,7 +30,7 @@
echo "There are ".count($CountryIDs)." CountryIDs";
echo "<br />";
if(($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
if(($Blocks = file("GeoLiteCity_".date('Ym')."06/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
echo "Error";
}
array_shift($Blocks);