| version 1.8, 2015/08/27 03:28:37 |
version 1.9, 2015/08/27 06:16:21 |
|
|
| * |
* |
| */ |
*/ |
| |
|
| /* $Platon: scripts/php/sk-nic/sk-nic.php,v 1.7 2015/08/27 03:10:08 nepto Exp $ */ |
/* $Platon: scripts/php/sk-nic/sk-nic.php,v 1.8 2015/08/27 03:28:37 nepto Exp $ */ |
| |
|
| |
|
| error_reporting(E_ALL); |
error_reporting(E_ALL); |
| Line 41 require_once dirname(__FILE__).'/SK-NIC. |
|
| Line 41 require_once dirname(__FILE__).'/SK-NIC. |
|
| # http://www.php.net/manual/en/mysql.constants.php |
# http://www.php.net/manual/en/mysql.constants.php |
| $dsn .= '?client_flags=128'; |
$dsn .= '?client_flags=128'; |
| $sk_nic = new SK_NIC($dsn); |
$sk_nic = new SK_NIC($dsn); |
| if ($sk_nic->doImport($filename)) { |
if (! $sk_nic->doImport($filename)) { |
| $sk_nic->checkImport(); |
fprintf(STDERR, "ERROR: imported file is too old; already imported?\n"); |
| $sk_nic->writeStats(); |
exit(1); |
| $changed_records = $sk_nic->doComparison(); |
} |
| if ($changed_records <= 100) { |
|
| printf('WARNING: too less changed records: %d'."\n", $changed_records); |
$sk_nic->checkImport(); |
| } elseif ($changed_records >= 50000) { |
$sk_nic->writeStats(); |
| printf('WARNING: too many changed records: %d'."\n", $changed_records); |
$changed_records = $sk_nic->doComparison(); |
| } |
if ($changed_records <= 100) { |
| } else { |
fprintf(STDERR, 'WARNING: too less changed records: %d'."\n", $changed_records); |
| die("Imported file is too old; it was probably already imported\n"); |
} elseif ($changed_records >= 50000) { |
| |
fprintf(STDERR, 'WARNING: too many changed records: %d'."\n", $changed_records); |
| } |
} |
| |
|
| /* Modeline for ViM {{{ |
/* Modeline for ViM {{{ |