home *** CD-ROM | disk | FTP | other *** search
/ notepage.net / notepage.net.tar / notepage.net / dev / temp / image1.php < prev    next >
Text File  |  2015-09-23  |  1KB  |  42 lines

  1.  
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  3. <html>
  4.   <head>
  5.     <meta http-equiv="content-type" content="text/html;charset=utf-8">
  6.     <title>~~~FeedTitle~~~</title>
  7.   </head>
  8.   <body>
  9.     <h1>~~~FeedTitle~~~</h1>
  10.     <p>~~~FeedDescription~~~</p>
  11.     <hr>
  12.     <table width="100%">
  13.       ~~~BeginItemsRecord~~~
  14. <?php
  15. // Set initial values for our variables
  16. $theImage = ' ';
  17. // To ensure proper display with borders
  18. $newDescription = '~~~ItemDescription~~~';
  19. $match = Array();
  20.  
  21. // Use regular expressions to find <img ... >
  22. if (preg_match('/<img[^>]*>/', $newDescription, $match) == 1) { 
  23.   // Make sure it truely was a match
  24.   if ((count($match) != 0) && ($match[0] != '')) {
  25.     // Save the image
  26.     $theImage = $match[0];
  27.     // Remove the image from the description
  28.     $newDescription = str_replace($match[0], '', $newDescription);
  29.   }
  30. }
  31. echo "<tr><td>$theImage</td><td><br />";
  32. echo '<tr><td>~~~ItemPubShortDate~~~ ~~~ItemPubShortTime~~~<br />';
  33. echo '~~~ItemTitle~~~<br />';
  34. echo $newDescription.'</td></tr>';
  35. echo '<tr><td colspan="2"><hr></td></tr>';
  36. ?>
  37.       ~~~EndItemsRecord~~~
  38.     </table>
  39.   </body>
  40. </html>
  41.  
  42.