Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.36 KB | None | 0 0
  1. <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
  2. <link href="style_feeds.css" rel="stylesheet" type="text/css" media="screen" />
  3. <script src="jquery.js"></script>
  4. <script>
  5.     $(function(){
  6.         $("#fussbereich").hide().show(1000);
  7.         $("#statusbereich").show().fadeToggle(5000);
  8.     });
  9. </script>
  10.  
  11. <?php
  12. include 'db_connect.php';
  13. include 'support_functions.php';
  14. include 'rss_class.php'
  15. ?>
  16. <body id="startseite">
  17. <div id="wrapper">
  18. <div id="kopfbereich">
  19. </div> <!-- Ende kopfbereich -->
  20.  
  21. <div id="navibereich">
  22.     <h3>RSS Feed Collector Version 0.1</h3>
  23.     <?php
  24.         if(isset($_POST['checkbox'])){
  25.             $count = sizeof($_POST['checkbox']);
  26.             echo "Anzahl gewählter Feeds: ".$count. "<br />";
  27.         }
  28.     ?>
  29.  
  30. </div> <!-- Ende navibereich -->
  31. <div id="statusbereich">
  32.     <p><b><center>#### Überblick gewählte Feeds ####</center></b></p>
  33. </div> <!-- Ende textbereich -->
  34.  
  35. <div id="fussbereich">
  36.  
  37.  
  38.    
  39. <form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  40. <input type="submit" name="save" value="Feeds speichern">
  41.  
  42. <?php
  43.     $rss_title = array();
  44.     $rss_url = array();
  45.     $rss_summary = array();
  46.     $row = array();
  47.  
  48.     if(isset($_POST['selected'])){
  49.         foreach ($_POST['checkbox'] as $news){
  50.             $sql_output = selectFeedByID($conn, $news);
  51.  
  52.             while($row_output = $sql_output->fetch_assoc()){
  53.                 $row[] = $row_output;
  54.                 echo '<div id="feed"><div id="titel">';
  55.                 $rss_title = $row_output["title"];
  56.                 echo "<u>Titel:</u><b> " .$row_output["title"]. "</b><br />";
  57.                 echo '</div>';
  58.                 $url = $row_output["url"];
  59.                 $rss_url = $url;
  60.                 echo "<u>URL:</u> <a target='_blank' href=" .$url. "><b>".$url."</b></a><br /><br />";
  61.                 echo '<div id="summary">';
  62.                 $rss_summary = $row_output["summary"];
  63.                 echo "<u>Zusammenfassung:</u> <br>" .$row_output["summary"]. "<br />";
  64.                 echo '</div></div>';
  65.                 // echo 'rss_title: ' .$rss_title. '<br />';
  66.                 // echo 'rss_url: ' .$rss_url. '<br />';
  67.                 // echo 'rss_summary: ' .$rss_summary. '<br />';
  68.              }
  69.         }
  70.     }  
  71.  
  72.     var_dump($row);
  73.     if(isset($_POST['save'])){
  74.     echo 'test';
  75.     foreach ($row as $key) {
  76.         // $test = print_r(array_values($key));
  77.         $test = $key['hashvalue'];
  78.         echo 'Hash: ' .$test. '<br />';
  79.     }
  80.     }
  81.     $conn->close();
  82. ?>
  83. </form>
  84.  
  85. </div> <!-- Ende fussbereich -->
  86.  
  87. </div> <!-- Ende wrapper -->
  88.  
  89. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement