Advertisement
Guest User

user56

a guest
Jan 17th, 2011
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.54 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  6. <title></title>
  7. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
  8. <script type="text/javascript" src="./inc/jquery.layout.js"></script>
  9. <link rel="stylesheet" type="text/css" href="./css/index1.css"  />
  10. <script type="text/javascript">
  11. $(document).ready(function() {
  12.  
  13.  
  14.         var my_layout = $('#page_wrap').layout();
  15.  
  16.         $("a.title").live("click", function(){
  17.        
  18.                 $(this).next("div.content").slideToggle();
  19.                
  20.                
  21.                 $('div#view_content').mouseleave(function(){
  22.                
  23.         $('div.content').slideUp();
  24.        
  25.    
  26. });
  27.                
  28.                
  29.         });
  30.        
  31.  
  32.                
  33. });
  34.  
  35.        
  36. </script>
  37.  
  38. </head>
  39. <body>
  40. <div id='header'>
  41.         <div id="date">
  42.         <iframe src="http://free.timeanddate.com/clock/i2ecokut/n43/fti/tt0/tw0/tm1/tb4" frameborder="0" width="89" height="34"></iframe></div>
  43.         <div id='loadArea'>Loading...</div>
  44. </div>
  45. <div id='page_wrap'>
  46. <div class='ui-layout-center' id='view_content'>
  47. <?php
  48.  
  49.        
  50.         //get the simplepie library
  51. require("connect.php");
  52. require("./inc/simplepie.inc");
  53.  
  54.  
  55.        
  56.         //create new Simplepie object
  57.         $feed1 = new SimplePie();
  58.  
  59.         $feed1->set_feed_url($url));
  60.        
  61. //enable caching
  62.     $feed1->enable_cache(true);
  63.    
  64.     //provide the caching folder
  65.     $feed1->set_cache_location('cache');
  66.    
  67.     //set the amount of seconds you want to cache the feed
  68.     $feed1->set_cache_duration(600);
  69.    
  70.     //init the process
  71.     $feed1->init();
  72.    
  73.     //let simplepie handle the content type (atom, RSS...)
  74.     $feed1->handle_content_type();
  75.        
  76.        
  77. /*      //If there is no favicon, use an alternate one.
  78.         if (!$favicon = $feed1->get_favicon())
  79.         {
  80.         //$favicon = './img/favicon.png';
  81.         }
  82.         */
  83.         ?>
  84.         <?php if ($feed->error): ?>
  85.   <p><?php echo $feed->error; ?></p>
  86. <?php endif; ?>
  87. <?php
  88.  
  89. echo "<a href='".$url."' class='feed_title'>".$name." &raquo;</a>
  90.                                <ul class='records'>";
  91.         foreach ($feed1->get_items() as $item)
  92.                 {
  93.                                
  94.  
  95.                 echo "<li><img src=".$feed1->get_favicon()." id='favicon' /><a href='javascript:;' class='title'>".$item->get_title()."</a>            
  96.                      
  97.                        <div class='content'>
  98.                              
  99.                                <a class='record_title' href='".$item->get_link()."' >".$item->get_title()." &raquo;</a>"
  100.                                 .$item->get_content()."<br />
  101.                                <p>Source:  <a href=" . $feed1->get_permalink() . "><img src=" . $feed1->get_favicon(). " alt=". $feed1->get_title() ." /></a>  | " . $item->get_date() .  "</p>
  102.                                                              
  103.                                </div>
  104.                              
  105.                        </li>";
  106.                
  107.  
  108.                
  109.                 }
  110.        
  111.         echo "</ul>";
  112.        
  113.  
  114.         ?>
  115.  
  116. <script type="text/javascript" src="./inc/scroller.js"></script>
  117.  
  118. <script type="text/javascript">
  119.         $('.records').scroller();
  120. </script>
  121. </div>
  122. </div>
  123.  
  124. </body>
  125. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement