Changeset 542 for trunk/Modules/News/ImportObecHovezi.php
- Timestamp:
- Jun 2, 2013, 9:14:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportObecHovezi.php
r533 r542 28 28 29 29 30 $DbResult = $ Database->select('News', 'Id', '(`Title`="'.$Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$Database->real_escape_string($Description).'") AND (`Link` = "'.$Database->real_escape_string($Link).'")');31 //echo($ Database->LastQuery);30 $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).'")'); 31 //echo($System->Database->LastQuery); 32 32 if($DbResult->num_rows == 0) 33 33 { 34 $ Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));35 echo($ Database->insert_id.',');34 $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 35 echo($System->Database->insert_id.','); 36 36 } 37 37 } … … 59 59 //echo('Link: '.$Link.'<br><hr>'); 60 60 61 $Link = $ Database->real_escape_string($Link);62 $Title = $ Database->real_escape_string($Title);61 $Link = $System->Database->real_escape_string($Link); 62 $Title = $System->Database->real_escape_string($Title); 63 63 $Description = strip_cdata($Description); 64 64 $Description = strip_tags($Description); … … 66 66 $Description = str_replace("\n", '<br>', $Description); 67 67 $Description = str_replace("\r", '', $Description); 68 $Description = $ Database->real_escape_string($Description);68 $Description = $System->Database->real_escape_string($Description); 69 69 70 $DbResult = $ Database->select('News', 'Id', '(`Title`="'.$Title.'") AND (`Category`='.$Category.') AND (`Content` = "'.$Description.'") AND (`Link` = "'.$Link.'")');71 //echo($ Database->LastQuery);70 $DbResult = $System->Database->select('News', 'Id', '(`Title`="'.$Title.'") AND (`Category`='.$Category.') AND (`Content` = "'.$Description.'") AND (`Link` = "'.$Link.'")'); 71 //echo($System->Database->LastQuery); 72 72 if($DbResult->num_rows == 0) 73 73 { 74 $ Database->insert('News', array('Title' => $Title, 'Date' => 'NOW()', 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));75 echo($ Database->insert_id.',');74 $System->Database->insert('News', array('Title' => $Title, 'Date' => 'NOW()', 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 75 echo($System->Database->insert_id.','); 76 76 } 77 77 }
Note:
See TracChangeset
for help on using the changeset viewer.