$citizens = new Citizen(); set_time_limit(0); if (empty($_REQUEST["update"])) { $citizens->GoldenExpunge(); $update = 0; } else { $update = $_REQUEST["update"]; } $row = 0; $handle = fopen("data/golden.csv", "r"); if ($handle == FALSE) { $row = -999; } else { while (($data = fgetcsv($handle, 800, ",")) !== FALSE) { if ($row) { $citizens->GoldenRecordLoad($data); } $row++; } fclose($handle); } $gBitSmarty->assign('golden', $row); $row = 0; $handle = fopen("data/xref.csv", "r"); if ($handle == FALSE) { $row = -999; } else { while (($data = fgetcsv($handle, 4000, ",")) !== FALSE) { if ($row) { $citizens->GoldenXrefRecordLoad($data); }