Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.54 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.  
  18. <div id="wrapper">
  19.  
  20. <div id="kopfbereich">
  21.    
  22. </div> <!-- Ende kopfbereich -->
  23.  
  24. <div id="navibereich">
  25.     <h3>RSS Feed Collector Version 0.1</h3>
  26.     <?php
  27.         if(isset($_POST['checkbox'])){
  28.             $count = sizeof($_POST['checkbox']);
  29.             echo "Anzahl gewählter Feeds: ".$count. "<br />";
  30.         }
  31.     ?>
  32.  
  33. </div> <!-- Ende navibereich -->
  34. <div id="statusbereich">
  35.     <p><b><center>#### Überblick gewählte Feeds ####</center></b></p>
  36. </div> <!-- Ende textbereich -->
  37.  
  38. <div id="fussbereich">
  39.  
  40.  
  41.    
  42. <form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
  43. <input type="submit" name="save" value="Feeds speichern">
  44.  
  45. <?php
  46.     // $rss_title = array();
  47.     // $rss_url = array();
  48.     // $rss_summary = array();
  49.     $row = array();
  50.     $hash = array();
  51.     $hashArray = new feedSupport();
  52.     if(isset($_POST['selected'])){
  53.         foreach ($_POST['checkbox'] as $news){
  54.             $sql_output = selectFeedByID($conn, $news);
  55.  
  56.             while($row_output = $sql_output->fetch_assoc()){
  57.                 $row[] = $row_output;
  58.                 echo '<div id="feed"><div id="titel">';
  59.                 $rss_title[] = $row_output["title"];
  60.                 echo "<u>Titel:</u><b> " .$row_output["title"]. "</b><br />";
  61.                 echo '</div>';
  62.                 $url = $row_output["url"];
  63.                 $rss_url = $url;
  64.                 echo "<u>URL:</u> <a target='_blank' href=" .$url. "><b>".$url."</b></a><br /><br />";
  65.                 echo '<div id="summary">';
  66.                 $rss_summary = $row_output["summary"];
  67.                 echo "<u>Zusammenfassung:</u> <br>" .$row_output["summary"]. "<br />";
  68.                 echo '</div></div>';
  69.                 // echo 'rss_title: ' .$rss_title. '<br />';
  70.                 // echo 'rss_url: ' .$rss_url. '<br />';
  71.                 // echo 'rss_summary: ' .$rss_summary. '<br />';
  72.  
  73.                 // array_push($hash, $row_output["hashvalue"]);
  74.                 // $hashArray->appendHash($hash);
  75.            
  76.             }
  77.         }
  78.     }  
  79.  
  80.     var_dump($row);
  81.    
  82.  
  83.     if(isset($_POST['save'])){
  84.     echo 'test';
  85.     foreach ($row as $key) {
  86.         // $test = print_r(array_values($key));
  87.         $test = $key['hashvalue'];
  88.         echo 'Hash: ' .$test. '<br />';
  89.        
  90.     }
  91.  
  92.     }
  93.  
  94.     $conn->close();
  95. ?>
  96. </form>
  97.  
  98. </div> <!-- Ende fussbereich -->
  99.  
  100. </div> <!-- Ende wrapper -->
  101.  
  102. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement