Ignore:
Timestamp:
Sep 14, 2008, 6:16:04 PM (16 years ago)
Author:
george
Message:
  • Opraveno: ImportovacĂ­ skripty z webu zdechov.cz.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/www/aktuality/import_zdechov_cz_zapisy.php

    r107 r108  
    2121  $Link = substr($Link, 0, strpos($Link, '?')); // Remove URL parameters
    2222  $Link = substr($Link, 0, strrpos($Link, '/')).$DateParts[1].substr($Link, strrpos($Link, '/')); // Insert month between folder and filename
     23  $Description = '<a href="'.$Link.'">Odkaz</a>';
    2324
     25/*
    2426  echo('Title: '.$Title.'<br>');
     27  echo('Description: '.$Description.'<br>');
    2528  echo('Date: '.$Date.'<br>');
    26   echo('Link: '.$Link.'<br>');
     29  echo('Link: '.$Link.'<br><hr>');
     30*/
    2731
    2832  $DbResult = $Database->select('news', 'id', '`title`="'.$Title.'" AND `date`="'.$Date.'" AND `category`='.$Category);
     
    3034  if($DbResult->num_rows == 0)
    3135  {
    32     $Database->insert('news', array('title' => $Title, 'date' => $Date, 'author' => 'zdechov.cz', 'category' => $Category, 'content' => addslashes('<a href="'.$Link.'">Odkaz</a>')));
    33     echo($Database->$insert_id.',');
     36    $Database->insert('news', array('title' => $Title, 'date' => $Date, 'author' => 'zdechov.cz', 'category' => $Category, 'content' => $Description));
     37    echo($Database->insert_id.',');
    3438  }
    3539}
Note: See TracChangeset for help on using the changeset viewer.