Changeset 108 for devel


Ignore:
Timestamp:
Sep 14, 2008, 6:16:04 PM (16 years ago)
Author:
george
Message:
  • Opraveno: ImportovacĂ­ skripty z webu zdechov.cz.
Location:
devel/www/aktuality
Files:
2 edited

Legend:

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

    r107 r108  
    2323  $Link = 'http://www.zdechov.cz/pages/main.php?pg=home&cat=1';
    2424
     25/*
    2526  echo('Title: '.$Title.'<br>');
    2627  echo('Description: '.$Description.'<br>');
    2728  echo('Date: '.$Date.'<br>');
    2829  echo('Link: '.$Link.'<br><hr>');
     30*/
    2931
    3032  $DbResult = $Database->select('news', 'id', '`title`="'.$Title.'" AND `date`="'.$Date.'" AND `category`='.$Category);
  • 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.