[44] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | if ($user_level < 6) die ( __('Cheatin’ uh?') );
|
---|
| 4 |
|
---|
| 5 | $result = $bdprss_db->get_site_by_id($rss);
|
---|
| 6 | if($result) $cidentifier = $result->{$bdprss_db->cidentifier};
|
---|
| 7 |
|
---|
| 8 | ?>
|
---|
| 9 |
|
---|
| 10 | <h2><a href="edit.php?page=parteibuch-aggregator/bdp-rssadmin.php">Parteibuch Aggregator</a>: Edit site & feed information</h2>
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | <fieldset>
|
---|
| 14 |
|
---|
| 15 | <form method="post" action="<?php echo $selfreference; ?>">
|
---|
| 16 |
|
---|
| 17 |
|
---|
| 18 | <?php
|
---|
| 19 |
|
---|
| 20 | if(!$result || ($rss != $cidentifier) ) {
|
---|
| 21 | echo "<p><b>Unexpected error:</b> could not find feed $rss, or it differed from $cidentifier</p>\n";
|
---|
| 22 | } else {
|
---|
| 23 | $cfeedurl = bdpDisplayCode($result->{$bdprss_db->cfeedurl});
|
---|
| 24 | $csitename = bdpDisplayCode($result->{$bdprss_db->csitename});
|
---|
| 25 | $cdescription = bdpDisplayCode($result->{$bdprss_db->cdescription});
|
---|
| 26 | $csitelicense = bdpDisplayCode($result->{$bdprss_db->csitelicense});
|
---|
| 27 | $csiteurl = bdpDisplayCode($result->{$bdprss_db->csiteurl});
|
---|
| 28 | $cgmtadjust = $result->{$bdprss_db->cgmtadjust};
|
---|
| 29 | $csitenameoverride = $result->{$bdprss_db->csitenameoverride};
|
---|
| 30 | $cpollingfreqmins = $result->{$bdprss_db->cpollingfreqmins};
|
---|
| 31 | $cnextpolltime = $result->{$bdprss_db->cnextpolltime};
|
---|
| 32 | ?>
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | <table width="100%" cellspacing="2" cellpadding="5" class="editform">
|
---|
| 36 |
|
---|
| 37 | <tr><td colspan='2'><h3>Site information</h3></td></tr>
|
---|
| 38 |
|
---|
| 39 | <tr valign="top">
|
---|
| 40 | <th width="40%" scope="row">
|
---|
| 41 | Feed URL:
|
---|
| 42 | </th>
|
---|
| 43 | <td>
|
---|
| 44 | <?php echo "$cfeedurl [id:$cidentifier]"; ?>
|
---|
| 45 | <input type="hidden" name="bdprss_cidentifier" value="<?php echo $cidentifier; ?>" />
|
---|
| 46 | </td>
|
---|
| 47 | </tr>
|
---|
| 48 |
|
---|
| 49 | <tr valign="top">
|
---|
| 50 | <th width="40%" scope="row">
|
---|
| 51 | Feed name:
|
---|
| 52 | </th>
|
---|
| 53 | <td>
|
---|
| 54 | <input type="text" name="bdprss_csitename" value="<?php echo $csitename; ?>" size="50" />
|
---|
| 55 | </td>
|
---|
| 56 | </tr>
|
---|
| 57 |
|
---|
| 58 | <tr valign="top">
|
---|
| 59 | <th width="40%" scope="row">
|
---|
| 60 | Feed description:
|
---|
| 61 | </th>
|
---|
| 62 | <td>
|
---|
| 63 | <textarea cols="50" rows="4" name="bdprss_cdescription"><?php echo $cdescription; ?></textarea>
|
---|
| 64 | </td>
|
---|
| 65 | </tr>
|
---|
| 66 |
|
---|
| 67 | <tr valign="top">
|
---|
| 68 | <th width="40%" scope="row">
|
---|
| 69 | Feed License:
|
---|
| 70 | </th>
|
---|
| 71 | <td>
|
---|
| 72 | <input type="text" name="bdprss_csitelicense" value="<?php echo $csitelicense; ?>" size="50" />
|
---|
| 73 | <br />If the license could not be detected automatically, put in here the license of the feed you aggregate
|
---|
| 74 | like Public Domain, Piratenlizenz, CC-BY, "owner allowed me to redistribute". If unsure, ask the
|
---|
| 75 | feed owner about his license modell before you aggregate his feed.
|
---|
| 76 | </td>
|
---|
| 77 | </tr>
|
---|
| 78 |
|
---|
| 79 | <tr valign="top">
|
---|
| 80 | <th width="40%" scope="row">
|
---|
| 81 | Site URL:
|
---|
| 82 | </th>
|
---|
| 83 | <td>
|
---|
| 84 | <input type="text" name="bdprss_csiteurl" value="<?php echo $csiteurl; ?>" size="50" />
|
---|
| 85 | </td>
|
---|
| 86 | </tr>
|
---|
| 87 |
|
---|
| 88 | <tr valign="top">
|
---|
| 89 | <th width="40%" scope="row">
|
---|
| 90 | Override site origin information from feed:
|
---|
| 91 | </th>
|
---|
| 92 | <td>
|
---|
| 93 | <input type="checkbox" name="bdprss_csitenameoverride"
|
---|
| 94 | value="Y" <?php if($csitenameoverride == 'Y') echo ' checked="checked"'; ?>>
|
---|
| 95 | This must be set to save the above information. <b>Attention</b>: Without having this button
|
---|
| 96 | checked, the Parteibuch Agregator will assume this feed a feed from another aggregator and
|
---|
| 97 | try to find a name of origin for each item seperately and take this value as site name. Sometimes
|
---|
| 98 | the origin resolves to values like "admin", so be sure to check this button for all single
|
---|
| 99 | site feeds.
|
---|
| 100 | </td>
|
---|
| 101 | </tr>
|
---|
| 102 |
|
---|
| 103 | <tr><td colspan='2'><h3>Edit feed handling options</h3></td></tr>
|
---|
| 104 |
|
---|
| 105 | <tr valign="top">
|
---|
| 106 | <th width="40%" scope="row">
|
---|
| 107 | GMT adjustment:
|
---|
| 108 | </th>
|
---|
| 109 | <td>
|
---|
| 110 | <input type="text" name="bdprss_cgmtadjust" value="<?php echo $cgmtadjust; ?>" size="4" />
|
---|
| 111 | hours<br>
|
---|
| 112 | Use range: -48.0 <= adjustment <= 48.0<br>
|
---|
| 113 | Note: this field will be saved even if the override is not set.<br>
|
---|
| 114 | </td>
|
---|
| 115 | </tr>
|
---|
| 116 |
|
---|
| 117 | <tr valign="top">
|
---|
| 118 | <th width="40%" scope="row">
|
---|
| 119 | Set a non-standard site polling frequency:
|
---|
| 120 | </th>
|
---|
| 121 | <td>
|
---|
| 122 | <input type="text" name="bdprss_cpollingfreqmins"
|
---|
| 123 | value="<?php echo $cpollingfreqmins; ?>" size="7" /> minutes<br>
|
---|
| 124 | Use range: 0 <= frequency <= 1000000<br>
|
---|
| 125 | 0 means use the standard site polling frequency.<br>
|
---|
| 126 | Note: day = 1440 min, week = 10080 min<br>
|
---|
| 127 | </td>
|
---|
| 128 |
|
---|
| 129 | <tr valign="top">
|
---|
| 130 | <th width="40%" scope="row">
|
---|
| 131 | Change feed url:
|
---|
| 132 | </th>
|
---|
| 133 | <td>
|
---|
| 134 | <input type="text" name="bdprss_cnewfeedurl" value="" size="50" />
|
---|
| 135 | <input type="hidden" name="bdprss_coldfeedurl" value="<?php echo $cfeedurl; ?>" />
|
---|
| 136 | <br />leave empty for not touching feed url
|
---|
| 137 | </td>
|
---|
| 138 | </tr>
|
---|
| 139 |
|
---|
| 140 | <tr valign="top">
|
---|
| 141 | <th width="40%" scope="row">
|
---|
| 142 | Change next poll timestamp:
|
---|
| 143 | </th>
|
---|
| 144 | <td>
|
---|
| 145 | <input type="text" name="pba_cnewnextpolltime" value="" size="10" maxlength="10" />
|
---|
| 146 | <?php echo '<br />value was: '.$cnextpolltime.' that means: ' .date('r', $cnextpolltime); ?>
|
---|
| 147 | <br />leave empty for not touching next poll timestamp
|
---|
| 148 | <br />if you want to disable this feed, enter 2147483647
|
---|
| 149 | </td>
|
---|
| 150 | </tr>
|
---|
| 151 |
|
---|
| 152 |
|
---|
| 153 | <?php
|
---|
| 154 | $listresult = $bdprss_db->get_all_lists();
|
---|
| 155 | if($listresult) {
|
---|
| 156 | echo "<tr><td colspan='2'><h3>List inclusions</h3></td></tr>\n";
|
---|
| 157 | $class = '';
|
---|
| 158 | foreach($listresult as $r) {
|
---|
| 159 | $id = $r->{$bdprss_db->lidentifier};
|
---|
| 160 | $name = htmlspecialchars($r->{$bdprss_db->lname});
|
---|
| 161 | $llistall = $r->{$bdprss_db->llistall};
|
---|
| 162 | $lurllist= ',' . $r->{$bdprss_db->lurls} . ',';
|
---|
| 163 | $class = ('alternate' == $class) ? '' : 'alternate';
|
---|
| 164 |
|
---|
| 165 | echo '<tr valign="top">
|
---|
| 166 | <th width="40%" scope="row">
|
---|
| 167 | List ID '.$id.' - '.$name.':
|
---|
| 168 | </th>';
|
---|
| 169 | $checked="";
|
---|
| 170 | if(strstr($lurllist, ','. $cidentifier . ',')) $checked=" checked ";
|
---|
| 171 | $dummyfilter=" Check to include this feed into this list";
|
---|
| 172 | if($llistall == 'Y') $dummyfilter=" List $id will display all items anyway.";
|
---|
| 173 | echo '<td>
|
---|
| 174 | <input type="checkbox" name="pba_site_included_in_list_'.$id.'"
|
---|
| 175 | value="Y" '.$checked.' >
|
---|
| 176 | '.$dummyfilter.'
|
---|
| 177 | </td>
|
---|
| 178 | </tr>';
|
---|
| 179 |
|
---|
| 180 |
|
---|
| 181 | }
|
---|
| 182 |
|
---|
| 183 | }
|
---|
| 184 |
|
---|
| 185 | ?>
|
---|
| 186 |
|
---|
| 187 | </tr>
|
---|
| 188 | <tr valign="top">
|
---|
| 189 | <td colspan="2" align="right">
|
---|
| 190 | <input type="submit" name="bdprss_edit_site_button" value="Edit »" />
|
---|
| 191 | </td>
|
---|
| 192 | </tr>
|
---|
| 193 |
|
---|
| 194 | </table>
|
---|
| 195 |
|
---|
| 196 | <?php
|
---|
| 197 | }
|
---|
| 198 | ?>
|
---|
| 199 | </form>
|
---|
| 200 | </fieldset>
|
---|