gen_html_feeds.php (4926B)
1 <?php
2 function gen_html_feeds($config) {
3 ?>
4
5 <form id="sources-selection" method="post">
6
7 <!-- Submit button -->
8 <div class="submit-container">
9 <button
10 type="submit"
11 name="action"
12 value="gen_opml"
13 title="Erzeugt die OPML-Datei, die in den RSS-Reader importiert werden kann"
14 >
15 Feed erzeugen
16 </button>
17 <button
18 type="submit"
19 name="action"
20 value="preview"
21 title="Leitet auf eine Vorschau der ausgewählten Feeds weiter"
22 >
23 Feed-Vorschau
24 </button>
25 <a href="#sources" class="button" title="Nach oben">
26 👆 <stretch class="nomobile">Nach oben</stretch>
27 </a>
28 <a href="#faqs" class="button" title="Nach unten">
29 👇 <stretch class="nomobile">Nach unten</stretch>
30 </a>
31 </div>
32 <?php
33 $cnt = 0;
34 foreach ($config["sources"] as $id => $source) {
35 $cnt++; // increase counter for POST field ID
36
37 /* Gather publishing medium info */
38 $publisher = $config["publisher"][
39 array_pop($source["publisher"])
40 ];
41 ?>
42 <article>
43 <!-- Entry-Head -->
44 <h3>
45 <a
46 href="<?php echo $source["web"]; ?>"
47 target="_blank"
48 rel="nofollow noindex ugc"
49 >
50 <?php
51 echo $publisher["name"] . ": " . $source["title"];
52 ?>
53 </a>
54 </h3>
55
56 <!-- Description -->
57 <p>
58 <?php
59 echo $publisher["description"] . " " . $source["description"];
60 ?>
61 </p>
62
63 <!-- Choose this Button -->
64 <input
65 type="checkbox"
66 name="<?php echo "source-" . $cnt; ?>"
67 value="<?php echo $id; ?>"
68 >
69 <label for="<?php echo $id; ?>">
70 Diese Nachrichtenquelle auswählen
71 </label>
72
73 <!-- Entry-Categories -->
74 <table style="width:100%;">
75
76 <tr>
77 <th>Quelle:</th>
78 <td>
79 <mark title="<?php echo $publisher["desc"];?>">
80 <?php echo "#" . $publisher["button"]; ?>
81 </mark>
82 </td>
83 </tr>
84
85 <tr>
86 <th>Region:</th>
87 <td>
88 <?php
89 foreach ($source["regions"] as $region) {
90 $catentry = $config["regions"][$region]
91 ?>
92 <mark title="<?php echo $catentry["description"];?>">
93 <?php echo "#" . $catentry["name"]; ?>
94 </mark>
95 <?php
96 }
97 ?>
98 </td>
99 </tr>
100
101 <tr>
102 <th>Sprachen:</th>
103 <td>
104 <?php
105 foreach ($source["languages"] as $language) {
106 $catentry = $config["languages"][$language]
107 ?>
108 <mark title="<?php echo $catentry["description"];?>">
109 <?php echo "#" . $catentry["name"]; ?>
110 </mark>
111 <?php
112 }
113 ?>
114 </td>
115 </tr>
116
117 <tr>
118 <th>Zugang:</th>
119 <td>
120 <?php
121 foreach ($source["access"] as $access) {
122 $catentry = $config["access"][$access]
123 ?>
124 <mark title="<?php echo $catentry["description"];?>">
125 <?php echo "#" . $catentry["name"]; ?>
126 </mark>
127 <?php
128 }
129 ?>
130 </td>
131 </tr>
132
133 <tr>
134 <th>Medium:</th>
135 <td>
136 <?php
137 foreach ($source["medium"] as $medium) {
138 $catentry = $config["medium"][$medium]
139 ?>
140 <mark title="<?php echo $catentry["description"];?>">
141 <?php echo "#" . $catentry["name"]; ?>
142 </mark>
143 <?php
144 }
145 ?>
146 </td>
147 </tr>
148
149 <tr>
150 <th>Themen:</th>
151 <td>
152 <?php
153 foreach ($source["topics"] as $topic) {
154 $catentry = $config["topics"][$topic]
155 ?>
156 <mark title="<?php echo $catentry["description"];?>">
157 <?php echo "#" . $catentry["name"]; ?>
158 </mark>
159 <?php
160 }
161 ?>
162 </td>
163 <tr>
164 </table>
165
166 </article>
167 <?php
168 }
169 ?>
170 </form>
171
172 <?php
173 }
174 ?>