本文整理汇总了PHP中print_feed_cat_select函数的典型用法代码示例。如果您正苦于以下问题:PHP print_feed_cat_select函数的具体用法?PHP print_feed_cat_select怎么用?PHP print_feed_cat_select使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_feed_cat_select函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit
function edit()
{
$filter_id = db_escape_string($_REQUEST["id"]);
$result = db_query($this->link, "SELECT * FROM ttrss_filters WHERE id = '{$filter_id}' AND owner_uid = " . $_SESSION["uid"]);
$reg_exp = htmlspecialchars(db_fetch_result($result, 0, "reg_exp"));
$filter_type = db_fetch_result($result, 0, "filter_type");
$feed_id = db_fetch_result($result, 0, "feed_id");
$cat_id = db_fetch_result($result, 0, "cat_id");
$action_id = db_fetch_result($result, 0, "action_id");
$action_param = db_fetch_result($result, 0, "action_param");
$filter_param = db_fetch_result($result, 0, "filter_param");
$enabled = sql_bool_to_bool(db_fetch_result($result, 0, "enabled"));
$inverse = sql_bool_to_bool(db_fetch_result($result, 0, "inverse"));
$cat_filter = sql_bool_to_bool(db_fetch_result($result, 0, "cat_filter"));
print "<form id=\"filter_edit_form\" onsubmit='return false'>";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"{$filter_id}\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"csrf_token\" value=\"" . $_SESSION['csrf_token'] . "\">";
$result = db_query($this->link, "SELECT id,description\n\t\t\tFROM ttrss_filter_types ORDER BY description");
$filter_types = array();
while ($line = db_fetch_assoc($result)) {
//array_push($filter_types, $line["description"]);
$filter_types[$line["id"]] = __($line["description"]);
}
print "<div class=\"dlgSec\">" . __("Match") . "</div>";
print "<div class=\"dlgSecCont\">";
if ($filter_type != 5) {
$date_ops_invisible = 'style="display : none"';
}
print "<span id=\"filterDlg_dateModBox\" {$date_ops_invisible}>";
print __("Date") . " ";
$filter_params = array("before" => __("before"), "after" => __("after"));
print_select_hash("filter_date_modifier", $filter_param, $filter_params, 'dojoType="dijit.form.Select"');
print " </span>";
print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t\t required=\"1\"\n\t\t\t\t name=\"reg_exp\" style=\"font-size : 16px;\" value=\"{$reg_exp}\">";
print "<span id=\"filterDlg_dateChkBox\" {$date_ops_invisible}>";
print " <button dojoType=\"dijit.form.Button\" onclick=\"return filterDlgCheckDate()\">" . __('Check it') . "</button>";
print "</span>";
print "<hr/> " . __("on field") . " ";
print_select_hash("filter_type", $filter_type, $filter_types, 'onchange="filterDlgCheckType(this)" dojoType="dijit.form.Select"');
print "<hr/>";
print __("in") . " ";
$hidden = $cat_filter ? "style='display:none'" : "";
print "<span id='filterDlg_feeds' {$hidden}>";
print_feed_select($this->link, "feed_id", $feed_id, 'dojoType="dijit.form.FilteringSelect"');
print "</span>";
$hidden = $cat_filter ? "" : "style='display:none'";
print "<span id='filterDlg_cats' {$hidden}>";
print_feed_cat_select($this->link, "cat_id", $cat_id, 'dojoType="dijit.form.FilteringSelect"');
print "</span>";
print "</div>";
print "<div class=\"dlgSec\">" . __("Perform Action") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<select name=\"action_id\" dojoType=\"dijit.form.Select\"\n\t\t\tonchange=\"filterDlgCheckAction(this)\">";
$result = db_query($this->link, "SELECT id,description FROM ttrss_filter_actions\n\t\t\tORDER BY name");
while ($line = db_fetch_assoc($result)) {
$is_sel = $line["id"] == $action_id ? "selected=\"1\"" : "";
printf("<option value='%d' {$is_sel}>%s</option>", $line["id"], __($line["description"]));
}
print "</select>";
$param_hidden = $action_id == 4 || $action_id == 6 || $action_id == 7 ? "" : "display : none";
print "<span id=\"filterDlg_paramBox\" style=\"{$param_hidden}\">";
print " " . __("with parameters:") . " ";
$param_int_hidden = $action_id != 7 ? "" : "display : none";
print "<input style=\"{$param_int_hidden}\"\n\t\t\t\tdojoType=\"dijit.form.TextBox\" id=\"filterDlg_actionParam\"\n\t\t\t\tname=\"action_param\" value=\"{$action_param}\">";
$param_int_hidden = $action_id == 7 ? "" : "display : none";
print_label_select($this->link, "action_param_label", $action_param, "style=\"{$param_int_hidden}\"" . 'id="filterDlg_actionParamLabel" dojoType="dijit.form.Select"');
print "</span>";
print " ";
// tiny layout hack
print "</div>";
print "<div class=\"dlgSec\">" . __("Options") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<div style=\"line-height : 100%\">";
if ($enabled) {
$checked = "checked=\"1\"";
} else {
$checked = "";
}
print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" {$checked}>\n\t\t\t\t<label for=\"enabled\">" . __('Enabled') . "</label><hr/>";
if ($inverse) {
$checked = "checked=\"1\"";
} else {
$checked = "";
}
print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\" {$checked}>\n\t\t\t<label for=\"inverse\">" . __('Inverse match') . "</label><hr/>";
if ($cat_filter) {
$checked = "checked=\"1\"";
} else {
$checked = "";
}
print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"cat_filter\" id=\"cat_filter\" onchange=\"filterDlgCheckCat(this)\" {$checked}>\n\t\t\t\t<label for=\"cat_filter\">" . __('Apply to category') . "</label><hr/>";
print "</div>";
print "</div>";
print "<div class=\"dlgButtons\">";
print "<div style=\"float : left\">";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').removeFilter()\">" . __('Remove') . "</button>";
print "</div>";
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').test()\">" . __('Test') . "</button> ";
//.........这里部分代码省略.........
示例2: batchSubscribe
function batchSubscribe()
{
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchaddfeeds\">";
print "<table width='100%'><tr><td>\n\t\t\t" . __("Add one valid RSS feed per line (no feed detection is done)") . "\n\t\t</td><td align='right'>";
if (get_pref('ENABLE_FEED_CATS')) {
print __('Place in category:') . " ";
print_feed_cat_select("cat", false, 'dojoType="dijit.form.Select"');
}
print "</td></tr><tr><td colspan='2'>";
print "<textarea\n\t\t\tstyle='font-size : 12px; width : 98%; height: 200px;'\n\t\t\tplaceHolder=\"" . __("Feeds to subscribe, One per line") . "\"\n\t\t\tdojoType=\"dijit.form.SimpleTextarea\" required=\"1\" name=\"feeds\"></textarea>";
print "</td></tr><tr><td colspan='2'>";
print "<div id='feedDlg_loginContainer' style='display : none'>\n\t\t\t\t" . " <input dojoType=\"dijit.form.TextBox\" name='login'\"\n\t\t\t\t\tplaceHolder=\"" . __("Login") . "\"\n\t\t\t\t\tstyle=\"width : 10em;\"> " . " <input\n\t\t\t\t\tplaceHolder=\"" . __("Password") . "\"\n\t\t\t\t\tdojoType=\"dijit.form.TextBox\" type='password'\n\t\t\t\t\tstyle=\"width : 10em;\" name='pass'\">" . "</div>";
print "</td></tr><tr><td colspan='2'>";
print "<div style=\"clear : both\">\n\t\t\t<input type=\"checkbox\" name=\"need_auth\" dojoType=\"dijit.form.CheckBox\" id=\"feedDlg_loginCheck\"\n\t\t\t\t\tonclick='checkboxToggleElement(this, \"feedDlg_loginContainer\")'>\n\t\t\t\t<label for=\"feedDlg_loginCheck\">" . __('Feeds require authentication.') . "</div>";
print "</form>";
print "</td></tr></table>";
print "<div class=\"dlgButtons\">\n\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').execute()\">" . __('Subscribe') . "</button>\n\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('batchSubDlg').hide()\">" . __('Cancel') . "</button>\n\t\t\t</div>";
}
示例3: quickAddCat
function quickAddCat()
{
$cat = db_escape_string($_REQUEST["cat"]);
add_feed_category($this->link, $cat);
$result = db_query($this->link, "SELECT id FROM ttrss_feed_categories WHERE\n\t\t\ttitle = '{$cat}' AND owner_uid = " . $_SESSION["uid"]);
if (db_num_rows($result) == 1) {
$id = db_fetch_result($result, 0, "id");
} else {
$id = 0;
}
print_feed_cat_select($this->link, "cat_id", $id);
}
示例4: print_feed_cat_select
function print_feed_cat_select($id, $default_id, $attributes, $include_all_cats = true, $root_id = false, $nest_level = 0)
{
if (!$root_id) {
print "<select id=\"{$id}\" name=\"{$id}\" default=\"{$default_id}\" onchange=\"catSelectOnChange(this)\" {$attributes}>";
}
if ($root_id) {
$parent_qpart = "parent_cat = '{$root_id}'";
} else {
$parent_qpart = "parent_cat IS NULL";
}
$result = db_query("SELECT id,title,\n\t\t\t\t(SELECT COUNT(id) FROM ttrss_feed_categories AS c2 WHERE\n\t\t\t\t\tc2.parent_cat = ttrss_feed_categories.id) AS num_children\n\t\t\t\tFROM ttrss_feed_categories\n\t\t\t\tWHERE owner_uid = " . $_SESSION["uid"] . " AND {$parent_qpart} ORDER BY title");
while ($line = db_fetch_assoc($result)) {
if ($line["id"] == $default_id) {
$is_selected = "selected=\"1\"";
} else {
$is_selected = "";
}
for ($i = 0; $i < $nest_level; $i++) {
$line["title"] = " - " . $line["title"];
}
if ($line["title"]) {
printf("<option {$is_selected} value='%d'>%s</option>", $line["id"], htmlspecialchars($line["title"]));
}
if ($line["num_children"] > 0) {
print_feed_cat_select($id, $default_id, $attributes, $include_all_cats, $line["id"], $nest_level + 1);
}
}
if (!$root_id) {
if ($include_all_cats) {
if (db_num_rows($result) > 0) {
print "<option disabled=\"1\">--------</option>";
}
if ($default_id == 0) {
$is_selected = "selected=\"1\"";
} else {
$is_selected = "";
}
print "<option {$is_selected} value=\"0\">" . __('Uncategorized') . "</option>";
}
print "</select>";
}
}
示例5: quickAddFeed
function quickAddFeed()
{
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"addfeed\">";
print "<div id='fadd_multiple_notify' style='display : none'>";
print_notice("Provided URL is a HTML page referencing multiple feeds, please select required feed from the dropdown menu below.");
print "<p></div>";
print "<div class=\"dlgSec\">" . __("Feed or site URL") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<div style='float : right'>\n\t\t\t<img style='display : none'\n\t\t\t\tid='feed_add_spinner' src='images/indicator_white.gif'></div>";
print "<input style=\"font-size : 16px; width : 20em;\"\n\t\t\tplaceHolder=\"" . __("Feed or site URL") . "\"\n\t\t\tdojoType=\"dijit.form.ValidationTextBox\" required=\"1\" name=\"feed\" id=\"feedDlg_feedUrl\">";
print "<hr/>";
if (get_pref('ENABLE_FEED_CATS')) {
print __('Place in category:') . " ";
print_feed_cat_select("cat", false, 'dojoType="dijit.form.Select"');
}
print "</div>";
print '<div id="feedDlg_feedsContainer" style="display : none">
<div class="dlgSec">' . __('Available feeds') . '</div>
<div class="dlgSecCont">' . '<select id="feedDlg_feedContainerSelect"
dojoType="dijit.form.Select" size="3">
<script type="dojo/method" event="onChange" args="value">
dijit.byId("feedDlg_feedUrl").attr("value", value);
</script>
</select>' . '</div></div>';
print "<div id='feedDlg_loginContainer' style='display : none'>\n\n\t\t\t\t<div class=\"dlgSec\">" . __("Authentication") . "</div>\n\t\t\t\t<div class=\"dlgSecCont\">" . " <input dojoType=\"dijit.form.TextBox\" name='login'\"\n\t\t\t\t\tplaceHolder=\"" . __("Login") . "\"\n\t\t\t\t\tstyle=\"width : 10em;\"> " . " <input\n\t\t\t\t\tplaceHolder=\"" . __("Password") . "\"\n\t\t\t\t\tdojoType=\"dijit.form.TextBox\" type='password'\n\t\t\t\t\tstyle=\"width : 10em;\" name='pass'\">\n\t\t\t</div></div>";
print "<div style=\"clear : both\">\n\t\t\t<input type=\"checkbox\" name=\"need_auth\" dojoType=\"dijit.form.CheckBox\" id=\"feedDlg_loginCheck\"\n\t\t\t\t\tonclick='checkboxToggleElement(this, \"feedDlg_loginContainer\")'>\n\t\t\t\t<label for=\"feedDlg_loginCheck\">" . __('This feed requires authentication.') . "</div>";
print "</form>";
print "<div class=\"dlgButtons\">\n\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedAddDlg').execute()\">" . __('Subscribe') . "</button>";
if (!(defined('_DISABLE_FEED_BROWSER') && _DISABLE_FEED_BROWSER)) {
print "<button dojoType=\"dijit.form.Button\" onclick=\"return feedBrowser()\">" . __('More feeds') . "</button>";
}
print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedAddDlg').hide()\">" . __('Cancel') . "</button>\n\t\t\t</div>";
//return;
}
示例6: editfeeds
function editfeeds()
{
global $purge_intervals;
global $update_intervals;
global $update_methods;
$feed_ids = db_escape_string($_REQUEST["ids"]);
print "<div class=\"dialogNotice\">" . __("Enable the options you wish to apply using checkboxes on the right:") . "</div>";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"ids\" value=\"{$feed_ids}\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"batchEditSave\">";
print "<div class=\"dlgSec\">" . __("Feed") . "</div>";
print "<div class=\"dlgSecCont\">";
/* Title */
print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\tdisabled=\"1\" style=\"font-size : 16px; width : 20em;\" required=\"1\"\n\t\t\tname=\"title\" value=\"{$title}\">";
$this->batch_edit_cbox("title");
/* Feed URL */
print "<br/>";
print __('URL:') . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" disabled=\"1\"\n\t\t\trequired=\"1\" regExp='^(http|https)://.*' style=\"width : 20em\"\n\t\t\tname=\"feed_url\" value=\"{$feed_url}\">";
$this->batch_edit_cbox("feed_url");
/* Category */
if (get_pref($this->link, 'ENABLE_FEED_CATS')) {
print "<br/>";
print __('Place in category:') . " ";
print_feed_cat_select($this->link, "cat_id", $cat_id, 'disabled="1" dojoType="dijit.form.Select"');
$this->batch_edit_cbox("cat_id");
}
print "</div>";
print "<div class=\"dlgSec\">" . __("Update") . "</div>";
print "<div class=\"dlgSecCont\">";
/* Update Interval */
print_select_hash("update_interval", $update_interval, $update_intervals, 'disabled="1" dojoType="dijit.form.Select"');
$this->batch_edit_cbox("update_interval");
/* Update method */
print " " . __('using') . " ";
print_select_hash("update_method", $update_method, $update_methods, 'disabled="1" dojoType="dijit.form.Select"');
$this->batch_edit_cbox("update_method");
/* Purge intl */
if (FORCE_ARTICLE_PURGE == 0) {
print "<br/>";
print __('Article purging:') . " ";
print_select_hash("purge_interval", $purge_interval, $purge_intervals, 'disabled="1" dojoType="dijit.form.Select"');
$this->batch_edit_cbox("purge_interval");
}
print "</div>";
print "<div class=\"dlgSec\">" . __("Authentication") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<input dojoType=\"dijit.form.TextBox\"\n\t\t\tplaceHolder=\"" . __("Login") . "\" disabled=\"1\"\n\t\t\tname=\"auth_login\" value=\"{$auth_login}\">";
$this->batch_edit_cbox("auth_login");
print "<br/><input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"\n\t\t\tplaceHolder=\"" . __("Password") . "\" disabled=\"1\"\n\t\t\tvalue=\"{$auth_pass}\">";
$this->batch_edit_cbox("auth_pass");
print "</div>";
print "<div class=\"dlgSec\">" . __("Options") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<input disabled=\"1\" type=\"checkbox\" name=\"private\" id=\"private\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label id=\"private_l\" class='insensitive' for=\"private\">" . __('Hide from Popular feeds') . "</label>";
print " ";
$this->batch_edit_cbox("private", "private_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"rtl_content\" name=\"rtl_content\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label class='insensitive' id=\"rtl_content_l\" for=\"rtl_content\">" . __('Right-to-left content') . "</label>";
print " ";
$this->batch_edit_cbox("rtl_content", "rtl_content_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"include_in_digest\"\n\t\t\tname=\"include_in_digest\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">" . __('Include in e-mail digest') . "</label>";
print " ";
$this->batch_edit_cbox("include_in_digest", "include_in_digest_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"always_display_enclosures\"\n\t\t\tname=\"always_display_enclosures\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label id=\"always_display_enclosures_l\" class='insensitive' for=\"always_display_enclosures\">" . __('Always display image attachments') . "</label>";
print " ";
$this->batch_edit_cbox("always_display_enclosures", "always_display_enclosures_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"cache_images\"\n\t\t\tname=\"cache_images\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label class='insensitive' id=\"cache_images_l\"\n\t\t\tfor=\"cache_images\">" . __('Cache images locally') . "</label>";
print " ";
$this->batch_edit_cbox("cache_images", "cache_images_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"mark_unread_on_update\"\n\t\t\tname=\"mark_unread_on_update\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label id=\"mark_unread_on_update_l\" class='insensitive' for=\"mark_unread_on_update\">" . __('Mark updated articles as unread') . "</label>";
print " ";
$this->batch_edit_cbox("mark_unread_on_update", "mark_unread_on_update_l");
print "<br/><input disabled=\"1\" type=\"checkbox\" id=\"update_on_checksum_change\"\n\t\t\tname=\"update_on_checksum_change\"\n\t\t\tdojoType=\"dijit.form.CheckBox\"> <label id=\"update_on_checksum_change_l\" class='insensitive' for=\"update_on_checksum_change\">" . __('Mark posts as updated on content change') . "</label>";
print " ";
$this->batch_edit_cbox("update_on_checksum_change", "update_on_checksum_change_l");
print "</div>";
print "<div class='dlgButtons'>\n\t\t\t<button dojoType=\"dijit.form.Button\"\n\t\t\t\tonclick=\"return dijit.byId('feedEditDlg').execute()\">" . __('Save') . "</button>\n\t\t\t<button dojoType=\"dijit.form.Button\"\n\t\t\tonclick=\"return dijit.byId('feedEditDlg').hide()\">" . __('Cancel') . "</button>\n\t\t\t</div>";
return;
}
示例7: module_popup_dialog
//.........这里部分代码省略.........
if ($param == 2) {
$msg = check_for_update($link);
if (!$msg) {
print __("You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug.");
} else {
print $msg;
}
}
if ($param == 3) {
print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner.");
$stamp = (int) read_stampfile("update_daemon.stamp");
print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
}
print "</div>";
print "<div align='center'>";
print "<input class=\"button\"\n\t\t\t\ttype=\"submit\" onclick=\"return closeInfoBox()\" \n\t\t\t\tvalue=\"" . __('Close this window') . "\">";
print "</div></div>";
return;
}
if ($id == "quickAddFeed") {
print "<div id=\"infoBoxTitle\">" . __('Subscribe to Feed') . "</div>";
print "<div class=\"infoBoxContents\">";
print "<form id='feed_add_form' onsubmit='return false'>";
print "<input type=\"hidden\" name=\"op\" value=\"rpc\">";
print "<input type=\"hidden\" name=\"subop\" value=\"addfeed\">";
//print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
print "<div class=\"dlgSec\">" . __("Feed") . "</div>";
print "<div class=\"dlgSecCont\">";
print __("URL:") . " ";
print "<input size=\"40\"\n\t\t\t\t\tonkeypress=\"return filterCR(event, subscribeToFeed)\"\n\t\t\t\t\tname=\"feed\" id=\"feed_url\"></td></tr>";
print "<br/>";
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print __('Place in category:') . " ";
print_feed_cat_select($link, "cat");
}
print "</div>";
print "<div id='fadd_login_container' style='display:none'>\n\t\n\t\t\t\t\t<div class=\"dlgSec\">" . __("Authentication") . "</div>\n\t\t\t\t\t<div class=\"dlgSecCont\">" . __('Login:') . " <input name='login' size=\"20\" \n\t\t\t\t\t\t\tonkeypress=\"return filterCR(event, subscribeToFeed)\"> " . __('Password:') . "<input type='password'\n\t\t\t\t\t\t\tname='pass' size=\"20\" \n\t\t\t\t\t\t\tonkeypress=\"return filterCR(event, subscribeToFeed)\">\n\t\t\t\t</div></div>";
print "<div style=\"clear : both\">\t\t\t\t\n\t\t\t\t<input type=\"checkbox\" id=\"fadd_login_check\" \n\t\t\t\t\t\tonclick='checkboxToggleElement(this, \"fadd_login_container\")'>\n\t\t\t\t\t<label for=\"fadd_login_check\">" . __('This feed requires authentication.') . "</div>";
print "</form>";
print "<div class=\"dlgButtons\">\n\t\t\t\t<button class=\"button\" id=\"fadd_submit_btn\"\n\t\t\t\t\tonclick=\"return subscribeToFeed()\">" . __('Subscribe') . "</button>\n\t\t\t\t<button onclick=\"return displayDlg('feedBrowser')\">" . __('More feeds') . "</button>\n\t\t\t\t<button onclick=\"return closeInfoBox()\">" . __('Cancel') . "</button></div>";
return;
}
if ($id == "feedBrowser") {
print "<div id=\"infoBoxTitle\">" . __('Feed Browser') . "</div>";
print "<div class=\"infoBoxContents\">";
$browser_search = db_escape_string($_REQUEST["search"]);
print "<form onsubmit='return false;' display='inline' \n\t\t\t\tname='feed_browser' id='feed_browser'>";
print "<input type=\"hidden\" name=\"op\" value=\"rpc\">";
print "<input type=\"hidden\" name=\"subop\" value=\"updateFeedBrowser\">";
print "\n\t\t\t\t<div style='float : right'>\n\t\t\t\t<img style='display : none' \n\t\t\t\t\tid='feed_browser_spinner' src='" . theme_image($link, 'images/indicator_white.gif') . "'>\n\t\t\t\t<input name=\"search\" size=\"20\" type=\"search\"\n\t\t\t\t\tonchange=\"javascript:updateFeedBrowser()\" value=\"{$browser_search}\">\n\t\t\t\t<button onclick=\"javascript:updateFeedBrowser()\">" . __('Search') . "</button>\n\t\t\t</div>";
print " <select name=\"mode\" onchange=\"updateFeedBrowser()\">\n\t\t\t\t<option value='1'>" . __('Popular feeds') . "</option>\n\t\t\t\t<option value='2'>" . __('Feed archive') . "</option>\n\t\t\t\t</select> ";
print __("limit:");
print " <select name=\"limit\" onchange='updateFeedBrowser()'>";
foreach (array(25, 50, 100, 200) as $l) {
$issel = $l == $limit ? "selected" : "";
print "<option {$issel}>{$l}</option>";
}
print "</select> ";
print "<p>";
$owner_uid = $_SESSION["uid"];
/* print __('Select:')."
<a href=\"javascript:selectPrefRows('fbrowse', true)\">".__('All')."</a>,
<a href=\"javascript:selectPrefRows('fbrowse', false)\">".__('None')."</a>"; */
print "<ul class='browseFeedList' id='browseFeedList'>";
print_feed_browser($link, $search, 25);
print "</ul>";
示例8: module_popup_dialog
//.........这里部分代码省略.........
print "]]></content>";
//return;
}
if ($id == "explainError") {
print "<title>" . __('Notice') . "</title>";
print "<content><![CDATA[";
print "<div class=\"errorExplained\">";
if ($param == 1) {
print __("Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner.");
$stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp");
print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
}
if ($param == 3) {
print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner.");
$stamp = (int) file_get_contents(LOCK_DIRECTORY . "/update_daemon.stamp");
print "<p>" . __("Last update:") . " " . date("Y.m.d, G:i", $stamp);
}
print "</div>";
print "<div align='center'>";
print "<button onclick=\"return closeInfoBox()\">" . __('Close this window') . "</button>";
print "</div>";
print "]]></content>";
//return;
}
if ($id == "quickAddFeed") {
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"addfeed\">";
print "<div class=\"dlgSec\">" . __("Feed") . "</div>";
print "<div class=\"dlgSecCont\">";
print "<input style=\"font-size : 16px; width : 20em;\"\n\t\t\t\tplaceHolder=\"" . __("Feed URL") . "\"\n\t\t\t\tdojoType=\"dijit.form.ValidationTextBox\" required=\"1\" name=\"feed\" id=\"feedDlg_feedUrl\">";
print "<hr/>";
if (get_pref($link, 'ENABLE_FEED_CATS')) {
print __('Place in category:') . " ";
print_feed_cat_select($link, "cat", false, 'dojoType="dijit.form.Select"');
}
print "</div>";
print '<div id="feedDlg_feedsContainer" style="display : none">
<div class="dlgSec">' . __('Available feeds') . '</div>
<div class="dlgSecCont">' . '<select id="feedDlg_feedContainerSelect"
dojoType="dijit.form.Select" size="3">
<script type="dojo/method" event="onChange" args="value">
dijit.byId("feedDlg_feedUrl").attr("value", value);
</script>
</select>' . '</div></div>';
print "<div id='feedDlg_loginContainer' style='display : none'>\n\n\t\t\t\t\t<div class=\"dlgSec\">" . __("Authentication") . "</div>\n\t\t\t\t\t<div class=\"dlgSecCont\">" . " <input dojoType=\"dijit.form.TextBox\" name='login'\"\n\t\t\t\t\t\tplaceHolder=\"" . __("Login") . "\"\n\t\t\t\t\t\tstyle=\"width : 10em;\"> " . " <input\n\t\t\t\t\t\tplaceHolder=\"" . __("Password") . "\"\n\t\t\t\t\t\tdojoType=\"dijit.form.TextBox\" type='password'\n\t\t\t\t\t\tstyle=\"width : 10em;\" name='pass'\">\n\t\t\t\t</div></div>";
print "<div style=\"clear : both\">\n\t\t\t\t<input type=\"checkbox\" dojoType=\"dijit.form.CheckBox\" id=\"feedDlg_loginCheck\"\n\t\t\t\t\t\tonclick='checkboxToggleElement(this, \"feedDlg_loginContainer\")'>\n\t\t\t\t\t<label for=\"feedDlg_loginCheck\">" . __('This feed requires authentication.') . "</div>";
print "</form>";
print "<div class=\"dlgButtons\">\n\t\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedAddDlg').execute()\">" . __('Subscribe') . "</button>\n\t\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return feedBrowser()\">" . __('More feeds') . "</button>\n\t\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('feedAddDlg').hide()\">" . __('Cancel') . "</button>\n\t\t\t\t</div>";
//return;
}
if ($id == "feedBrowser") {
$browser_search = db_escape_string($_REQUEST["search"]);
# print "<form onsubmit='return false;' display='inline'
# name='feed_browser' id='feed_browser'>";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"rpc\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"updateFeedBrowser\">";
print "<div dojoType=\"dijit.Toolbar\">\n\t\t\t\t<div style='float : right'>\n\t\t\t\t<img style='display : none'\n\t\t\t\t\tid='feed_browser_spinner' src='" . theme_image($link, 'images/indicator_white.gif') . "'>\n\t\t\t\t<input name=\"search\" dojoType=\"dijit.form.TextBox\" size=\"20\" type=\"search\"\n\t\t\t\t\tonchange=\"dijit.byId('feedBrowserDlg').update()\" value=\"{$browser_search}\">\n\t\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('feedBrowserDlg').update()\">" . __('Search') . "</button>\n\t\t\t</div>";
print " <select name=\"mode\" dojoType=\"dijit.form.Select\" onchange=\"dijit.byId('feedBrowserDlg').update()\">\n\t\t\t\t<option value='1'>" . __('Popular feeds') . "</option>\n\t\t\t\t<option value='2'>" . __('Feed archive') . "</option>\n\t\t\t\t</select> ";
print __("limit:");
print " <select dojoType=\"dijit.form.Select\" name=\"limit\" onchange=\"dijit.byId('feedBrowserDlg').update()\">";
foreach (array(25, 50, 100, 200) as $l) {
$issel = $l == $limit ? "selected=\"1\"" : "";
print "<option {$issel} value=\"{$l}\">{$l}</option>";
}
print "</select> ";
示例9: quickAddCat
function quickAddCat()
{
$cat = $this->dbh->escape_string($_REQUEST["cat"]);
add_feed_category($cat);
$result = $this->dbh->query("SELECT id FROM ttrss_feed_categories WHERE\n title = '{$cat}' AND owner_uid = " . $_SESSION["uid"]);
if ($this->dbh->num_rows($result) == 1) {
$id = $this->dbh->fetch_result($result, 0, "id");
} else {
$id = 0;
}
print_feed_cat_select("cat_id", $id, '');
}
示例10: module_pref_feeds
//.........这里部分代码省略.........
$icon_file = ICONS_DIR . "/{$feed_id}.ico";
if (file_exists($icon_file) && filesize($icon_file) > 0) {
$feed_icon = "<img width=\"16\" height=\"16\"\n\t\t\t\t\t\tsrc=\"" . ICONS_URL . "/{$feed_id}.ico\">";
} else {
$feed_icon = "";
}
print "<div id=\"infoBoxTitle\">" . __('Feed Editor') . "</div>";
print "<div class=\"infoBoxContents\">";
print "<form id=\"edit_feed_form\" onsubmit=\"return false\">";
print "<input type=\"hidden\" name=\"id\" value=\"{$feed_id}\">";
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
print "<div class=\"dlgSec\">" . __("Feed") . "</div>";
print "<div class=\"dlgSecCont\">";
/* Title */
print "<input style=\"font-size : 16px\" size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"\n\t\t\t\t name=\"title\" value=\"{$title}\">";
/* Feed URL */
$feed_url = db_fetch_result($result, 0, "feed_url");
$feed_url = htmlspecialchars(db_fetch_result($result, 0, "feed_url"));
print "<br/>";
print __('URL:') . " ";
print "<input size=\"40\" onkeypress=\"return filterCR(event, feedEditSave)\"\n\t\t\t\tname=\"feed_url\" value=\"{$feed_url}\">";
/* Category */
if (get_pref($link, 'ENABLE_FEED_CATS')) {
$cat_id = db_fetch_result($result, 0, "cat_id");
print "<br/>";
print __('Place in category:') . " ";
$parent_feed = db_fetch_result($result, 0, "parent_feed");
if (sprintf("%d", $parent_feed) > 0) {
$disabled = "disabled";
} else {
$disabled = "";
}
print_feed_cat_select($link, "cat_id", $cat_id, $disabled);
}
/* Link to */
print "<br/>";
print __('Link to feed:') . " ";
$tmp_result = db_query($link, "SELECT COUNT(id) AS count\n\t\t\t\tFROM ttrss_feeds WHERE parent_feed = '{$feed_id}'");
$linked_count = db_fetch_result($tmp_result, 0, "count");
$parent_feed = db_fetch_result($result, 0, "parent_feed");
if ($linked_count > 0) {
$disabled = "disabled";
} else {
$disabled = "";
}
print "<select {$disabled} name=\"parent_feed\">";
print "<option value=\"0\">" . __('Not linked') . "</option>";
if (get_pref($link, 'ENABLE_FEED_CATS')) {
if ($cat_id) {
$cat_qpart = "AND cat_id = '{$cat_id}'";
} else {
$cat_qpart = "AND cat_id IS NULL";
}
}
$tmp_result = db_query($link, "SELECT id,title FROM ttrss_feeds\n\t\t\t\tWHERE id != '{$feed_id}' AND owner_uid = " . $_SESSION["uid"] . " AND\n\t\t\t \t\t(SELECT COUNT(id) FROM ttrss_feeds AS T2 WHERE T2.id = ttrss_feeds.parent_feed) = 0\n\t\t\t\t\t{$cat_qpart} ORDER BY title");
if (db_num_rows($tmp_result) > 0) {
print "<option disabled>--------</option>";
}
while ($tmp_line = db_fetch_assoc($tmp_result)) {
if ($tmp_line["id"] == $parent_feed) {
$is_selected = "selected";
} else {
$is_selected = "";
}
$linked_title = truncate_string(htmlspecialchars($tmp_line["title"]), 40);
示例11: module_pref_feeds
//.........这里部分代码省略.........
$rc = 2;
}
print "<script type=\"text/javascript\">";
print "parent.uploadIconHandler({$rc});";
print "</script>";
return;
}
if ($subop == "editfeed") {
$feed_id = db_escape_string($_REQUEST["id"]);
$result = db_query($link, "SELECT * FROM ttrss_feeds WHERE id = '{$feed_id}' AND\n\t\t\t\t\towner_uid = " . $_SESSION["uid"]);
$title = htmlspecialchars(db_fetch_result($result, 0, "title"));
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"{$feed_id}\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-feeds\">";
print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"subop\" value=\"editSave\">";
print "<div class=\"dlgSec\">" . __("Feed") . "</div>";
print "<div class=\"dlgSecCont\">";
/* Title */
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"\n\t\t\t\tplaceHolder=\"" . __("Feed Title") . "\"\n\t\t\t\tstyle=\"font-size : 16px; width: 20em\" name=\"title\" value=\"{$title}\">";
/* Feed URL */
$feed_url = db_fetch_result($result, 0, "feed_url");
$feed_url = htmlspecialchars(db_fetch_result($result, 0, "feed_url"));
print "<hr/>";
print __('URL:') . " ";
print "<input dojoType=\"dijit.form.ValidationTextBox\" required=\"1\"\n\t\t\t\tplaceHolder=\"" . __("Feed URL") . "\"\n\t\t\t\tregExp='^(http|https)://.*' style=\"width : 20em\"\n\t\t\t\tname=\"feed_url\" value=\"{$feed_url}\">";
$last_error = db_fetch_result($result, 0, "last_error");
if ($last_error) {
print " <span title=\"" . htmlspecialchars($last_error) . "\"\n\t\t\t\t\tclass=\"feed_error\">(error)</span>";
}
/* Category */
if (get_pref($link, 'ENABLE_FEED_CATS')) {
$cat_id = db_fetch_result($result, 0, "cat_id");
print "<hr/>";
print __('Place in category:') . " ";
print_feed_cat_select($link, "cat_id", $cat_id, 'dojoType="dijit.form.Select"');
}
print "</div>";
print "<div class=\"dlgSec\">" . __("Update") . "</div>";
print "<div class=\"dlgSecCont\">";
/* Update Interval */
$update_interval = db_fetch_result($result, 0, "update_interval");
print_select_hash("update_interval", $update_interval, $update_intervals, 'dojoType="dijit.form.Select"');
/* Update method */
$update_method = db_fetch_result($result, 0, "update_method", 'dojoType="dijit.form.Select"');
print " " . __('using') . " ";
print_select_hash("update_method", $update_method, $update_methods, 'dojoType="dijit.form.Select"');
$purge_interval = db_fetch_result($result, 0, "purge_interval");
/* Purge intl */
print "<hr/>";
print __('Article purging:') . " ";
print_select_hash("purge_interval", $purge_interval, $purge_intervals, 'dojoType="dijit.form.Select" ' . (FORCE_ARTICLE_PURGE == 0 ? "" : 'disabled="1"'));
print "</div>";
print "<div class=\"dlgSec\">" . __("Authentication") . "</div>";
print "<div class=\"dlgSecCont\">";
$auth_login = htmlspecialchars(db_fetch_result($result, 0, "auth_login"));
# print "<table>";
# print "<tr><td>" . __('Login:') . "</td><td>";
print "<input dojoType=\"dijit.form.TextBox\" id=\"feedEditDlg_login\"\n\t\t\t\tplaceHolder=\"" . __("Login") . "\"\n\t\t\t\tname=\"auth_login\" value=\"{$auth_login}\"><hr/>";
# print "</tr><tr><td>" . __("Password:") . "</td><td>";
$auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
print "<input dojoType=\"dijit.form.TextBox\" type=\"password\" name=\"auth_pass\"\n\t\t\t\tplaceHolder=\"" . __("Password") . "\"\n\t\t\t\tvalue=\"{$auth_pass}\">";
print "<div dojoType=\"dijit.Tooltip\" connectId=\"feedEditDlg_login\" position=\"below\">\n\t\t\t\t" . __('<b>Hint:</b> you need to fill in your login information if your feed requires authentication, except for Twitter feeds.') . "\n\t\t\t\t</div>";
# print "</td></tr></table>";
print "</div>";
print "<div class=\"dlgSec\">" . __("Options") . "</div>";
print "<div class=\"dlgSecCont\">";
# print "<div style=\"line-height : 100%\">";