Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 19. október 2026

Rozdiely pre scripts/php/sk-nic/SK-NIC.php medzi verziami 1.2 a 1.3

verzia 1.2, 2007/03/11 03:54:40 verzia 1.3, 2007/03/12 03:50:10
Riadok 13 
Riadok 13 
  *   *
  */   */
   
 /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.1 2007-03-11 03:49:48 nepto Exp $ */  /* $Platon: scripts/php/sk-nic/SK-NIC.php,v 1.2 2007-03-11 03:54:40 nepto Exp $ */
   
 require_once 'DB.php';  require_once 'DB.php';
   
 class SK_NIC  class SK_NIC
 {  {
           var $input_dt_format_sql = '%d.%m.%Y';
         var $_dsn  = null;          var $_dsn  = null;
         var $_db   = null;          var $_db   = null;
   
Riadok 80  class SK_NIC
Riadok 81  class SK_NIC
                         $changed_date = $this->_getChangedDateFromFilename($filename);                          $changed_date = $this->_getChangedDateFromFilename($filename);
                 }                  }
                 $this->_cleanImport();                  $this->_cleanImport();
                 $this->_writeImport($filename, $changed_date);                  $this->_writeImportWithLoadData($filename, $changed_date);
         } /* }}} */          } /* }}} */
   
         function _cleanImport() /* {{{ */          function _cleanImport() /* {{{ */
Riadok 89  class SK_NIC
Riadok 90  class SK_NIC
                 DB::isError($result) && $this->error($result);                  DB::isError($result) && $this->error($result);
         } /* }}} */          } /* }}} */
   
         function _writeImport($filename, $changed_date) /* {{{ */          function _writeImportWithInserts($filename, $changed_date) /* {{{ */
         {          {
                 if (($f = fopen($filename, 'r')) == false) {                  if (($f = fopen($filename, 'r')) == false) {
                         $this->error('unable to open: '.$filename);                          $this->error('unable to open: '.$filename);
Riadok 128  class SK_NIC
Riadok 129  class SK_NIC
                 fclose($f);                  fclose($f);
         } /* }}} */          } /* }}} */
   
           function _writeImportWithLoadData($filename, $changed_date) /* {{{ */
           {
                   $query = sprintf('load data local infile %s'
                                   .' into table sknic_domains_import'
                                   .' fields terminated by ";"'
                                   .' ignore 11 lines'
                                   .' (domain,id_reg,id_owner,flag,status,ns1,ns2,ns3,ns4,ico_owner,@dt_valid)'
                                   .' SET dt_valid = STR_TO_DATE(@dt_valid, %s), dt_changed = %s',
                                   $this->_db->quote($filename),
                                   $this->_db->quote($this->input_dt_format_sql),
                                   $this->_db->quote($changed_date));
                   $result = $this->_db->query($query);
                   DB::isError($result) && $this->error($result);
           } /* }}} */
   
         function _writeDomainHistory($rec, $deleted = 0) /* {{{ */          function _writeDomainHistory($rec, $deleted = 0) /* {{{ */
         {          {
                 static $dt_deleted = null;                  static $dt_deleted = null;

Legend:
Odstranené z verzie1.2  
zmenené riadky
  Pridané vo verzii1.3

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok