Ignore:
Timestamp:
Sep 7, 2014, 6:15:54 PM (10 years ago)
Author:
chronos
Message:
  • Opraveno: Zobrazení stavu placení u Subjektů v ISu.
  • Přidáno: Výchozí řazení u fronty emailů podle času.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/News/ImportObecHovezi.php

    r635 r689  
    1515
    1616$doc = new DOMDocument();
    17 $doc->load($SourceURL);
    18 foreach($doc->getElementsByTagName('item') as $node) 
     17@$doc->load($SourceURL);
     18foreach($doc->getElementsByTagName('item') as $node)
    1919{
    2020  $Title = $node->getElementsByTagName('title')->item(0)->nodeValue;
    2121  $Description = $node->getElementsByTagName('description')->item(0)->nodeValue;
    22   $Link = $node->getElementsByTagName('link')->item(0)->nodeValue; 
     22  $Link = $node->getElementsByTagName('link')->item(0)->nodeValue;
    2323  $Date = $node->getElementsByTagName('pubDate')->item(0)->nodeValue;
    24  
     24
    2525  $Description = strip_tags($Description);
    2626  $Description = str_replace("\r", '', $Description);
     
    2929  //  $Date = substr($Date, $CommaPos + 1);
    3030  $Date = TimeToMysqlDateTime(strtotime($Date));
    31  
    32  
     31
     32
    3333  $DbResult = $System->Database->select('News', 'Id', '(`Title`="'.$System->Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$System->Database->real_escape_string($Description).'") AND (`Link` = "'.$System->Database->real_escape_string($Link).'")');
    3434  //echo($System->Database->LastQuery);
     
    5252  $Description = substr($Content, strpos($Content, $DescriptionSeparator) + strlen($DescriptionSeparator));
    5353  $Description = trim(substr($Description, 0, strpos($Description, '</')));
    54  
     54
    5555  $Content = substr($Content, strpos($Content, $StartLink) + strlen($StartLink));
    5656  $Link = substr($Content, 0, strpos($Content, '<'));
     
    6262  //echo('Description: '.$Description.'<br>');
    6363  //echo('Link: '.$Link.'<br><hr>');
    64  
     64
    6565  $Link = $System->Database->real_escape_string($Link);
    6666  $Title = $System->Database->real_escape_string($Title);
    6767  $Description = strip_cdata($Description);
    6868  $Description = strip_tags($Description);
    69  
     69
    7070  $Description = str_replace("\n", '<br>', $Description);
    7171  $Description = str_replace("\r", '', $Description);
    7272  $Description = $System->Database->real_escape_string($Description);
    73  
     73
    7474  $DbResult = $System->Database->select('News', 'Id', '(`Title`="'.$Title.'") AND (`Category`='.$Category.') AND (`Content` = "'.$Description.'") AND (`Link` = "'.$Link.'")');
    7575  //echo($System->Database->LastQuery);
     
    7979    echo($System->Database->insert_id.',');
    8080  }
    81 } 
     81}
    8282*/
Note: See TracChangeset for help on using the changeset viewer.