source: trunk/www.guidonia.net/wp/wp-content/plugins/parteibuch-aggregator/bdp-rssadmin-edit.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 2.9 KB
Line 
1<?php
2
3if ($user_level < 6) die ( __('Cheatin&#8217; uh?') );
4
5?>
6
7<h2>Edit list filter #<?php echo $list; ?></h2>
8
9<fieldset>
10
11<form method="post" action="<?php echo $selfreference; ?>">
12
13<?php
14
15global $bdprss_db;
16
17$result = $bdprss_db->get_list($list);
18if(!$result) {
19 echo "<p><b>Unexpected error:</b> could not find output format #$list </p>\n";
20} else {
21 // setup stuff
22 $lname = bdpDisplayCode($result->{$bdprss_db->lname});
23 $llistall = $result->{$bdprss_db->llistall};
24
25 $lurls = $result->{$bdprss_db->lurls};
26 $ids = preg_split("','", $lurls, -1, PREG_SPLIT_NO_EMPTY);
27 //for($i = 0; $i < sizeof($ids); $i++) echo "DEBUG '$ids[$i]'\n"; /* DEBUG */
28
29?>
30
31<table width="100%" cellspacing="2" cellpadding="5" class="editform">
32<tr valign="top"><td align="left" colspan="2"><h4>About this list</h4></td></tr>
33<tr valign="top">
34 <th width="40%" scope="row">
35 List ID:
36 </th>
37 <td>
38 <?php echo $list; ?>
39 <input type="hidden" name="bdprss_lidentifier" value="<?php echo $list; ?>" />
40 </td>
41</tr>
42
43<tr valign="top">
44 <th width="40%" scope="row">
45 Name of list filter:
46 </th>
47 <td>
48 <input type="text" name="bdprss_lname" value="<?php echo $lname; ?>" size="50" /><br />
49 (Only used for list management)
50 </td>
51</tr>
52
53<tr valign="top">
54 <th width="40%" scope="row">
55 Disable filter (List all sites):
56 </th>
57 <td>
58 <input type="checkbox" name="bdprss_llistall"
59 value="Y" <?php if($llistall == 'Y') echo ' checked="checked"'; ?>>
60 (If checked, the filter will not filter and all items are displayed)
61 </td>
62</tr>
63
64<tr valign="top"><td align="left" colspan="2"><h4>Manage the sites</h4></td></tr>
65
66<tr><td colspan="2">
67<table width="100%" cellpadding="3" cellspacing="3">
68<?php
69
70 global $bdprss_db;
71 $result = $bdprss_db->get_all_sites();
72
73 if($result) {
74 echo "<tr align='center'><td><b>Check</b></td><td><b>ID</b></td>".
75 "<td align='left'><b>Feed</b></td><td><b>Cache Last Updated</b></td></tr>\n";
76 $class = '';
77
78 foreach($result as $r) {
79 $id = $r->{$bdprss_db->cidentifier};
80 $url = $r->{$bdprss_db->cfeedurl};
81 $site = $r->{$bdprss_db->csitename};
82
83 $updated = PBALIB::gettheage( $r->{$bdprss_db->cupdatetime} );
84 $name = ($site == '') ? $url : "<a href='$url' title='$url'>"."$site</a>";
85
86 $class = ('alternate' == $class) ? '' : 'alternate';
87
88 echo "<tr class='$class' valign='middle' align='center'>\n";
89 echo "\t<td><input type='checkbox' name='bdprss_feed_$id' value='1'";
90 if(array_search($id, $ids) !== false) echo " checked='checked'";
91 echo "></td>\n";
92
93 echo "\t<td>$id</td>\n";
94 echo "\t<td align='left'>$name</td>\n";
95 echo "\t<td>$updated</td>\n";
96 echo "</tr>\n";
97 }
98 }
99?>
100</table>
101</td></tr>
102
103
104<tr valign="top"><td align="left" colspan="2"><h4>And hit the edit button to complete</h4></td></tr>
105
106<tr valign="top">
107 <td colspan="2" align="right">
108 <input type="submit" name="bdprss_edit_list_button" value="Edit &raquo;" />
109 </td>
110</tr>
111
112
113
114</table>
115
116</form>
117
118</fieldset>
119
120<?php
121}
122?>
Note: See TracBrowser for help on using the repository browser.