| version 1.15, 2017/09/19 02:20:11 |
version 1.16, 2017/09/23 00:53:31 |
|
|
| * 2017-09-12 - implemented new SK-NIC-EPP/CentralNic export |
* 2017-09-12 - implemented new SK-NIC-EPP/CentralNic export |
| */ |
*/ |
| |
|
| /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.14 2017/09/18 07:16:58 nepto Exp $ */ |
/* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.15 2017/09/19 02:20:11 nepto Exp $ */ |
| |
|
| require_once 'DB.php'; |
require_once 'DB.php'; |
| |
|
|
|
| $query = 'SELECT COUNT(*) FROM '.$this->table_import; |
$query = 'SELECT COUNT(*) FROM '.$this->table_import; |
| $count = $this->_db->getOne($query); |
$count = $this->_db->getOne($query); |
| DB::isError($count) && $this->error($count); |
DB::isError($count) && $this->error($count); |
| $min_count = ($this->context == 'domains') ? 100000 : 1000; |
$min_count = ($this->context == 'domain') ? 100000 : 1000; |
| $max_count = ($this->context == 'domains') ? 900000 : 9000; |
$max_count = ($this->context == 'domain') ? 900000 : 9000; |
| if ($count < $min_count) { |
if ($count < $min_count) { |
| die(sprintf("%s() ERROR: too less imported records: %d (must be min %d)\n", |
die(sprintf("%s() ERROR: too less imported records: %d (must be min %d)\n", |
| __FUNCTION__, $count, $min_count)); |
__FUNCTION__, $count, $min_count)); |
|
|
| |
|
| function _writeImportWithLoadData($filename, $changed_date) /* {{{ */ |
function _writeImportWithLoadData($filename, $changed_date) /* {{{ */ |
| { |
{ |
| if ($this->context == 'domains') { |
if ($this->context == 'domain') { |
| $query = sprintf('LOAD DATA LOCAL INFILE %s' |
$query = sprintf('LOAD DATA LOCAL INFILE %s' |
| .' INTO TABLE %s' |
.' INTO TABLE %s' |
| .' CHARACTER SET UTF8' |
.' CHARACTER SET UTF8' |