Ignore:
Timestamp:
May 5, 2019, 5:17:06 PM (5 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 edited
1 moved

Legend:

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

    r31 r37  
    55  function Import()
    66  {
    7     parent::Import();
     7    $Output = parent::Import();
    88    $Content = file_get_contents($this->URL);
    99
     
    1313    if ($Content == '')
    1414    {
    15       echo('Main block not isolated.</br>');
    16       return;
     15      $Output .= 'Main block not isolated.</br>';
     16      return $Output;
    1717    }
    1818
     
    2929      $MeetItem->Name = trim(GetTextBetween($Item, "<span class='seznamka_nadpis'><b>", '</b>'));
    3030      $MeetItem->Height = trim(GetTextBetween($Item, "výška:", 'cm'));
    31       $MeetItem->Age = trim(GetTextBetween($Item, "věk:", 'let'));
     31      $MeetItem->Age = preg_replace("/[^0-9]/", "", trim(GetTextBetween($Item, "věk:", 'let')));
    3232      $MeetItem->Message = trim(GetTextBetween($Item, "display:block;text-align:justify;'>", '</span>'));
    3333      $MeetItem->Weight = GetWeightFromText($MeetItem->Message);
     
    5050      $this->AddedCount += $MeetItem->AddIfNotExist();
    5151    }
     52    return $Output;
    5253  }
    5354}
Note: See TracChangeset for help on using the changeset viewer.