Ignore:
Timestamp:
May 5, 2019, 5:17:06 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Application made using classes System and Application.
  • Modified: Used Common package for better code reuse.
  • Modified: Application made modular. Web sections converted to application modules. They will register pages in main application object.
Location:
trunk/Modules
Files:
2 added
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Meet/Meet.php

    r36 r37  
    11<?php
    22
    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');
     3include_once(dirname(__FILE__).'/Import/Seznamka.php');
     4include_once(dirname(__FILE__).'/Import/TanecniSkola.php');
     5include_once(dirname(__FILE__).'/Import/AstraPraha.php');
     6include_once(dirname(__FILE__).'/Import/Vavruska.php');
     7include_once(dirname(__FILE__).'/Import/SalsaDance.php');
     8include_once(dirname(__FILE__).'/Import/Amblar.php');
     9include_once(dirname(__FILE__).'/Import/MajkluvSvet.php');
     10include_once(dirname(__FILE__).'/Import/Csts.php');
     11include_once(dirname(__FILE__).'/Import/Facebook.php');
     12include_once(dirname(__FILE__).'/Import/Eso.php');
    1313
    1414abstract class Gender
     
    3737  $Parts = explode(' ', $DateTime);
    3838  $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);
    4144  $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]);
    4245  return($Result);
     
    277280  function Parse($Id = null)
    278281  {
     282    $Output = '';
    279283    if (($Id != null) and is_numeric($Id)) $Where = 'Id='.$Id;
    280284      else $Where = '1';
     
    294298      else if ($Method == 'eso') $Source = new MeetSourceEso();
    295299      else {
    296         echo('Unsupported parse method: '.$Method.'<br/>');
     300        $Output .= 'Unsupported parse method: '.$Method.'<br/>';
    297301        continue;
    298302      }
     
    303307      $Source->Name = $DbRow['Name'];
    304308      $this->Items[] = $Source;
    305       $Source->Import();
     309      $Output .= $Source->Import();
    306310    }
     311    return $Output;
    307312  }
    308313}
     
    319324  {
    320325    $this->AddedCount = 0;
    321     echo('Parsing '.$this->Name.' ('.$this->Id.')...</br>');
     326    $Output = 'Parsing '.$this->Name.' ('.$this->Id.')...</br>';
     327    return $Output;
    322328  }
    323329}
     
    347353      '(`Message` = "'.$this->Database->real_escape_string($this->Message).'") AND '.
    348354      '(`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)).'")');
    350356    if ($DbResult->num_rows == 0)
    351357    {
Note: See TracChangeset for help on using the changeset viewer.