Changeset 738 for trunk/Modules/News/ImportKinoVatra.php
- Timestamp:
- Apr 14, 2015, 10:20:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportKinoVatra.php
r622 r738 16 16 $doc = new DOMDocument(); 17 17 $doc->load($SourceURL); 18 foreach($doc->getElementsByTagName('item') as $node) 18 foreach($doc->getElementsByTagName('item') as $node) 19 19 { 20 20 $Title = $node->getElementsByTagName('title')->item(0)->nodeValue; 21 21 $Description = $node->getElementsByTagName('description')->item(0)->nodeValue; 22 $Link = $node->getElementsByTagName('link')->item(0)->nodeValue; 22 $Link = $node->getElementsByTagName('link')->item(0)->nodeValue; 23 23 $Date = $node->getElementsByTagName('pubDate')->item(0)->nodeValue; 24 24 25 25 $Description = strip_tags($Description); 26 26 $Description = str_replace("\r", '', $Description); … … 29 29 // $Date = substr($Date, $CommaPos + 1); 30 30 $Date = TimeToMysqlDateTime(strtotime($Date)); 31 31 32 32 $Query = 'SELECT Id FROM News WHERE (`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).'")'; 33 33 $DbResult = $System->Database->query($Query);
Note:
See TracChangeset
for help on using the changeset viewer.