$this->get();
}
+ var $processed = 0;
+ var $total = 0;
+ var $echo = '';
+
function get()
{
{
ini_set("auto_detect_line_endings", true);
+
+
$fh = fopen($csv, 'r');
+
if (!$fh) {
$this->jerr("invalid location file");
}
$cols = false;
+ $this->processed = 0;
+ $this->total = count(file($csv));
+ $this->echo = '';
+
while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) {
if(!array_filter($n)){ // empty row
continue;
}
$this->processLocation($row);
+
+ $this->updateProcessBar();
}
}
function processLocation($row)
- {
+ {
$continent = $this->processContinent($row['CONTINENT_CODE'], $row['CONTINENT_NAME']);
$country = $this->processCountry($row['COUNTRY_ISO_CODE'], $row['COUNTRY_NAME'], $continent);