当前位置: 首页>>代码示例>>PHP>>正文


PHP print_select_hash函数代码示例

本文整理汇总了PHP中print_select_hash函数的典型用法代码示例。如果您正苦于以下问题:PHP print_select_hash函数的具体用法?PHP print_select_hash怎么用?PHP print_select_hash使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了print_select_hash函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: edit

 function edit()
 {
     global $access_level_names;
     print '<div dojoType="dijit.layout.TabContainer" style="height : 400px">
     		<div dojoType="dijit.layout.ContentPane" title="' . __('Edit user') . '">';
     print "<form id=\"user_edit_form\" onsubmit='return false' dojoType=\"dijit.form.Form\">";
     $id = (int) $this->dbh->escape_string($_REQUEST["id"]);
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"id\" value=\"{$id}\">";
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-users\">";
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"editSave\">";
     $result = $this->dbh->query("SELECT * FROM ttrss_users WHERE id = '{$id}'");
     $login = $this->dbh->fetch_result($result, 0, "login");
     $access_level = $this->dbh->fetch_result($result, 0, "access_level");
     $email = $this->dbh->fetch_result($result, 0, "email");
     $sel_disabled = $id == $_SESSION["uid"] ? "disabled" : "";
     print "<div class=\"dlgSec\">" . __("User") . "</div>";
     print "<div class=\"dlgSecCont\">";
     if ($sel_disabled) {
         print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"login\" value=\"{$login}\">";
     }
     print "<input size=\"30\" style=\"font-size : 16px\"\n\t\t\t\tdojoType=\"dijit.form.ValidationTextBox\" required=\"1\"\n\t\t\t\t{$sel_disabled}\n\t\t\t\tname=\"login\" value=\"{$login}\">";
     print "</div>";
     print "<div class=\"dlgSec\">" . __("Authentication") . "</div>";
     print "<div class=\"dlgSecCont\">";
     print __('Access level: ') . " ";
     if (!$sel_disabled) {
         print_select_hash("access_level", $access_level, $access_level_names, "dojoType=\"dijit.form.Select\" {$sel_disabled}");
     } else {
         print_select_hash("", $access_level, $access_level_names, "dojoType=\"dijit.form.Select\" {$sel_disabled}");
         print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"access_level\" value=\"{$access_level}\">";
     }
     print "<hr/>";
     print "<input dojoType=\"dijit.form.TextBox\" type=\"password\" size=\"20\" placeholder=\"Change password\"\n\t\t\t\tname=\"password\">";
     print "</div>";
     print "<div class=\"dlgSec\">" . __("Options") . "</div>";
     print "<div class=\"dlgSecCont\">";
     print "<input dojoType=\"dijit.form.TextBox\" size=\"30\" name=\"email\" placeholder=\"E-mail\"\n\t\t\t\tvalue=\"{$email}\">";
     print "</div>";
     print "</table>";
     print "</form>";
     print '</div>';
     #tab
     print "<div href=\"backend.php?op=pref-users&method=userdetails&id={$id}\"\n\t\t\t\tdojoType=\"dijit.layout.ContentPane\" title=\"" . __('User details') . "\">";
     print '</div>';
     print '</div>';
     print "<div class=\"dlgButtons\">\n\t\t\t\t<button dojoType=\"dijit.form.Button\" type=\"submit\">" . __('Save') . "</button>\n\t\t\t\t<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('userEditDlg').hide()\">" . __('Cancel') . "</button></div>";
     return;
 }
开发者ID:XelaRellum,项目名称:tt-rss,代码行数:48,代码来源:users.php

示例2: hook_prefs_edit_feed

 function hook_prefs_edit_feed($feed_id)
 {
     print "<div class=\"dlgSec\">" . __("Feed content") . "</div>";
     print "<div class=\"dlgSecCont\">";
     $contPref = db_query("SELECT mobilizer_id from plugin_mobilize_feeds where id = '{$feed_id}' AND\n\t\t\t\towner_uid = " . $_SESSION["uid"]);
     $mobilizer_id = 0;
     if (db_num_rows($contPref) != 0) {
         $mobilizer_id = db_fetch_result($contPref, 0, "mobilizer_id");
     }
     $contResult = db_query("SELECT id,description from plugin_mobilize_mobilizers order by id");
     while ($line = db_fetch_assoc($contResult)) {
         $mobilizer_ids[$line["id"]] = $line["description"];
     }
     print_select_hash("mobilizer_id", $mobilizer_id, $mobilizer_ids, 'dojoType="dijit.form.Select"');
     print "</div>";
 }
开发者ID:bright-spark,项目名称:tt-rss-mobilize,代码行数:16,代码来源:init.php

示例3: newrule

 function newrule()
 {
     $rule = json_decode($_REQUEST["rule"], true);
     if ($rule) {
         $reg_exp = htmlspecialchars($rule["reg_exp"]);
         $filter_type = $rule["filter_type"];
         $feed_id = $rule["feed_id"];
         $inverse_checked = isset($rule["inverse"]) ? "checked" : "";
     } else {
         $reg_exp = "";
         $filter_type = 1;
         $feed_id = 0;
         $inverse_checked = "";
     }
     if (strpos($feed_id, "CAT:") === 0) {
         $feed_id = substr($feed_id, 4);
         $cat_filter = true;
     } else {
         $cat_filter = false;
     }
     print "<form name='filter_new_rule_form' id='filter_new_rule_form'>";
     $result = $this->dbh->query("SELECT id,description\n\t\t\tFROM ttrss_filter_types WHERE id != 5 ORDER BY description");
     $filter_types = array();
     while ($line = $this->dbh->fetch_assoc($result)) {
         $filter_types[$line["id"]] = __($line["description"]);
     }
     print "<div class=\"dlgSec\">" . __("Match") . "</div>";
     print "<div class=\"dlgSecCont\">";
     print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t required=\"true\" id=\"filterDlg_regExp\"\n\t\t\t style=\"font-size : 16px; width : 20em;\"\n\t\t\t name=\"reg_exp\" value=\"{$reg_exp}\"/>";
     print "<hr/>";
     print "<input id=\"filterDlg_inverse\" dojoType=\"dijit.form.CheckBox\"\n\t\t\t name=\"inverse\" {$inverse_checked}/>";
     print "<label for=\"filterDlg_inverse\">" . __("Inverse regular expression matching") . "</label>";
     print "<hr/>" . __("on field") . " ";
     print_select_hash("filter_type", $filter_type, $filter_types, 'dojoType="dijit.form.Select"');
     print "<hr/>";
     print __("in") . " ";
     print "<span id='filterDlg_feeds'>";
     print_feed_select("feed_id", $cat_filter ? "CAT:{$feed_id}" : $feed_id, 'dojoType="dijit.form.FilteringSelect"');
     print "</span>";
     print "</div>";
     print "<div class=\"dlgButtons\">";
     print "<div style=\"float : left\">\n\t\t\t<a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/wiki/ContentFilters\">" . __("Wiki: Filters") . "</a>\n\t\t</div>";
     print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewRuleDlg').execute()\">" . ($rule ? __("Save rule") : __('Add rule')) . "</button> ";
     print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterNewRuleDlg').hide()\">" . __('Cancel') . "</button>";
     print "</div>";
     print "</form>";
 }
开发者ID:zamentur,项目名称:ttrss_ynh,代码行数:47,代码来源:filters.php

示例4: module_popup_dialog


//.........这里部分代码省略.........
        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>";
        print "<div align='center'>\n\t\t\t\t<button onclick=\"feedBrowserSubscribe()\">" . __('Subscribe') . "</button>\n\t\t\t\t<button style='display : none' id='feed_archive_remove' onclick=\"feedArchiveRemove()\">" . __('Remove') . "</button>\n\t\t\t\t<button onclick=\"closeInfoBox()\" >" . __('Cancel') . "</button></div>";
        print "</div>";
        return;
    }
    if ($id == "search") {
        print "<div id=\"infoBoxTitle\">" . __('Search') . "</div>";
        print "<div class=\"infoBoxContents\">";
        print "<form id='search_form'  onsubmit='return false'>";
        #$active_feed_id = db_escape_string($_REQUEST["param"]);
        $params = split(":", db_escape_string($_REQUEST["param"]));
        $active_feed_id = sprintf("%d", $params[0]);
        $is_cat = $params[1] == "true";
        print "<div class=\"dlgSec\">" . __('Look for') . "</div>";
        print "<div class=\"dlgSecCont\">";
        print "<input onkeypress=\"return filterCR(event, search)\"\n\t\t\t\tname=\"query\" size=\"20\" type=\"search\"\tvalue=''>";
        print " " . __('match on') . " ";
        $search_fields = array("title" => __("Title"), "content" => __("Content"), "both" => __("Title or content"));
        print_select_hash("match_on", 3, $search_fields);
        print "<br/>" . __('Limit search to:') . " ";
        print "<select name=\"search_mode\">\n\t\t\t\t<option value=\"all_feeds\">" . __('All feeds') . "</option>";
        $feed_title = getFeedTitle($link, $active_feed_id);
        if (!$is_cat) {
            $feed_cat_title = getFeedCatTitle($link, $active_feed_id);
        } else {
            $feed_cat_title = getCategoryTitle($link, $active_feed_id);
        }
        if ($active_feed_id && !$is_cat) {
            print "<option selected value=\"this_feed\">{$feed_title}</option>";
        } else {
            print "<option disabled>" . __('This feed') . "</option>";
        }
        if ($is_cat) {
            $cat_preselected = "selected";
        }
        if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) {
            print "<option {$cat_preselected} value=\"this_cat\">{$feed_cat_title}</option>";
        } else {
            //print "<option disabled>".__('This category')."</option>";
        }
        print "</select>";
        print "</div>";
        print "</form>";
        print "<div class=\"dlgButtons\">\n\t\t\t<button onclick=\"javascript:search()\">" . __('Search') . "</button>\n\t\t\t<button onclick=\"javascript:closeInfoBox(true)\">" . __('Cancel') . "</button>\n\t\t\t</div>";
        print "</div>";
        return;
    }
    if ($id == "quickAddFilter") {
        $active_feed_id = db_escape_string($_REQUEST["param"]);
        print "<div id=\"infoBoxTitle\">" . __('Create Filter') . "</div>";
        print "<div class=\"infoBoxContents\">";
开发者ID:buggithubs,项目名称:Tiny-Tiny-RSS,代码行数:67,代码来源:popup-dialog.php

示例5: quickAddFilter

 function quickAddFilter()
 {
     $active_feed_id = db_escape_string($_REQUEST["param"]);
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-filters\">";
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"quiet\" value=\"1\">";
     print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"add\">";
     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\">";
     print "<span id=\"filterDlg_dateModBox\" style=\"display : none\">";
     $filter_params = array("before" => __("before"), "after" => __("after"));
     print_select_hash("filter_date_modifier", "before", $filter_params, 'dojoType="dijit.form.Select"');
     print "&nbsp;</span>";
     print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t required=\"true\" id=\"filterDlg_regExp\"\n\t\t\t style=\"font-size : 16px\"\n\t\t\t name=\"reg_exp\" value=\"{$reg_exp}\"/>";
     print "<span id=\"filterDlg_dateChkBox\" style=\"display : none\">";
     print "&nbsp;<button dojoType=\"dijit.form.Button\"\n\t\t\tonclick=\"return filterDlgCheckDate()\">" . __('Check it') . "</button>";
     print "</span>";
     print "<hr/>" . __("on field") . " ";
     print_select_hash("filter_type", 1, $filter_types, 'onchange="filterDlgCheckType(this)" dojoType="dijit.form.Select"');
     print "<hr/>";
     print __("in") . " ";
     print "<span id='filterDlg_feeds'>";
     print_feed_select($this->link, "feed_id", $active_feed_id, 'dojoType="dijit.form.FilteringSelect"');
     print "</span>";
     print "<span id='filterDlg_cats' style='display : none'>";
     print_feed_cat_select($this->link, "cat_id", $active_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)) {
         printf("<option value='%d'>%s</option>", $line["id"], __($line["description"]));
     }
     print "</select>";
     print "<span id=\"filterDlg_paramBox\" style=\"display : none\">";
     print " " . __("with parameters:") . " ";
     print "<input dojoType=\"dijit.form.TextBox\"\n\t\t\tid=\"filterDlg_actionParam\"\n\t\t\tname=\"action_param\">";
     print_label_select($this->link, "action_param_label", $action_param, 'id="filterDlg_actionParamLabel" dojoType="dijit.form.Select"');
     print "</span>";
     print "&nbsp;";
     // tiny layout hack
     print "</div>";
     print "<div class=\"dlgSec\">" . __("Options") . "</div>";
     print "<div class=\"dlgSecCont\">";
     print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"enabled\" id=\"enabled\" checked=\"1\">\n\t\t\t\t<label for=\"enabled\">" . __('Enabled') . "</label><hr/>";
     print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"inverse\" id=\"inverse\">\n\t\t\t<label for=\"inverse\">" . __('Inverse match') . "</label><hr/>";
     print "<input dojoType=\"dijit.form.CheckBox\" type=\"checkbox\" name=\"cat_filter\" id=\"cat_filter\" onchange=\"filterDlgCheckCat(this)\">\n\t\t\t\t<label for=\"cat_filter\">" . __('Apply to category') . "</label><hr/>";
     print "</div>";
     print "<div class=\"dlgButtons\">";
     print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').test()\">" . __('Test') . "</button> ";
     print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').execute()\">" . __('Create') . "</button> ";
     print "<button dojoType=\"dijit.form.Button\" onclick=\"return dijit.byId('filterEditDlg').hide()\">" . __('Cancel') . "</button>";
     print "</div>";
 }
开发者ID:4iji,项目名称:Tiny-Tiny-RSS,代码行数:62,代码来源:dlg.php

示例6: 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 "&nbsp;</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 "&nbsp;<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 "&nbsp;";
     // 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> ";
//.........这里部分代码省略.........
开发者ID:4iji,项目名称:Tiny-Tiny-RSS,代码行数:101,代码来源:pref_filters.php

示例7: 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\">&nbsp;<label id=\"private_l\" class='insensitive' for=\"private\">" . __('Hide from Popular feeds') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label class='insensitive' id=\"rtl_content_l\" for=\"rtl_content\">" . __('Right-to-left content') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label id=\"include_in_digest_l\" class='insensitive' for=\"include_in_digest\">" . __('Include in e-mail digest') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label id=\"always_display_enclosures_l\" class='insensitive' for=\"always_display_enclosures\">" . __('Always display image attachments') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label class='insensitive' id=\"cache_images_l\"\n\t\t\tfor=\"cache_images\">" . __('Cache images locally') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label id=\"mark_unread_on_update_l\" class='insensitive' for=\"mark_unread_on_update\">" . __('Mark updated articles as unread') . "</label>";
     print "&nbsp;";
     $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\">&nbsp;<label id=\"update_on_checksum_change_l\" class='insensitive' for=\"update_on_checksum_change\">" . __('Mark posts as updated on content change') . "</label>";
     print "&nbsp;";
     $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;
 }
开发者ID:4iji,项目名称:Tiny-Tiny-RSS,代码行数:79,代码来源:pref_feeds.php

示例8: index


//.........这里部分代码省略.........
         }
         $type_name = $line["type_name"];
         $pref_name = $line["pref_name"];
         $section_name = $this->getSectionName($line["section_id"]);
         $value = $line["value"];
         $short_desc = $this->getShortDesc($pref_name);
         $help_text = $this->getHelpText($pref_name);
         if (!$short_desc) {
             continue;
         }
         if ($_SESSION["profile"] && in_array($line["pref_name"], $profile_blacklist)) {
             continue;
         }
         if ($active_section != $line["section_id"]) {
             if ($active_section != "") {
                 print "</table>";
             }
             print "<table width=\"100%\" class=\"prefPrefsList\">";
             $active_section = $line["section_id"];
             print "<tr><td colspan=\"3\"><h3>" . $section_name . "</h3></td></tr>";
             $lnum = 0;
         }
         print "<tr>";
         print "<td width=\"40%\" class=\"prefName\" id=\"{$pref_name}\">";
         print "<label for='CB_{$pref_name}'>";
         print $short_desc;
         print "</label>";
         if ($help_text) {
             print "<div class=\"prefHelp\">" . __($help_text) . "</div>";
         }
         print "</td>";
         print "<td class=\"prefValue\">";
         if ($pref_name == "USER_LANGUAGE") {
             print_select_hash($pref_name, $value, get_translations(), "style='width : 220px; margin : 0px' dojoType='dijit.form.Select'");
         } else {
             if ($pref_name == "USER_TIMEZONE") {
                 $timezones = explode("\n", file_get_contents("lib/timezones.txt"));
                 print_select($pref_name, $value, $timezones, 'dojoType="dijit.form.FilteringSelect"');
             } else {
                 if ($pref_name == "USER_STYLESHEET") {
                     print "<button dojoType=\"dijit.form.Button\"\n\t\t\t\t\tonclick=\"customizeCSS()\">" . __('Customize') . "</button>";
                 } else {
                     if ($pref_name == "USER_CSS_THEME") {
                         $themes = array_map("basename", glob("themes/*.css"));
                         print_select($pref_name, $value, $themes, 'dojoType="dijit.form.Select"');
                     } else {
                         if ($pref_name == "DEFAULT_UPDATE_INTERVAL") {
                             global $update_intervals_nodefault;
                             print_select_hash($pref_name, $value, $update_intervals_nodefault, 'dojoType="dijit.form.Select"');
                         } else {
                             if ($type_name == "bool") {
                                 array_push($listed_boolean_prefs, $pref_name);
                                 $checked = $value == "true" ? "checked=\"checked\"" : "";
                                 if ($pref_name == "PURGE_UNREAD_ARTICLES" && FORCE_ARTICLE_PURGE != 0) {
                                     $disabled = "disabled=\"1\"";
                                     $checked = "checked=\"checked\"";
                                 } else {
                                     $disabled = "";
                                 }
                                 print "<input type='checkbox' name='{$pref_name}' {$checked} {$disabled}\n\t\t\t\t\tdojoType='dijit.form.CheckBox' id='CB_{$pref_name}' value='1'>";
                             } else {
                                 if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'PURGE_OLD_DAYS', 'LONG_DATE_FORMAT', 'SHORT_DATE_FORMAT')) !== false) {
                                     $regexp = $type_name == 'integer' ? 'regexp="^\\d*$"' : '';
                                     if ($pref_name == "PURGE_OLD_DAYS" && FORCE_ARTICLE_PURGE != 0) {
                                         $disabled = "disabled=\"1\"";
                                         $value = FORCE_ARTICLE_PURGE;
开发者ID:bohoo,项目名称:tiny_tiny_rss-openshift-quickstart-2,代码行数:67,代码来源:prefs.php

示例9: search

 function search()
 {
     $this->params = explode(":", db_escape_string($_REQUEST["param"]), 2);
     $active_feed_id = sprintf("%d", $this->params[0]);
     $is_cat = $this->params[1] != "false";
     print "<div class=\"dlgSec\">" . __('Look for') . "</div>";
     print "<div class=\"dlgSecCont\">";
     if (!SPHINX_ENABLED) {
         print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t\tstyle=\"font-size : 16px; width : 12em;\"\n\t\t\t\trequired=\"1\" name=\"query\" type=\"search\" value=''>";
         print " " . __('match on') . " ";
         $search_fields = array("title" => __("Title"), "content" => __("Content"), "both" => __("Title or content"));
         print_select_hash("match_on", 3, $search_fields, 'dojoType="dijit.form.Select"');
     } else {
         print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t\tstyle=\"font-size : 16px; width : 20em;\"\n\t\t\t\trequired=\"1\" name=\"query\" type=\"search\" value=''>";
     }
     print "<hr/>" . __('Limit search to:') . " ";
     print "<select name=\"search_mode\" dojoType=\"dijit.form.Select\">\n\t\t\t<option value=\"all_feeds\">" . __('All feeds') . "</option>";
     $feed_title = getFeedTitle($this->link, $active_feed_id);
     if (!$is_cat) {
         $feed_cat_title = getFeedCatTitle($this->link, $active_feed_id);
     } else {
         $feed_cat_title = getCategoryTitle($this->link, $active_feed_id);
     }
     if ($active_feed_id && !$is_cat) {
         print "<option selected=\"1\" value=\"this_feed\">{$feed_title}</option>";
     } else {
         print "<option disabled=\"1\" value=\"false\">" . __('This feed') . "</option>";
     }
     if ($is_cat) {
         $cat_preselected = "selected=\"1\"";
     }
     if (get_pref($this->link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) {
         print "<option {$cat_preselected} value=\"this_cat\">{$feed_cat_title}</option>";
     } else {
         //print "<option disabled>".__('This category')."</option>";
     }
     print "</select>";
     print "</div>";
     print "<div class=\"dlgButtons\">";
     if (!SPHINX_ENABLED) {
         print "<div style=\"float : left\">\n\t\t\t\t<a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/redmine/wiki/tt-rss/SearchSyntax\">Search syntax</a>\n\t\t\t\t</div>";
     }
     print "<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').execute()\">" . __('Search') . "</button>\n\t\t<button dojoType=\"dijit.form.Button\" onclick=\"dijit.byId('searchDlg').hide()\">" . __('Cancel') . "</button>\n\t\t</div>";
 }
开发者ID:nvdnkpr,项目名称:Tiny-Tiny-RSS,代码行数:44,代码来源:dlg.php

示例10: index


//.........这里部分代码省略.........
                         $selected = "";
                     }
                     print "<option {$selected} value='{$base}'>{$name}</option>";
                 }
                 print "</select></td></tr>";
             }
             $lnum = 0;
         }
         print "<tr>";
         $type_name = $line["type_name"];
         $pref_name = $line["pref_name"];
         $value = $line["value"];
         $def_value = $line["def_value"];
         $help_text = $line["help_text"];
         print "<td width=\"40%\" class=\"prefName\" id=\"{$pref_name}\">" . __($line["short_desc"]);
         if ($help_text) {
             print "<div class=\"prefHelp\">" . __($help_text) . "</div>";
         }
         print "</td>";
         print "<td class=\"prefValue\">";
         if ($pref_name == "USER_TIMEZONE") {
             $timezones = explode("\n", file_get_contents("lib/timezones.txt"));
             print_select($pref_name, $value, $timezones, 'dojoType="dijit.form.FilteringSelect"');
         } else {
             if ($pref_name == "USER_STYLESHEET") {
                 print "<button dojoType=\"dijit.form.Button\"\n\t\t\t\t\tonclick=\"customizeCSS()\">" . __('Customize') . "</button>";
             } else {
                 if ($pref_name == "DEFAULT_ARTICLE_LIMIT") {
                     $limits = array(15, 30, 45, 60);
                     print_select($pref_name, $value, $limits, 'dojoType="dijit.form.Select"');
                 } else {
                     if ($pref_name == "DEFAULT_UPDATE_INTERVAL") {
                         global $update_intervals_nodefault;
                         print_select_hash($pref_name, $value, $update_intervals_nodefault, 'dojoType="dijit.form.Select"');
                     } else {
                         if ($type_name == "bool") {
                             if ($value == "true") {
                                 $value = __("Yes");
                             } else {
                                 $value = __("No");
                             }
                             if ($pref_name == "PURGE_UNREAD_ARTICLES" && FORCE_ARTICLE_PURGE != 0) {
                                 $disabled = "disabled=\"1\"";
                                 $value = __("Yes");
                             } else {
                                 $disabled = "";
                             }
                             print_radio($pref_name, $value, __("Yes"), array(__("Yes"), __("No")), $disabled);
                         } else {
                             if (array_search($pref_name, array('FRESH_ARTICLE_MAX_AGE', 'DEFAULT_ARTICLE_LIMIT', 'PURGE_OLD_DAYS', 'LONG_DATE_FORMAT', 'SHORT_DATE_FORMAT')) !== false) {
                                 $regexp = $type_name == 'integer' ? 'regexp="^\\d*$"' : '';
                                 if ($pref_name == "PURGE_OLD_DAYS" && FORCE_ARTICLE_PURGE != 0) {
                                     $disabled = "disabled=\"1\"";
                                     $value = FORCE_ARTICLE_PURGE;
                                 } else {
                                     $disabled = "";
                                 }
                                 print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t\t\trequired=\"1\" {$regexp} {$disabled}\n\t\t\t\t\tname=\"{$pref_name}\" value=\"{$value}\">";
                             } else {
                                 if ($pref_name == "SSL_CERT_SERIAL") {
                                     print "<input dojoType=\"dijit.form.ValidationTextBox\"\n\t\t\t\t\tid=\"SSL_CERT_SERIAL\" readonly=\"1\"\n\t\t\t\t\tname=\"{$pref_name}\" value=\"{$value}\">";
                                     $cert_serial = htmlspecialchars(get_ssl_certificate_id());
                                     $has_serial = $cert_serial ? "false" : "true";
                                     print " <button dojoType=\"dijit.form.Button\" disabled=\"{$has_serial}\"\n\t\t\t\t\tonclick=\"insertSSLserial('{$cert_serial}')\">" . __('Register') . "</button>";
                                     print " <button dojoType=\"dijit.form.Button\"\n\t\t\t\t\tonclick=\"insertSSLserial('')\">" . __('Clear') . "</button>";
                                 } else {
开发者ID:4iji,项目名称:Tiny-Tiny-RSS,代码行数:67,代码来源:pref_prefs.php

示例11: module_pref_users

function module_pref_users($link)
{
    global $access_level_names;
    if (!SINGLE_USER_MODE && $_SESSION["access_level"] < 10) {
        print __("Your access level is insufficient to open this tab.");
        return;
    }
    $subop = $_REQUEST["subop"];
    if ($subop == "user-details") {
        $uid = sprintf("%d", $_REQUEST["id"]);
        print "<div id=\"infoBoxTitle\">" . __('User details') . "</div>";
        print "<div class='infoBoxContents'>";
        $result = db_query($link, "SELECT login,\n\t\t\t\t" . SUBSTRING_FOR_DATE . "(last_login,1,16) AS last_login,\n\t\t\t\taccess_level,\n\t\t\t\t(SELECT COUNT(int_id) FROM ttrss_user_entries \n\t\t\t\t\tWHERE owner_uid = id) AS stored_articles,\n\t\t\t\t" . SUBSTRING_FOR_DATE . "(created,1,16) AS created\n\t\t\t\tFROM ttrss_users \n\t\t\t\tWHERE id = '{$uid}'");
        if (db_num_rows($result) == 0) {
            print "<h1>" . __('User not found') . "</h1>";
            return;
        }
        // print "<h1>User Details</h1>";
        $login = db_fetch_result($result, 0, "login");
        print "<table width='100%'>";
        $last_login = date(get_pref($link, 'LONG_DATE_FORMAT'), strtotime(db_fetch_result($result, 0, "last_login")));
        $created = date(get_pref($link, 'LONG_DATE_FORMAT'), strtotime(db_fetch_result($result, 0, "created")));
        $access_level = db_fetch_result($result, 0, "access_level");
        $stored_articles = db_fetch_result($result, 0, "stored_articles");
        print "<tr><td>" . __('Registered') . "</td><td>{$created}</td></tr>";
        print "<tr><td>" . __('Last logged in') . "</td><td>{$last_login}</td></tr>";
        $result = db_query($link, "SELECT COUNT(id) as num_feeds FROM ttrss_feeds\n\t\t\t\tWHERE owner_uid = '{$uid}'");
        $num_feeds = db_fetch_result($result, 0, "num_feeds");
        print "<tr><td>" . __('Subscribed feeds count') . "</td><td>{$num_feeds}</td></tr>";
        print "</table>";
        print "<h1>" . __('Subscribed feeds') . "</h1>";
        $result = db_query($link, "SELECT id,title,site_url FROM ttrss_feeds\n\t\t\t\tWHERE owner_uid = '{$uid}' ORDER BY title");
        print "<ul class=\"userFeedList\">";
        $row_class = "odd";
        while ($line = db_fetch_assoc($result)) {
            $icon_file = ICONS_URL . "/" . $line["id"] . ".ico";
            if (file_exists($icon_file) && filesize($icon_file) > 0) {
                $feed_icon = "<img class=\"tinyFeedIcon\" src=\"{$icon_file}\">";
            } else {
                $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
            }
            print "<li class=\"{$row_class}\">{$feed_icon}&nbsp;<a href=\"" . $line["site_url"] . "\">" . $line["title"] . "</a></li>";
            $row_class = toggleEvenOdd($row_class);
        }
        if (db_num_rows($result) < $num_feeds) {
            // FIXME - add link to show ALL subscribed feeds here somewhere
            print "<li><img \n\t\t\t\t\tclass=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">&nbsp;...</li>";
        }
        print "</ul>";
        print "<div align='center'>\n\t\t\t\t<button onclick=\"closeInfoBox()\">" . __("Close this window") . "</button></div>";
        print "</div>";
        return;
    }
    if ($subop == "edit") {
        $id = db_escape_string($_REQUEST["id"]);
        print "<div id=\"infoBoxTitle\">" . __('User Editor') . "</div>";
        print "<div class=\"infoBoxContents\">";
        print "<form id=\"user_edit_form\" onsubmit='return false'>";
        print "<input type=\"hidden\" name=\"id\" value=\"{$id}\">";
        print "<input type=\"hidden\" name=\"op\" value=\"pref-users\">";
        print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
        $result = db_query($link, "SELECT * FROM ttrss_users WHERE id = '{$id}'");
        $login = db_fetch_result($result, 0, "login");
        $access_level = db_fetch_result($result, 0, "access_level");
        $email = db_fetch_result($result, 0, "email");
        $sel_disabled = $id == $_SESSION["uid"] ? "disabled" : "";
        print "<div class=\"dlgSec\">" . __("User") . "</div>";
        print "<div class=\"dlgSecCont\">";
        if ($sel_disabled) {
            print "<input type=\"hidden\" name=\"login\" value=\"{$login}\">";
            print "<input size=\"30\" style=\"font-size : 16px\" \n\t\t\t\t\tonkeypress=\"return filterCR(event, userEditSave)\" {$sel_disabled}\n\t\t\t\t\tvalue=\"{$login}\">";
        } else {
            print "<input size=\"30\" style=\"font-size : 16px\" \n\t\t\t\t\tonkeypress=\"return filterCR(event, userEditSave)\" {$sel_disabled}\n\t\t\t\t\tname=\"login\" value=\"{$login}\">";
        }
        print "</div>";
        print "<div class=\"dlgSec\">" . __("Authentication") . "</div>";
        print "<div class=\"dlgSecCont\">";
        print __('Access level: ') . " ";
        if (!$sel_disabled) {
            print_select_hash("access_level", $access_level, $access_level_names, $sel_disabled);
        } else {
            print_select_hash("", $access_level, $access_level_names, $sel_disabled);
            print "<input type=\"hidden\" name=\"access_level\" value=\"{$access_level}\">";
        }
        print "<br/>";
        print __('Change password to') . " <input size=\"20\" onkeypress=\"return filterCR(event, userEditSave)\"\n\t\t\t\tname=\"password\">";
        print "</div>";
        print "<div class=\"dlgSec\">" . __("Options") . "</div>";
        print "<div class=\"dlgSecCont\">";
        print __('E-mail: ') . " <input size=\"30\" name=\"email\" onkeypress=\"return filterCR(event, userEditSave)\"\n\t\t\t\tvalue=\"{$email}\">";
        print "</div>";
        print "</table>";
        print "</form>";
        print "<div class=\"dlgButtons\">\n\t\t\t\t<button onclick=\"return userEditSave()\">" . __('Save') . "</button>\n\t\t\t\t<button onclick=\"return userEditCancel()\">" . __('Cancel') . "</button></div>";
        print "</div>";
        return;
    }
    if ($subop == "editSave") {
        if (!WEB_DEMO_MODE && $_SESSION["access_level"] >= 10) {
            $login = db_escape_string(trim($_REQUEST["login"]));
//.........这里部分代码省略.........
开发者ID:buggithubs,项目名称:Tiny-Tiny-RSS,代码行数:101,代码来源:pref-users.php

示例12: render_search_form

function render_search_form($link, $active_feed_id = false, $is_cat = false)
{
    print "<div id=\"heading\">";
    print __("Search") . " <span id=\"headingAddon\">\n\t\t\t\t(<a href=\"index.php\">" . __("Go back") . "</a>)</span></div>";
    print "<form method=\"GET\" action=\"index.php\" class=\"searchForm\">";
    print "<input type=\"hidden\" name=\"go\" value=\"vf\">";
    print "<input type=\"hidden\" name=\"id\" value=\"{$active_feed_id}\">";
    print "<input type=\"hidden\" name=\"cat\" value=\"{$is_cat}\">";
    print "<table><tr><td>" . __('Search:') . "</td><td>";
    print "<input name=\"query\"></td></tr>";
    print "<tr><td>" . __('Where:') . "</td><td>";
    print "<select name=\"search_mode\">\n\t\t\t<option value=\"all_feeds\">" . __('All feeds') . "</option>";
    $feed_title = getFeedTitle($link, $active_feed_id);
    if (!$is_cat) {
        $feed_cat_title = getFeedCatTitle($link, $active_feed_id);
    } else {
        $feed_cat_title = getCategoryTitle($link, $active_feed_id);
    }
    if ($active_feed_id && !$is_cat) {
        print "<option selected value=\"this_feed\">{$feed_title}</option>";
    } else {
        print "<option disabled>" . __('This feed') . "</option>";
    }
    if ($is_cat) {
        $cat_preselected = "selected";
    }
    if (get_pref($link, 'ENABLE_FEED_CATS') && ($active_feed_id > 0 || $is_cat)) {
        print "<option {$cat_preselected} value=\"this_cat\">{$feed_cat_title}</option>";
    } else {
        //print "<option disabled>".__('This category')."</option>";
    }
    print "</select></td></tr>";
    print "<tr><td>" . __('Match on:') . "</td><td>";
    $search_fields = array("title" => __("Title"), "content" => __("Content"), "both" => __("Title or content"));
    print_select_hash("match_on", 3, $search_fields);
    print "</td></tr></table>";
    print "<input type=\"submit\" value=\"" . __('Search') . "\">";
    print "</form>";
    print "</div>";
}
开发者ID:nougad,项目名称:Tiny-Tiny-RSS,代码行数:40,代码来源:functions.php

示例13: module_pref_feeds


//.........这里部分代码省略.........
        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);
            printf("<option {$is_selected} value='%d'>%s</option>", $tmp_line["id"], $linked_title);
        }
        print "</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);
        /* Update method */
        if (ALLOW_SELECT_UPDATE_METHOD) {
            $update_method = db_fetch_result($result, 0, "update_method");
            print " " . __('using') . " ";
            print_select_hash("update_method", $update_method, $update_methods);
        }
        $purge_interval = db_fetch_result($result, 0, "purge_interval");
        if (FORCE_ARTICLE_PURGE == 0) {
            /* Purge intl */
            print "<br/>";
            print __('Article purging:') . " ";
            print_select_hash("purge_interval", $purge_interval, $purge_intervals);
        } else {
            print "<input type='hidden' name='purge_interval' value='{$purge_interval}'>";
        }
        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 size=\"20\" onkeypress=\"return filterCR(event, feedEditSave)\"\n\t\t\t\tname=\"auth_login\" value=\"{$auth_login}\">";
        print "</tr><tr><td>" . __("Password:") . "</td><td>";
        $auth_pass = htmlspecialchars(db_fetch_result($result, 0, "auth_pass"));
        print "<input size=\"20\" type=\"password\" name=\"auth_pass\" \n\t\t\t\tonkeypress=\"return filterCR(event, feedEditSave)\"\n\t\t\t\tvalue=\"{$auth_pass}\">";
        print "</td></tr></table>";
        print "</div>";
        print "<div class=\"dlgSec\">" . __("Options") . "</div>";
        print "<div class=\"dlgSecCont\">";
        print "<div style=\"line-height : 100%\">";
        $private = sql_bool_to_bool(db_fetch_result($result, 0, "private"));
        if ($private) {
开发者ID:buggithubs,项目名称:Tiny-Tiny-RSS,代码行数:67,代码来源:pref-feeds.php

示例14: module_pref_filters

function module_pref_filters($link)
{
    $subop = $_REQUEST["subop"];
    $quiet = $_REQUEST["quiet"];
    if ($subop == "edit") {
        $filter_id = db_escape_string($_REQUEST["id"]);
        $result = db_query($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");
        $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"));
        print "<div id=\"infoBoxTitle\">" . __('Filter Editor') . "</div>";
        print "<div class=\"infoBoxContents\">";
        print "<form id=\"filter_edit_form\" onsubmit='return false'>";
        print "<input type=\"hidden\" name=\"op\" value=\"pref-filters\">";
        print "<input type=\"hidden\" name=\"id\" value=\"{$filter_id}\">";
        print "<input type=\"hidden\" name=\"subop\" value=\"editSave\">";
        $result = db_query($link, "SELECT id,description \n\t\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=\"filter_dlg_date_mod_box\" {$date_ops_invisible}>";
        print __("Date") . " ";
        $filter_params = array("before" => __("before"), "after" => __("after"));
        print_select_hash("filter_date_modifier", $filter_param, $filter_params);
        print "&nbsp;</span>";
        print "<input onkeypress=\"return filterCR(event, filterEditSave)\"\n\t\t\t\t\t name=\"reg_exp\" size=\"30\" value=\"{$reg_exp}\">";
        print "<span id=\"filter_dlg_date_chk_box\" {$date_ops_invisible}>";
        print "&nbsp;<input class=\"button\"\n\t\t\t\ttype=\"submit\" onclick=\"return filterDlgCheckDate()\" \n\t\t\t\tvalue=\"" . __('Check it') . "\">";
        print "</span>";
        print "<br/> " . __("on field") . " ";
        print_select_hash("filter_type", $filter_type, $filter_types, 'onchange="filterDlgCheckType(this)"');
        print "<br/>";
        print __("in") . " ";
        print_feed_select($link, "feed_id", $feed_id);
        print "</div>";
        print "<div class=\"dlgSec\">" . __("Perform Action") . "</div>";
        print "<div class=\"dlgSecCont\">";
        print "<select name=\"action_id\"\n\t\t\t\tonchange=\"filterDlgCheckAction(this)\">";
        $result = db_query($link, "SELECT id,description FROM ttrss_filter_actions \n\t\t\t\tORDER BY name");
        while ($line = db_fetch_assoc($result)) {
            $is_sel = $line["id"] == $action_id ? "selected" : "";
            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=\"filter_dlg_param_box\" style=\"{$param_hidden}\">";
        print " " . __("with parameters:") . " ";
        $param_int_hidden = $action_id != 7 ? "" : "display : none";
        print "<input size=\"20\" style=\"{$param_int_hidden}\"\n\t\t\t\t\tonkeypress=\"return filterCR(event, filterEditSave)\"\t\t\n\t\t\t\t\tname=\"action_param\" value=\"{$action_param}\">";
        $param_int_hidden = $action_id == 7 ? "" : "display : none";
        print_label_select($link, "action_param_label", $action_param, $param_int_hidden);
        print "</span>";
        print "&nbsp;";
        // 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";
        } else {
            $checked = "";
        }
        print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" {$checked}>\n\t\t\t\t\t<label for=\"enabled\">" . __('Enabled') . "</label><br/>";
        if ($inverse) {
            $checked = "checked";
        } else {
            $checked = "";
        }
        print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\" {$checked}>\n\t\t\t\t<label for=\"inverse\">" . __('Inverse match') . "</label>";
        print "</div>";
        print "</div>";
        print "<div class=\"dlgButtons\">";
        $reg_exp = htmlspecialchars($reg_exp, ENT_QUOTES);
        // second escaping seems to be needed for javascript
        print "<div style=\"float : left\">";
        print "<button onclick='return removeFilter({$filter_id}, \"{$reg_exp}\")'>" . __('Remove') . "</button>";
        print "</div>";
        print "<button onclick=\"return filterEditSave()\">" . __('Save') . "</button> ";
        print "<button onclick=\"return filterEditCancel()\">" . __('Cancel') . "</button>";
        print "</div>";
        return;
    }
    if ($subop == "editSave") {
        global $memcache;
        if ($memcache) {
            $memcache->flush();
        }
//.........这里部分代码省略.........
开发者ID:buggithubs,项目名称:Tiny-Tiny-RSS,代码行数:101,代码来源:pref-filters.php

示例15: sharepopup


//.........这里部分代码省略.........
					placeholder='Alpha, Beta, Gamma' value="">
				</td></tr>

				<tr><td>
					<div class="autocomplete" id="labels_choices"
						style="display : block"></div></td></tr>

				<script type='text/javascript'>document.forms[0].title.focus();</script>

				<script type='text/javascript'>
					new Ajax.Autocompleter('labels_value', 'labels_choices',
				   "backend.php?op=rpc&method=completeLabels",
				   { tokens: ',', paramName: "search" });
				</script>

				<tr><td colspan='2'>
					<div style='float : right' class='insensitive-small'>
					<?php 
                echo __("Shared article will appear in the Published feed.");
                ?>
					</div>
					<button type="submit"><?php 
                echo __('Share');
                ?>
</button>
					<button onclick="return window.close()"><?php 
                echo __('Cancel');
                ?>
</button>
					</div>

				</form>
				</td></tr></table>
				</body></html>
				<?php 
            }
        } else {
            $return = urlencode($_SERVER["REQUEST_URI"]);
            ?>

			<form action="public.php?return=<?php 
            echo $return;
            ?>
"
				method="POST" id="loginForm" name="loginForm">

			<input type="hidden" name="op" value="login">

			<table height='100%' width='100%'><tr><td colspan='2'>
			<h1><?php 
            echo __("Not logged in");
            ?>
</h1></td></tr>

			<tr><td align="right"><?php 
            echo __("Login:");
            ?>
</td>
			<td align="right"><input name="login"
				value="<?php 
            echo $_SESSION["fake_login"];
            ?>
"></td></tr>
				<tr><td align="right"><?php 
            echo __("Password:");
            ?>
</td>
				<td align="right"><input type="password" name="password"
				value="<?php 
            echo $_SESSION["fake_password"];
            ?>
"></td></tr>
			<tr><td align="right"><?php 
            echo __("Language:");
            ?>
</td>
			<td align="right">
			<?php 
            print_select_hash("language", $_COOKIE["ttrss_lang"], get_translations(), "style='width : 100%''");
            ?>
			</td></tr>
			<tr><td colspan='2'>
				<button type="submit">
					<?php 
            echo __('Log in');
            ?>
</button>

				<button onclick="return window.close()">
					<?php 
            echo __('Cancel');
            ?>
</button>
			</td></tr>
			</table>

			</form>
			<?php 
        }
    }
开发者ID:bohoo,项目名称:tiny_tiny_rss-openshift-quickstart-1,代码行数:101,代码来源:public.php


注:本文中的print_select_hash函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。