Changeset 23 for trunk


Ignore:
Timestamp:
Dec 26, 2018, 1:30:50 PM (6 years ago)
Author:
chronos
Message:
  • Added: Meet import for dancing school Eso.
  • Added: Not yet working code for import for facebook group page.
Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Meet.php

    r19 r23  
    99include_once('Import/MajkluvSvet.php');
    1010include_once('Import/Csts.php');
     11include_once('Import/Facebook.php');
     12include_once('Import/Eso.php');
    1113
    1214abstract class Gender
     
    3234{
    3335  if($DateTime == '') return(NULL);
     36  $DateTime = str_replace('. ', '.', $DateTime);
    3437  $Parts = explode(' ', $DateTime);
    3538  $DateParts = explode('.', $Parts[0]);
    36   $TimeParts = explode(':', $Parts[1]);
     39  if (count($Parts) > 1) $TimeParts = explode(':', $Parts[1]);
     40    else $TimeParts = array(0, 0, 0);
    3741  $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[0], $DateParts[2]);
    3842  return($Result);
     
    182186  $Text = strtolower($Text);
    183187  $Result = GetNumberBeforeText($Text, 'kg');
     188  if ($Result == '') $Result = GetNumberAfterText($Text, 'vážím');
    184189  if ($Result == '') $Result = GetAgeHeightWeightFromText($Text)[2];
    185190  return $Result;
     
    201206    {
    202207      $Result = explode('/', $Matches[0][0]);
     208      // If first number is over 100 then its probably height/weight
     209      if ($Result[0] > 100) $Result = array('', $Result[0], $Result[1]);
    203210      $Result[] = '';
    204211    }
     
    276283      else if ($Method == 'majkluvsvet') $Source = new MeetSourceMajkluvSvet();
    277284      else if ($Method == 'csts') $Source = new MeetSourceCsts();
     285      else if ($Method == 'facebook') $Source = new MeetSourceFacebook();
     286      else if ($Method == 'eso') $Source = new MeetSourceEso();
    278287      else {
    279288        echo('Unsupported parse method: '.$Method.'<br/>');
Note: See TracChangeset for help on using the changeset viewer.