Changeset 542
- Timestamp:
- Jun 2, 2013, 9:14:50 PM (11 years ago)
- Location:
- trunk/Modules
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/News/ImportKinoVatra.php
r533 r542 27 27 $Date = TimeToMysqlDateTime(strtotime($Date)); 28 28 29 $Query = 'SELECT Id FROM News WHERE (`Title`="'.$ Database->real_escape_string($Title).'") AND (`Category`='.$Category.') AND (`Content` = "'.$Database->real_escape_string($Description).'") AND (`Link` = "'.$Database->real_escape_string($Link).'")';30 $DbResult = $ Database->query($Query);29 $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).'")'; 30 $DbResult = $System->Database->query($Query); 31 31 if($DbResult->num_rows == 0) 32 32 { 33 $ Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));34 echo($ Database->insert_id.',');33 $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 34 echo($System->Database->insert_id.','); 35 35 } 36 36 } -
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 } -
trunk/Modules/News/ImportTvBeskyd.php
r533 r542 31 31 //echo('Link: '.$Link.'<br><hr>'); 32 32 33 $DbResult = $ Database->select('News', 'Id', '`Title`="'.$Database->real_escape_string($Title).'" AND `Category`='.$Category);34 //echo($ Database->LastQuery);33 $DbResult = $System->Database->select('News', 'Id', '`Title`="'.$System->Database->real_escape_string($Title).'" AND `Category`='.$Category); 34 //echo($System->Database->LastQuery); 35 35 if($DbResult->num_rows == 0) 36 36 { 37 $ Database->insert('News', array('Title' => $Title, 'Date' => 'NOW()', 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));38 echo($ Database->insert_id.',');37 $System->Database->insert('News', array('Title' => $Title, 'Date' => 'NOW()', 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 38 echo($System->Database->insert_id.','); 39 39 } 40 40 } -
trunk/Modules/News/ImportZdechovCzNews.php
r533 r542 35 35 */ 36 36 37 $DbResult = $ Database->select('News', 'Id', '`Title`="'.$Database->real_escape_string($Title).'" AND `Date`="'.$Date.'" AND `Category`='.$Category);38 //echo($ Database->LastQuery);37 $DbResult = $System->Database->select('News', 'Id', '`Title`="'.$System->Database->real_escape_string($Title).'" AND `Date`="'.$Date.'" AND `Category`='.$Category); 38 //echo($System->Database->LastQuery); 39 39 if($DbResult->num_rows == 0) 40 40 { 41 $ Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));42 echo($ Database->insert_id.',');41 $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 42 echo($System->Database->insert_id.','); 43 43 } 44 44 } -
trunk/Modules/News/ImportZdechovCzRecords.php
r533 r542 35 35 */ 36 36 37 $DbResult = $ Database->select('News', 'Id', '`Title`="'.$Database->real_escape_string($Title).'" AND `Date`="'.$Date.'" AND `Category`='.$Category);38 //echo($ Database->LastQuery);37 $DbResult = $System->Database->select('News', 'Id', '`Title`="'.$System->Database->real_escape_string($Title).'" AND `Date`="'.$Date.'" AND `Category`='.$Category); 38 //echo($System->Database->LastQuery); 39 39 if($DbResult->num_rows == 0) 40 40 { 41 $ Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link));42 echo($ Database->insert_id.',');41 $System->Database->insert('News', array('Title' => $Title, 'Date' => $Date, 'Author' => $Author, 'Category' => $Category, 'Content' => $Description, 'Link' => $Link)); 42 echo($System->Database->insert_id.','); 43 43 } 44 44 } -
trunk/Modules/Search/Search.php
r541 r542 23 23 foreach($this->System->ModuleManager->Modules['Search']->Items as $Item) 24 24 { 25 $Output .= '<strong>'.$Item['Name'].'</strong><br/>';26 25 $Columns = ''; 27 26 $Condition = ''; … … 35 34 $DbResult = $this->Database->Select($Item['Table'], $Columns, $Condition.' LIMIT '. 36 35 $this->System->ModuleManager->Modules['Search']->MaxItemCount); 37 echo($this->Database->LastQuery);36 if($DbResult->num_rows > 0) $Output .= '<strong>'.$Item['Name'].'</strong><br/>'; 38 37 while($Row = $DbResult->fetch_assoc()) 39 38 {
Note:
See TracChangeset
for help on using the changeset viewer.