Changeset 37 for trunk/Modules/Meet/Meet.php
- Timestamp:
- May 5, 2019, 5:17:06 PM (6 years ago)
- Location:
- trunk/Modules
- Files:
-
- 2 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Meet/Meet.php
r36 r37 1 1 <?php 2 2 3 include_once( 'Import/Seznamka.php');4 include_once( 'Import/TanecniSkola.php');5 include_once( 'Import/AstraPraha.php');6 include_once( 'Import/Vavruska.php');7 include_once( 'Import/SalsaDance.php');8 include_once( 'Import/Amblar.php');9 include_once( 'Import/MajkluvSvet.php');10 include_once( 'Import/Csts.php');11 include_once( 'Import/Facebook.php');12 include_once( 'Import/Eso.php');3 include_once(dirname(__FILE__).'/Import/Seznamka.php'); 4 include_once(dirname(__FILE__).'/Import/TanecniSkola.php'); 5 include_once(dirname(__FILE__).'/Import/AstraPraha.php'); 6 include_once(dirname(__FILE__).'/Import/Vavruska.php'); 7 include_once(dirname(__FILE__).'/Import/SalsaDance.php'); 8 include_once(dirname(__FILE__).'/Import/Amblar.php'); 9 include_once(dirname(__FILE__).'/Import/MajkluvSvet.php'); 10 include_once(dirname(__FILE__).'/Import/Csts.php'); 11 include_once(dirname(__FILE__).'/Import/Facebook.php'); 12 include_once(dirname(__FILE__).'/Import/Eso.php'); 13 13 14 14 abstract class Gender … … 37 37 $Parts = explode(' ', $DateTime); 38 38 $DateParts = explode('.', $Parts[0]); 39 if (count($Parts) > 1) $TimeParts = explode(':', $Parts[1]); 40 else $TimeParts = array(0, 0, 0); 39 if (count($Parts) > 1) { 40 $TimeParts = explode(':', $Parts[1]); 41 if (count($TimeParts) == 1) $TimeParts[1] = '0'; 42 if (count($TimeParts) == 2) $TimeParts[2] = '0'; 43 } else $TimeParts = array(0, 0, 0); 41 44 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]); 42 45 return($Result); … … 277 280 function Parse($Id = null) 278 281 { 282 $Output = ''; 279 283 if (($Id != null) and is_numeric($Id)) $Where = 'Id='.$Id; 280 284 else $Where = '1'; … … 294 298 else if ($Method == 'eso') $Source = new MeetSourceEso(); 295 299 else { 296 echo('Unsupported parse method: '.$Method.'<br/>');300 $Output .= 'Unsupported parse method: '.$Method.'<br/>'; 297 301 continue; 298 302 } … … 303 307 $Source->Name = $DbRow['Name']; 304 308 $this->Items[] = $Source; 305 $ Source->Import();309 $Output .= $Source->Import(); 306 310 } 311 return $Output; 307 312 } 308 313 } … … 319 324 { 320 325 $this->AddedCount = 0; 321 echo('Parsing '.$this->Name.' ('.$this->Id.')...</br>'); 326 $Output = 'Parsing '.$this->Name.' ('.$this->Id.')...</br>'; 327 return $Output; 322 328 } 323 329 } … … 347 353 '(`Message` = "'.$this->Database->real_escape_string($this->Message).'") AND '. 348 354 '(`Email` = "'.$this->Database->real_escape_string($this->Email).'") AND '. 349 '( DATE(`Time`) = "'.$this->Database->real_escape_string(TimeToMysqlDate($this->Time)).'")');355 '(`Time` = "'.$this->Database->real_escape_string(TimeToMysqlDateTime($this->Time)).'")'); 350 356 if ($DbResult->num_rows == 0) 351 357 {
Note:
See TracChangeset
for help on using the changeset viewer.