function config() { echo "<h2 class=\"trigger\">" . __('Configuration:') . "</h2>\n" . "<div id=\"admin_config\" class=\"trigger\">\n"; config_table_header(); $sql = "select * from " . getTable("config") . " where key_ like\n 'rss.%' order by key_ asc"; $res = rss_query($sql); $cntr = 0; while ($row = rss_fetch_assoc($res)) { // Don't show old/moved config keys in the main config list if (in_array($row['key_'], array('rss.config.plugins', 'rss.output.theme', 'rss.output.barefrontpage', 'rss.output.noreaditems', 'rss.output.cachedir', 'rss.output.showdevloglink', 'rss.output.numitemsonpage'))) { continue; } $class_ = $cntr++ % 2 == 0 ? "even" : "odd"; config_table_row($row, $class_, CST_ADMIN_DOMAIN_CONFIG); } config_table_footer(); echo "</div>\n"; }
function blGetItems($cid, $date, $markread) { if (hidePrivate()) { header('HTTP/1.x 401 Not Authorized'); exit; } if (!$cid) { header('HTTP/1.x 403 Forbidden'); exit; } $sql = "select i.title as ititle, i.description as idescr, c.title as ctitle, " . " c.descr as cdescr, c.url as curl, i.author as iauth, i.url as iurl, " . " unix_timestamp(ifnull(i.pubdate, i.added)) as idate ,i.id as iid" . " from " . getTable('item') . " i " . " inner join " . getTable('channels') . " c " . " on c.id = i.cid " . " where i.unread & " . RSS_MODE_UNREAD_STATE . " and c.id={$cid}"; if ($date) { $sql .= " and ifnull(i.pubdate, i.added) > {$date} "; } $rs = rss_query($sql); if (rss_num_rows($rs) == 0) { header('HTTP/1.x 304 Not Modified'); exit; } $ids = array(); header('Content-Type: text/xml; charset=utf-8'); $hdr = false; while ($row = rss_fetch_assoc($rs)) { if (!$hdr) { $hdr = true; echo "<" . "?xml version=\"1.0\"?" . ">\n" . "<rss version=\"2.0\"\n" . "xmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n" . "xmlns:bloglines=\"http://www.bloglines.com/services/module\"\n" . "xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n" . "<channel>\n" . "\t<title>" . htmlspecialchars($row['ctitle']) . "</title>\n" . "\t<link>" . htmlspecialchars($row['curl']) . "</link>\n" . "\t<description>" . htmlspecialchars($row['cdescr']) . "</description>\n" . "\t<language>en-us</language>\n" . "\t<webMaster>support@bloglines.com</webMaster>\n"; } $ids[] = $row['iid']; echo "\t<item>\n" . "\t\t<title>" . htmlspecialchars($row['ititle']) . "</title>\n" . "\t\t<dc:creator>" . htmlspecialchars($row['iauth']) . "</dc:creator>\n" . "\t\t<guid isPermaLink=\"true\">" . htmlspecialchars($row['iurl']) . "</guid>\n" . "\t\t<link>" . htmlspecialchars($row['iurl']) . "</link>\n" . "\t\t<description><![CDATA[" . $row['idescr'] . "]]></description>\n" . "\t\t<pubDate>" . date('D, j M Y H:i:s \\G\\M\\T', $row['idate']) . "</pubDate>\n" . "\t\t<bloglines:itemid>" . $row['iid'] . "</bloglines:itemid>\n" . "\t</item>\n"; } echo "</channel>\n</rss>\n"; if ($markread) { $sql = "update " . getTable('item') . " set unread = unread & " . SET_MODE_READ_STATE . " where id in (" . implode(',', $ids) . ")"; rss_query($sql); rss_invalidate_cache(); } }
function theme_options_fill_override_array($theme, $media, $array_input, $key = null) { $ret = array(); if (!is_array($array_input)) { $array_input = explode(",", $array_input); } foreach ($array_input as $inp) { if (!is_array($inp) && isset($inp)) { $inp = array('key_' => $inp); } if (isset($inp['key_'])) { $thisret = array(); if ($key === null || $key === $inp['key_']) { $thisret = $inp; if ($inp['key_'] == 'rss.output.theme.scheme') { $schemes = loadSchemeList(true, $theme, $media); if (!isset($inp['default_'])) { $thisret['default_'] = implode(',', $schemes) . ",0"; } $thisret['type_'] = 'enum'; if (!isset($inp['desc_'])) { $thisret['desc_'] = 'The color scheme to use.'; } if (!isset($inp['export_'])) { $thisret['export_'] = ''; } $value = rss_theme_config_override_option($thisret['key_'], $thisret['default_'], $theme, $media); $value = array_pop(explode(',', $value)); $thisret['value_'] = implode(',', $schemes) . "," . $value; } else { $sql = "select * from " . getTable("config") . " where key_ like\n '" . $inp['key_'] . "'"; $res = rss_query($sql); if ($row = rss_fetch_assoc($res)) { foreach ($row as $rowkey => $rowval) { if ($rowkey !== 'value_') { if (!isset($inp[$rowkey])) { $thisret[$rowkey] = $rowval; } else { $thisret[$rowkey] = $inp[$rowkey]; } } } } $thisret['value_'] = rss_theme_config_override_option($thisret['key_'], $thisret['default_'], $theme, $media); } if ($key === null) { $ret[] = $thisret; } else { $ret = $thisret; } } } else { rss_error('rss_theme_options_configure_overrides was passed an item with no key_', RSS_ERROR_ERROR, true); } } return $ret; }
/** * This function will return an array for the previous, next and up * navigation elements, based on the current location * * @return: array ( ('prev'|'next'|'up')* => array ( 'y' => year of the prev,next,up item 'm' => month of the prev,next,up item 'd' => day of the prev,next,up item 'cnt' => count of the prev,next,up items for this date 'ts' => unix timestamp of the above 'url' => precomputed uri for the link 'lbl' => precomupted label to be used in the links ) ) */ function makeNav($cid, $iid, $y, $m, $d, $fid, $vfid, $cids) { //echo "X-info: $cid,$iid,$y,$m,$d,$fid,$vfid,$cids"; $currentView = null; $prev = $succ = $up = null; if (isset($_REQUEST['channel'])) { $escaped_title = rss_uri($_REQUEST['channel']); //preg_replace("/[^A-Za-z0-9\.]/","_",$_REQUEST['channel']); } else { $escaped_title = null; } // where are we anyway? if ($y > 0 && $m > 0 && $d > 0) { if ($iid != "") { $currentView = 'item'; } else { $currentView = 'day'; } } elseif ($y > 0 && $m > 0 && $d == 0) { $currentView = 'month'; } elseif ($cids) { if ($fid) { $currentView = "folder"; } elseif ($vfid) { $currentView = "cat"; } } elseif ($cid) { $currentView = "feed"; } if ($currentView) { switch ($currentView) { case 'month': case 'day': if ($currentView == 'day') { $ts_p = mktime(23, 59, 59, $m, $d - 1, $y); $ts_s = mktime(0, 0, 0, $m, $d, $y); } elseif ($currentView == 'month') { $ts_p = mktime(0, 0, 0, $m + 1, 0, $y); $ts_s = mktime(0, 0, 0, $m, 1, $y); } $sql_succ = " select " . " UNIX_TIMESTAMP( ifnull(i.pubdate, i.added)) as ts_, " . " year( ifnull(i.pubdate, i.added)) as y_, " . " month( ifnull(i.pubdate, i.added)) as m_, " . ($currentView == 'day' ? " dayofmonth( ifnull(i.pubdate, i.added)) as d_, " : "") . " count(*) as cnt_ " . " from " . getTable("item") . "i where " . " UNIX_TIMESTAMP(ifnull(i.pubdate, i.added)) > {$ts_s} "; if ($cid) { $sql_succ .= " and cid={$cid} "; } if (hidePrivate()) { $sql_succ .= " and not(i.unread & " . RSS_MODE_PRIVATE_STATE . ") "; } $sql_succ .= " group by y_,m_" . ($currentView == 'day' ? ",d_ " : "") . " order by ts_ asc limit 4"; $sql_prev = " select " . " UNIX_TIMESTAMP( ifnull(i.pubdate, i.added)) as ts_, " . " year( ifnull(i.pubdate, i.added)) as y_, " . " month( ifnull(i.pubdate, i.added)) as m_, " . ($currentView == 'day' ? " dayofmonth( ifnull(i.pubdate, i.added)) as d_, " : "") . " count(*) as cnt_ " . " from " . getTable("item") . " i where " . " UNIX_TIMESTAMP(ifnull(i.pubdate, i.added)) < {$ts_p} "; if ($cid) { $sql_prev .= " and cid={$cid} "; } if (hidePrivate()) { $sql_prev .= " and not(i.unread & " . RSS_MODE_PRIVATE_STATE . ") "; } $sql_prev .= " group by y_,m_" . ($currentView == 'day' ? ",d_ " : "") . " order by ts_ desc limit 4"; //echo "<!-- $sql_prev -->\n"; $res_prev = rss_query($sql_prev); $res_succ = rss_query($sql_succ); $mCount = 12 * $y + $m; // next while ($succ == null && ($row = rss_fetch_assoc($res_succ))) { if ($currentView == 'day') { if (mktime(0, 0, 0, $row['m_'], $row['d_'], $row['y_']) > $ts_s) { $succ = array('y' => $row['y_'], 'm' => $row['m_'], 'd' => $row['d_'], 'cnt' => $row['cnt_'], 'ts' => $row['ts_'], 'url' => makeArchiveUrl($row['ts_'], $escaped_title, $cid, $currentView == 'day'), 'lbl' => rss_locale_date('%B %e', $row['ts_']) . " (" . $row['cnt_'] . " " . ($row['cnt_'] > 1 ? __('items') : __('item')) . ")"); } } elseif ($currentView == 'month') { if ($row['m_'] + 12 * $row['y_'] > $mCount) { $succ = array('y' => $row['y_'], 'm' => $row['m_'], 'cnt' => $row['cnt_'], 'ts' => $row['ts_'], 'url' => makeArchiveUrl($row['ts_'], $escaped_title, $cid, $currentView == 'day'), 'lbl' => rss_locale_date('%B %Y', $row['ts_']) . " (" . $row['cnt_'] . " " . ($row['cnt_'] > 1 ? __('items') : ITEM) . ")"); } } } // prev while ($prev == null && ($row = rss_fetch_assoc($res_prev))) { if ($currentView == 'day') { if (mktime(0, 0, 0, $row['m_'], $row['d_'], $row['y_']) < $ts_p) { $prev = array('y' => $row['y_'], 'm' => $row['m_'], 'd' => $row['d_'], 'cnt' => $row['cnt_'], 'ts' => $row['ts_'], 'url' => makeArchiveUrl($row['ts_'], $escaped_title, $cid, $currentView == 'day'), 'lbl' => rss_locale_date('%B %e', $row['ts_']) . " (" . $row['cnt_'] . " " . ($row['cnt_'] > 1 ? __('items') : __('item')) . ")"); } } elseif ($currentView == 'month') { if ($row['m_'] + 12 * $row['y_'] < $mCount) { $prev = array('y' => $row['y_'], 'm' => $row['m_'], 'cnt' => $row['cnt_'], 'ts' => $row['ts_'], 'url' => makeArchiveUrl($row['ts_'], $escaped_title, $cid, $currentView == 'day'), 'lbl' => rss_locale_date('%B %Y', $row['ts_']) . " (" . $row['cnt_'] . " " . ($row['cnt_'] > 1 ? __('items') : __('item')) . ")"); } } } // up if ($currentView == 'day') { $ts = mktime(0, 0, 0, $m, 10, $y); $up = array('y' => $y, 'm' => $m, 'url' => makeArchiveUrl($ts, $escaped_title, $cid, false), 'lbl' => rss_locale_date('%B %Y', $ts)); } elseif ($currentView == 'month') { $up = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? $escaped_title : "feed.php?channel={$cid}"), 'lbl' => $escaped_title, 'lbl' => ''); } break; case 'item': $sql = " select i.title, i.id, " . " UNIX_TIMESTAMP( ifnull(i.pubdate, i.added)) as ts_, " . " year( ifnull(i.pubdate, i.added)) as y_, " . " month( ifnull(i.pubdate, i.added)) as m_, " . " dayofmonth( ifnull(i.pubdate, i.added)) as d_ " . " from " . getTable("item") . " i " . " where i.cid = {$cid} "; if (hidePrivate()) { $sql .= " and not(i.unread & " . RSS_MODE_PRIVATE_STATE . ") "; } if (getConfig('rss.config.datedesc.unread')) { $sql .= " order by ts_ desc, i.id asc"; } else { $sql .= " order by ts_ asc, i.id asc"; } $rs = rss_query($sql); $found = false; $stop = false; $prev__ = null; $fCounter = 0; while (!$stop && (list($title_, $iid_, $ts_, $y_, $m_, $d_) = rss_fetch_row($rs))) { if ($iid_ == $iid) { //this is the "current" item, get a hold on the previous one $found = true; if ($prev__) { list($ptitle_, $piid_, $pts_, $py_, $pm_, $pd_) = $prev__; $succ = array('y' => $py_, 'm' => $pm_, 'cnt' => 0, 'ts' => $pts_, 'url' => makeArchiveUrl($pts_, $escaped_title, $cid, true) . (getConfig('rss.output.usemodrewrite') ? rss_uri($ptitle_) : "&iid={$piid_}"), 'lbl' => htmlentities($ptitle_, ENT_COMPAT, "UTF-8")); } } if ($found) { // okay, this is the next item, then. $fCounter++; if ($fCounter == 2) { $prev = array('y' => $y_, 'm' => $m_, 'cnt' => 0, 'ts' => $ts_, 'url' => makeArchiveUrl($ts_, $escaped_title, $cid, true) . (getConfig('rss.output.usemodrewrite') ? rss_uri($title_) : "&iid={$iid_}"), 'lbl' => htmlentities($title_, ENT_COMPAT, "UTF-8")); $stop = true; } } $prev__ = array($title_, $iid_, $ts_, $y_, $m_, $d_); } // up $ts = mktime(0, 0, 0, $m, $d, $y); $up = array('y' => $y, 'm' => $m, 'd' => $d, 'url' => makeArchiveUrl($ts, $escaped_title, $cid, true), 'lbl' => rss_locale_date('%B %e', $ts)); break; case 'feed': $sql = "select " . " c.id, c.title " . " from " . getTable("channels") . " c " . " inner join " . getTable("folders") . " d " . " on d.id = c.parent "; $sql .= " where not(c.mode & " . RSS_MODE_DELETED_STATE . ") "; if (hidePrivate()) { $sql .= " and not(c.mode & " . RSS_MODE_PRIVATE_STATE . ") "; } if (getConfig('rss.config.absoluteordering')) { $sql .= " order by d.position asc, c.position asc"; } else { $sql .= " order by d.name asc, c.title asc"; } $res = rss_query($sql); $pcid = $ptitile = null; $cidname = array(); $cids = array(); while (list($cid_, $title_) = rss_fetch_row($res)) { $cids[] = $cid_; $cidname[] = array($cid_, $title_); } $key = array_search($cid, $cids); if ($key !== NULL && $key !== FALSE) { //echo "$key " .count($cidname); if ($key + 1 < count($cidname)) { list($cid_, $title_) = $cidname[$key + 1]; $succ = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($title_) . "/" : "feed.php?channel={$cid_}"), 'lbl' => htmlentities($title_, ENT_COMPAT, "UTF-8")); } if ($key > 0) { list($cid_, $title_) = $cidname[$key - 1]; $prev = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($title_) . "/" : "feed.php?channel={$cid_}"), 'lbl' => htmlentities($title_, ENT_COMPAT, "UTF-8")); } } break; case 'cat': $res = rss_query(" select t.tag,t.id from " . getTable('metatag') . " m " . "inner join " . getTable('tag') . "t on t.id = m.tid " . " where m.ttype = 'channel' " . " order by t.tag asc"); $pp = null; $nn = null; $found = false; $stop = false; while (!$stop && (list($tt_, $tid_) = rss_fetch_row($res))) { if ($vfid == $tid_) { $found = true; } if (!$found) { $pp = array('id' => $tid_, 'title' => $tt_); } elseif ($vfid != $tid_) { $nn = array('id' => $tid_, 'title' => $tt_); $stop = true; } } if ($pp) { $vftitle_ = $pp['title']; $vfid_ = $pp['id']; $prev = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($vftitle_) . "/" : "feed.php?vfolder={$vfid_}"), 'lbl' => htmlentities($vftitle_, ENT_COMPAT, "UTF-8")); } if ($nn) { $vftitle_ = $nn['title']; $vfid_ = $nn['id']; $succ = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($vftitle_) . "/" : "feed.php?vfolder={$vfid_}"), 'lbl' => htmlentities($vftitle_, ENT_COMPAT, "UTF-8")); } break; case 'folder': $sql = "select f.id, f.name, count(*) from " . getTable('channels') . " c " . "inner join " . getTable('folders') . " f on f.id = c.parent " . " where f.name != '' "; if (hidePrivate()) { $sql .= " and not (c.mode & " . RSS_MODE_PRIVATE_STATE . ")"; } $sql .= " group by f.id "; if (getConfig('rss.config.absoluteordering')) { $sql .= " order by f.position asc, c.position asc"; } else { $sql .= " order by f.name, c.title asc"; } $res = rss_query($sql); $pp = null; $nn = null; $found = false; $stop = false; while (!$stop && (list($fid_, $fn_, $fc_) = rss_fetch_row($res))) { if ($fc_ == 0) { continue; } if ($fid == $fid_) { $found = true; } if (!$found) { $pp = array('id' => $fid_, 'title' => $fn_); } elseif ($fid != $fid_) { $nn = array('id' => $fid_, 'title' => $fn_); $stop = true; } } if ($pp) { $ftitle__ = $pp['title']; $fid__ = $pp['id']; $prev = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($ftitle__) . "/" : "feed.php?folder={$fid__}"), 'lbl' => htmlentities($ftitle__, ENT_COMPAT, "UTF-8")); } if ($nn) { $ftitle__ = $nn['title']; $fid__ = $nn['id']; $succ = array('url' => getPath() . (getConfig('rss.output.usemodrewrite') ? rss_uri($ftitle__) . "/" : "feed.php?folder={$fid__}"), 'lbl' => htmlentities($ftitle__, ENT_COMPAT, "UTF-8")); } break; default: //echo "current view: $currentView"; break; } return array($prev, $succ, $up); } return null; }
function channel_edit_form($cid) { $sql = "select id, title, url, siteurl, parent, descr, icon, mode, daterefreshed, dateadded from " . getTable("channels") . " where id={$cid}"; $res = rss_query($sql); list($id, $title, $url, $siteurl, $parent, $descr, $icon, $mode, $daterefreshed, $dateadded) = rss_fetch_row($res); $title = htmlentities($title, ENT_QUOTES); // get tags $sql = "select t.tag from " . getTable('tag') . " t " . " inner join " . getTable('metatag') . " m " . " on m.tid = t.id " . "where m.ttype = 'channel' and m.fid = {$cid}"; $res = rss_query($sql); $tags = ""; while ($r = rss_fetch_assoc($res)) { $tags .= $r['tag'] . " "; } echo "<div>\n"; echo "\n\n<h2>" . __('Edit the feed ') . " '{$title}'</h2>\n"; echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "#fa{$cid}\" id=\"channeledit\">\n"; echo "<fieldset id=\"channeleditfs\">"; // Timestamps if (!empty($daterefreshed)) { echo "<p><label>" . __('Added') . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" . "<p><label>" . __('Last Update') . ": " . date("M-d-Y H:i", strtotime($daterefreshed)) . " (Age: " . round((time() - strtotime($daterefreshed)) / 60) . " minutes)</label></p>\n"; } else { echo "<p><label>" . __('Added') . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" . "<p><label>" . __('Last Update') . ": " . __('Never') . "</label></p>\n"; } // Item name echo "<p><label for=\"c_name\">" . __('Title:') . "</label>\n" . "<input type=\"text\" id=\"c_name\" name=\"c_name\" value=\"{$title}\" />" . "<input type=\"hidden\" name=\"" . CST_ADMIN_DOMAIN . "\" value=\"" . CST_ADMIN_DOMAIN_CHANNEL . "\" />\n" . "<input type=\"hidden\" name=\"action\" value=\"" . CST_ADMIN_SUBMIT_EDIT . "\" />\n" . "<input type=\"hidden\" name=\"cid\" value=\"{$cid}\" /></p>\n" . "<p><label for=\"c_url\">" . __('RSS URL:') . "</label>\n" . "<a href=\"{$url}\">" . __('(visit)') . "</a>\n" . "<input type=\"text\" id=\"c_url\" name=\"c_url\" value=\"{$url}\" /></p>" . "<p><label for=\"c_siteurl\">" . __('Site URL:') . "</label>\n" . "<a href=\"{$siteurl}\">" . __('(visit)') . "</a>\n" . "<input type=\"text\" id=\"c_siteurl\" name=\"c_siteurl\" value=\"{$siteurl}\" /></p>" . "<p><label for=\"c_parent\">" . __('In folder:') . "</label>\n" . rss_toolkit_folders_combo('c_parent', $parent) . "</p>\n"; // Tags echo "<p><label for=\"c_tags\">" . __('Categories') . ":</label>\n" . "<input type=\"text\" id=\"c_tags\" name=\"c_tags\" value=\"{$tags}\" /></p>"; // Items state if ($mode & RSS_MODE_PRIVATE_STATE) { $pchk = " checked=\"checked\" "; $old_priv = "1"; } else { $pchk = ""; $old_priv = "0"; } if ($mode & RSS_MODE_DELETED_STATE) { $dchk = " checked=\"checked\" "; $old_del = "1"; } else { $dchk = ""; $old_del = "0"; } echo "<p>\n" . "<input style=\"display:inline\" type=\"checkbox\" id=\"c_private\" " . " name=\"c_private\" value=\"1\"{$pchk} />\n" . "<label for=\"c_private\">" . __('This feed is <strong>private</strong>, only admins see it.') . "</label>\n" . "<input type=\"hidden\" name=\"old_priv\" value=\"{$old_priv}\" />\n" . "</p>\n"; echo "<p>\n" . "<input style=\"display:inline\" type=\"checkbox\" id=\"c_deleted\" " . " name=\"c_deleted\" value=\"1\"{$dchk} />\n" . "<label for=\"c_deleted\">" . __("This feed is <strong>deprecated</strong>, it won't be updated anymore and won't be visible in the feeds column.") . "</label>\n" . "<input type=\"hidden\" name=\"old_del\" value=\"{$old_del}\" />\n" . "</p>\n"; // Description $descr = trim(htmlentities(strip_tags($descr), ENT_QUOTES)); echo "<p><label for=\"c_descr\">" . __('Description:') . "</label>\n" . "<input type=\"text\" id=\"c_descr\" name=\"c_descr\" value=\"{$descr}\" /></p>\n"; // Icon if (getConfig('rss.output.showfavicons')) { echo "<p><label for=\"c_icon\">" . __('Shown favicon:') . "</label>\n"; if (trim($icon) != "") { if (substr($icon, 0, 5) == 'blob:') { $icon = substr($icon, 5); } echo "<img src=\"{$icon}\" alt=\"{$title}\" class=\"favicon\" width=\"16\" height=\"16\" />\n"; echo "<span>" . __('(Leave blank for no icon)') . "</span>"; } echo "<input type=\"text\" id=\"c_icon\" name=\"c_icon\" value=\"{$icon}\" /></p>\n"; } else { echo "<p><input type=\"hidden\" name=\"c_icon\" id=\"c_icon\" value=\"{$icon}\" /></p>\n"; } rss_plugin_hook('rss.plugins.admin.feed.properties', $cid); echo "</fieldset>\n"; // Feed properties echo "<fieldset id=\"channeleditpropfs\">"; echo "<p>" . "<span style=\"float:left;\">Allow Gregarius to look for updates in existing items for this feed?</span>" . "<span style=\"float:right;\">[<a href=\"index.php?domain=config&action=edit&key=rss.input.allowupdates&view=config\">Edit the global option</a>]</span>\n" . " " . "</p>"; $rss_input_allowupdates_default_current = getProperty($cid, 'rss.input.allowupdates'); $rss_input_allowupdates_default_value = $rss_input_allowupdates_default = "Use global option (" . (getConfig('rss.input.allowupdates') ? "Yes" : "No") . ")"; echo "<p id=\"rss_input_allowupdates_options\">" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_yes\" " . "name=\"prop_rss_input_allowupdates\" value=\"1\" " . ($rss_input_allowupdates_default_current === true ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_yes\">Yes</label>\n" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_no\" " . "name=\"prop_rss_input_allowupdates\" value=\"0\" " . ($rss_input_allowupdates_default_current === false ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_no\">No</label>" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_default\" " . "name=\"prop_rss_input_allowupdates\" value=\"default\" " . ($rss_input_allowupdates_default_current === null ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_default\">{$rss_input_allowupdates_default}</label>" . "</p>\n"; echo "<p>" . "<span style=\"float:left;\">Refresh Interval (minutes): </span>" . " " . "</p>"; $rss_config_refreshinterval_default_current = getProperty($cid, 'rss.config.refreshinterval'); echo "<p id=\"rss_config_refreshinterval_options\">" . "<input type=\"text\" id=\"rss_config_refreshinterval\" name=\"rss_config_refreshinterval\" value=\"" . (true == empty($rss_config_refreshinterval_default_current) ? 60 : $rss_config_refreshinterval_default_current) . "\">" . "</p>"; echo "</fieldset>\n"; echo "<p style=\"clear:both; padding: 1em 0\"><input type=\"submit\" name=\"action_\" value=\"" . __('Submit Changes') . "\" />" . "<input type=\"button\" name=\"_cancel\" value=\"" . __('Cancel') . "\" onclick=\"history.back(-1);\"></p>"; echo "</form></div>\n"; }