2006-10-01 12:05:20 +02:00
|
|
|
<?php
|
|
|
|
function module_pref_filters($link) {
|
|
|
|
$subop = $_GET["subop"];
|
|
|
|
$quiet = $_GET["quiet"];
|
|
|
|
|
|
|
|
if ($subop == "edit") {
|
|
|
|
|
|
|
|
$filter_id = db_escape_string($_GET["id"]);
|
|
|
|
|
|
|
|
$result = db_query($link,
|
|
|
|
"SELECT * FROM ttrss_filters WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
|
|
|
|
|
2007-05-19 16:09:16 +02:00
|
|
|
$reg_exp = htmlspecialchars(db_fetch_result($result, 0, "reg_exp"));
|
2006-10-01 12:05:20 +02:00
|
|
|
$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");
|
2006-12-08 08:21:44 +01:00
|
|
|
$action_param = db_fetch_result($result, 0, "action_param");
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
$enabled = sql_bool_to_bool(db_fetch_result($result, 0, "enabled"));
|
2007-01-30 17:23:35 +01:00
|
|
|
$inverse = sql_bool_to_bool(db_fetch_result($result, 0, "inverse"));
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2008-08-06 09:51:28 +02:00
|
|
|
print "<div id=\"infoBoxTitle\">".__('Filter Editor')."</div>";
|
2006-10-01 12:05:20 +02:00
|
|
|
print "<div class=\"infoBoxContents\">";
|
|
|
|
|
2007-03-02 21:58:29 +01:00
|
|
|
print "<form id=\"filter_edit_form\" onsubmit='return false'>";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
FROM ttrss_filter_types ORDER BY description");
|
|
|
|
|
|
|
|
$filter_types = array();
|
|
|
|
|
|
|
|
while ($line = db_fetch_assoc($result)) {
|
|
|
|
//array_push($filter_types, $line["description"]);
|
2007-08-10 18:16:43 +02:00
|
|
|
$filter_types[$line["id"]] = __($line["description"]);
|
2006-10-01 12:05:20 +02:00
|
|
|
}
|
|
|
|
|
2008-08-06 08:47:56 +02:00
|
|
|
print "<div class=\"dlgSec\">".__("Match")."</div>";
|
|
|
|
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
|
|
|
|
print "<input onkeypress=\"return filterCR(event, filterEditSave)\"
|
|
|
|
onkeyup=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
|
|
|
onchange=\"toggleSubmitNotEmpty(this, 'infobox_submit')\"
|
|
|
|
name=\"reg_exp\" size=\"30\" value=\"$reg_exp\">";
|
|
|
|
|
|
|
|
print " " . __("on field") . " ";
|
|
|
|
print_select_hash("filter_type", $filter_type, $filter_types);
|
|
|
|
|
|
|
|
print "<br/>";
|
|
|
|
|
|
|
|
print __("in") . " ";
|
|
|
|
print_feed_select($link, "feed_id", $feed_id);
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
|
2008-08-06 09:51:28 +02:00
|
|
|
print "<div class=\"dlgSec\">".__("Perform Action")."</div>";
|
2008-08-06 08:47:56 +02:00
|
|
|
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
|
|
|
|
print "<select name=\"action_id\"
|
|
|
|
onchange=\"filterDlgCheckAction(this)\">";
|
|
|
|
|
|
|
|
$result = db_query($link, "SELECT id,description FROM ttrss_filter_actions
|
|
|
|
ORDER 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>";
|
|
|
|
|
|
|
|
print " " . __("with params") . " ";
|
|
|
|
|
|
|
|
$param_disabled = ($action_id == 4 || $action_id == 6) ? "" : "disabled";
|
|
|
|
|
|
|
|
print "<input $param_disabled size=\"20\"
|
|
|
|
name=\"action_param\" value=\"$action_param\">";
|
|
|
|
|
|
|
|
print "</div>";
|
|
|
|
|
|
|
|
print "<div class=\"dlgSec\">".__("Options")."</div>";
|
|
|
|
print "<div class=\"dlgSecCont\">";
|
|
|
|
|
2008-08-06 09:51:28 +02:00
|
|
|
print "<div style=\"line-height : 100%\">";
|
|
|
|
|
2008-08-06 08:47:56 +02:00
|
|
|
if ($enabled) {
|
|
|
|
$checked = "checked";
|
|
|
|
} else {
|
|
|
|
$checked = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "<input type=\"checkbox\" name=\"enabled\" id=\"enabled\" $checked>
|
|
|
|
<label for=\"enabled\">".__('Enabled')."</label><br/>";
|
|
|
|
|
|
|
|
if ($inverse) {
|
|
|
|
$checked = "checked";
|
|
|
|
} else {
|
|
|
|
$checked = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "<input type=\"checkbox\" name=\"inverse\" id=\"inverse\" $checked>
|
|
|
|
<label for=\"inverse\">".__('Inverse match')."</label>";
|
|
|
|
|
|
|
|
print "</div>";
|
2008-08-06 09:51:28 +02:00
|
|
|
print "</div>";
|
2008-08-06 08:47:56 +02:00
|
|
|
|
|
|
|
print "<div class=\"dlgButtons\">";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
print "<input type=\"submit\"
|
|
|
|
id=\"infobox_submit\"
|
|
|
|
class=\"button\" onclick=\"return filterEditSave()\"
|
2007-03-05 12:02:18 +01:00
|
|
|
value=\"".__('Save')."\"> ";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
print "<input class=\"button\"
|
|
|
|
type=\"submit\" onclick=\"return filterEditCancel()\"
|
2007-03-05 12:02:18 +01:00
|
|
|
value=\"".__('Cancel')."\">";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2008-08-06 10:08:26 +02:00
|
|
|
$reg_exp = htmlspecialchars($reg_exp); // second escaping seems to be needed for javascript
|
|
|
|
|
|
|
|
print "<div style=\"float : left\">";
|
|
|
|
print "<input type=\"submit\"
|
|
|
|
class=\"button\" onclick='return removeFilter($filter_id, \"$reg_exp\")'
|
|
|
|
value=\"".__('Remove')."\"> ";
|
|
|
|
print "</div>";
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
print "</div>";
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($subop == "editSave") {
|
|
|
|
|
|
|
|
$reg_exp = db_escape_string(trim($_GET["reg_exp"]));
|
|
|
|
$filter_type = db_escape_string(trim($_GET["filter_type"]));
|
|
|
|
$filter_id = db_escape_string($_GET["id"]);
|
|
|
|
$feed_id = db_escape_string($_GET["feed_id"]);
|
|
|
|
$action_id = db_escape_string($_GET["action_id"]);
|
2006-12-08 08:21:44 +01:00
|
|
|
$action_param = db_escape_string($_GET["action_param"]);
|
2006-10-01 12:05:20 +02:00
|
|
|
$enabled = checkbox_to_sql_bool(db_escape_string($_GET["enabled"]));
|
2007-01-30 17:23:35 +01:00
|
|
|
$inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
if (!$feed_id) {
|
|
|
|
$feed_id = 'NULL';
|
|
|
|
} else {
|
|
|
|
$feed_id = sprintf("'%s'", db_escape_string($feed_id));
|
|
|
|
}
|
|
|
|
|
|
|
|
$result = db_query($link, "UPDATE ttrss_filters SET
|
|
|
|
reg_exp = '$reg_exp',
|
|
|
|
feed_id = $feed_id,
|
|
|
|
action_id = '$action_id',
|
|
|
|
filter_type = '$filter_type',
|
2006-12-08 08:21:44 +01:00
|
|
|
enabled = $enabled,
|
2007-01-30 17:23:35 +01:00
|
|
|
inverse = $inverse,
|
2006-12-08 08:21:44 +01:00
|
|
|
action_param = '$action_param'
|
2007-03-05 13:50:46 +01:00
|
|
|
WHERE id = '$filter_id' AND owner_uid = " . $_SESSION["uid"]);
|
2007-03-05 14:45:34 +01:00
|
|
|
|
|
|
|
if (db_affected_rows($link, $result) != 0) {
|
|
|
|
print_notice(T_sprintf("Saved filter <b>%s</b>", htmlspecialchars($reg_exp)));
|
|
|
|
}
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($subop == "remove") {
|
|
|
|
|
2007-03-05 13:50:46 +01:00
|
|
|
$ids = split(",", db_escape_string($_GET["ids"]));
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2007-03-05 13:50:46 +01:00
|
|
|
foreach ($ids as $id) {
|
|
|
|
db_query($link, "DELETE FROM ttrss_filters WHERE id = '$id' AND owner_uid = ". $_SESSION["uid"]);
|
2006-10-01 12:05:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($subop == "add") {
|
|
|
|
|
2007-03-05 13:50:46 +01:00
|
|
|
$regexp = db_escape_string(trim($_GET["reg_exp"]));
|
|
|
|
$filter_type = db_escape_string(trim($_GET["filter_type"]));
|
|
|
|
$feed_id = db_escape_string($_GET["feed_id"]);
|
|
|
|
$action_id = db_escape_string($_GET["action_id"]);
|
|
|
|
$action_param = db_escape_string($_GET["action_param"]);
|
|
|
|
|
|
|
|
$inverse = checkbox_to_sql_bool(db_escape_string($_GET["inverse"]));
|
|
|
|
|
|
|
|
if (!$regexp) return;
|
|
|
|
|
|
|
|
if (!$feed_id) {
|
|
|
|
$feed_id = 'NULL';
|
|
|
|
} else {
|
|
|
|
$feed_id = sprintf("'%s'", db_escape_string($feed_id));
|
|
|
|
}
|
|
|
|
|
|
|
|
$result = db_query($link,
|
|
|
|
"INSERT INTO ttrss_filters (reg_exp,filter_type,owner_uid,feed_id,
|
|
|
|
action_id, action_param, inverse)
|
|
|
|
VALUES
|
|
|
|
('$regexp', '$filter_type','".$_SESSION["uid"]."',
|
|
|
|
$feed_id, '$action_id', '$action_param', $inverse)");
|
|
|
|
|
2007-03-05 14:45:34 +01:00
|
|
|
if (db_affected_rows($link, $result) != 0) {
|
|
|
|
print T_sprintf("Created filter <b>%s</b>", htmlspecialchars($regexp));
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
2006-10-01 12:05:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if ($quiet) return;
|
|
|
|
|
2007-05-04 05:26:20 +02:00
|
|
|
set_pref($link, "_PREFS_ACTIVE_TAB", "filterConfig");
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
$sort = db_escape_string($_GET["sort"]);
|
|
|
|
|
|
|
|
if (!$sort || $sort == "undefined") {
|
|
|
|
$sort = "reg_exp";
|
|
|
|
}
|
|
|
|
|
|
|
|
// print "<div id=\"infoBoxShadow\"><div id=\"infoBox\">PLACEHOLDER</div></div>";
|
|
|
|
|
|
|
|
$result = db_query($link, "SELECT id,description
|
|
|
|
FROM 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"];
|
|
|
|
}
|
|
|
|
|
2008-05-17 04:52:46 +02:00
|
|
|
|
|
|
|
$filter_search = db_escape_string($_GET["search"]);
|
|
|
|
|
|
|
|
if (array_key_exists("search", $_GET)) {
|
|
|
|
$_SESSION["prefs_filter_search"] = $filter_search;
|
|
|
|
} else {
|
|
|
|
$filter_search = $_SESSION["prefs_filter_search"];
|
|
|
|
}
|
|
|
|
|
|
|
|
print "<div class=\"feedEditSearch\">
|
|
|
|
<input id=\"filter_search\" size=\"20\" type=\"search\"
|
2008-05-17 05:11:51 +02:00
|
|
|
onfocus=\"javascript:disableHotkeys();\"
|
|
|
|
onblur=\"javascript:enableHotkeys();\"
|
2008-05-17 04:52:46 +02:00
|
|
|
onchange=\"javascript:updateFilterList()\" value=\"$filter_search\">
|
|
|
|
<input type=\"submit\" class=\"button\"
|
2008-05-17 05:07:39 +02:00
|
|
|
onclick=\"javascript:updateFilterList()\" value=\"".__('Search')."\">
|
|
|
|
<p<a class='helpLinkPic' href=\"javascript:displayHelpInfobox(2)\">
|
2008-05-17 04:58:13 +02:00
|
|
|
<img src='images/sign_quest.gif'></a></p>
|
2008-05-17 04:52:46 +02:00
|
|
|
</div>";
|
|
|
|
|
2007-03-02 20:16:45 +01:00
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
print "<input type=\"submit\"
|
|
|
|
class=\"button\"
|
|
|
|
onclick=\"return displayDlg('quickAddFilter', false)\"
|
|
|
|
id=\"create_filter_btn\"
|
2007-03-05 12:02:18 +01:00
|
|
|
value=\"".__('Create filter')."\">";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2008-05-04 06:46:14 +02:00
|
|
|
print " ";
|
|
|
|
|
|
|
|
print "<input type=\"submit\"
|
|
|
|
class=\"button\"
|
|
|
|
onclick=\"rescore_all_feeds()\"
|
|
|
|
value=\"".__('Rescore articles')."\">";
|
|
|
|
|
2008-05-17 04:52:46 +02:00
|
|
|
if ($filter_search) {
|
|
|
|
$filter_search = db_escape_string($filter_search);
|
|
|
|
$filter_search_query = "(
|
2008-05-17 04:58:13 +02:00
|
|
|
UPPER(ttrss_filter_actions.description) LIKE UPPER('%$filter_search%') OR
|
|
|
|
UPPER(reg_exp) LIKE UPPER('%$filter_search%') OR
|
|
|
|
UPPER(ttrss_feeds.title) LIKE UPPER('%$filter_search%') OR
|
|
|
|
UPPER(ttrss_filter_types.description) LIKE UPPER('%$filter_search%')) AND";
|
2008-05-17 04:52:46 +02:00
|
|
|
} else {
|
|
|
|
$filter_search_query = "";
|
|
|
|
}
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
$result = db_query($link, "SELECT
|
|
|
|
ttrss_filters.id AS id,reg_exp,
|
|
|
|
ttrss_filter_types.name AS filter_type_name,
|
|
|
|
ttrss_filter_types.description AS filter_type_descr,
|
|
|
|
enabled,
|
2007-01-30 17:23:35 +01:00
|
|
|
inverse,
|
2006-10-01 12:05:20 +02:00
|
|
|
feed_id,
|
|
|
|
ttrss_filter_actions.description AS action_description,
|
2008-04-30 09:20:33 +02:00
|
|
|
ttrss_feeds.title AS feed_title,
|
|
|
|
ttrss_filter_actions.name AS action_name,
|
|
|
|
ttrss_filters.action_param AS action_param
|
2006-10-01 12:05:20 +02:00
|
|
|
FROM
|
|
|
|
ttrss_filter_types,ttrss_filter_actions,ttrss_filters LEFT JOIN
|
|
|
|
ttrss_feeds ON (ttrss_filters.feed_id = ttrss_feeds.id)
|
|
|
|
WHERE
|
|
|
|
filter_type = ttrss_filter_types.id AND
|
2008-05-17 04:52:46 +02:00
|
|
|
$filter_search_query
|
2006-10-01 12:05:20 +02:00
|
|
|
ttrss_filter_actions.id = action_id AND
|
|
|
|
ttrss_filters.owner_uid = ".$_SESSION["uid"]."
|
2008-04-30 18:39:39 +02:00
|
|
|
ORDER by action_description, $sort");
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
if (db_num_rows($result) != 0) {
|
|
|
|
|
|
|
|
print "<p><table width=\"100%\" cellspacing=\"0\" class=\"prefFilterList\"
|
|
|
|
id=\"prefFilterList\">";
|
|
|
|
|
|
|
|
print "<tr><td class=\"selectPrompt\" colspan=\"8\">
|
2007-05-14 09:56:49 +02:00
|
|
|
".__('Select:')."
|
|
|
|
<a href=\"javascript:selectPrefRows('filter', true)\">".__('All')."</a>,
|
|
|
|
<a href=\"javascript:selectPrefRows('filter', false)\">".__('None')."</a>
|
2006-10-01 12:05:20 +02:00
|
|
|
</td</tr>";
|
|
|
|
|
|
|
|
$lnum = 0;
|
2008-04-30 18:39:39 +02:00
|
|
|
|
|
|
|
$cur_action_description = "";
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
while ($line = db_fetch_assoc($result)) {
|
|
|
|
|
|
|
|
$class = ($lnum % 2) ? "even" : "odd";
|
|
|
|
|
|
|
|
$filter_id = $line["id"];
|
|
|
|
$edit_filter_id = $_GET["id"];
|
|
|
|
|
|
|
|
$enabled = sql_bool_to_bool($line["enabled"]);
|
2007-01-30 17:23:35 +01:00
|
|
|
$inverse = sql_bool_to_bool($line["inverse"]);
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
if ($subop == "edit" && $filter_id != $edit_filter_id) {
|
|
|
|
$class .= "Grayed";
|
|
|
|
$this_row_id = "";
|
|
|
|
} else {
|
|
|
|
$this_row_id = "id=\"FILRR-$filter_id\"";
|
|
|
|
}
|
2008-04-30 18:39:39 +02:00
|
|
|
|
|
|
|
$line["filter_type_descr"] = __($line["filter_type_descr"]);
|
|
|
|
$line["action_description"] = __($line["action_description"]);
|
|
|
|
|
|
|
|
if ($line["action_description"] != $cur_action_description) {
|
|
|
|
$cur_action_description = $line["action_description"];
|
|
|
|
|
|
|
|
print "<tr><td class='filterEditCat' colspan='6'>$cur_action_description</td></tr>";
|
|
|
|
|
|
|
|
print "<tr class=\"title\">
|
|
|
|
<td align='center' width=\"5%\"> </td>
|
|
|
|
<td width=\"20%\"><a href=\"javascript:updateFilterList('reg_exp')\">".__('Filter expression')."</a></td>
|
|
|
|
<td width=\"\"><a href=\"javascript:updateFilterList('feed_title')\">".__('Feed')."</a></td>
|
|
|
|
<td width=\"20%\"><a href=\"javascript:updateFilterList('filter_type')\">".__('Match')."</a></td>
|
|
|
|
<!-- <td width=\"15%\"><a href=\"javascript:updateFilterList('action_description')\">".__('Action')."</a></td> -->
|
|
|
|
<td width=\"20%\"><a href=\"javascript:updateFilterList('action_param')\">".__('Params')."</a></td>";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
print "<tr class=\"$class\" $this_row_id>";
|
|
|
|
|
2007-05-19 16:09:16 +02:00
|
|
|
$line["reg_exp"] = htmlspecialchars($line["reg_exp"]);
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2007-03-05 12:02:18 +01:00
|
|
|
if (!$line["feed_title"]) $line["feed_title"] = __("All feeds");
|
2008-05-04 06:19:19 +02:00
|
|
|
|
|
|
|
if (!$line["action_param"]) {
|
|
|
|
$line["action_param"] = "—";
|
|
|
|
} else if ($line["action_name"] == "score") {
|
|
|
|
|
2008-05-05 08:28:00 +02:00
|
|
|
$score_pic = get_score_pic($line["action_param"]);
|
2008-05-04 06:19:19 +02:00
|
|
|
|
|
|
|
$score_pic = "<img class='hlScorePic' src=\"images/$score_pic\">";
|
|
|
|
|
|
|
|
$line["action_param"] = "$score_pic " . $line["action_param"];
|
|
|
|
|
|
|
|
}
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2007-05-19 16:09:16 +02:00
|
|
|
$line["feed_title"] = htmlspecialchars($line["feed_title"]);
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"filter\");'
|
|
|
|
type=\"checkbox\" id=\"FICHK-".$line["id"]."\"></td>";
|
|
|
|
|
|
|
|
if (!$enabled) {
|
|
|
|
$line["reg_exp"] = "<span class=\"insensitive\">" .
|
2007-03-05 12:02:18 +01:00
|
|
|
$line["reg_exp"] . " " . __("(Disabled)")."</span>";
|
2006-10-01 12:05:20 +02:00
|
|
|
$line["feed_title"] = "<span class=\"insensitive\">" .
|
|
|
|
$line["feed_title"] . "</span>";
|
|
|
|
$line["filter_type_descr"] = "<span class=\"insensitive\">" .
|
|
|
|
$line["filter_type_descr"] . "</span>";
|
|
|
|
$line["action_description"] = "<span class=\"insensitive\">" .
|
|
|
|
$line["action_description"] . "</span>";
|
2008-04-30 18:39:39 +02:00
|
|
|
$line["action_param"] = "<span class=\"insensitive\">" .
|
|
|
|
$line["action_param"] . "</span>";
|
2006-10-01 12:05:20 +02:00
|
|
|
}
|
2008-05-17 17:36:35 +02:00
|
|
|
|
|
|
|
$onclick = "onclick='editFilter($filter_id)' title='".__('Click to edit')."'";
|
|
|
|
|
|
|
|
print "<td $onclick>" . $line["reg_exp"] . "</td>";
|
|
|
|
print "<td $onclick>" . $line["feed_title"] . "</td>";
|
2007-01-30 17:23:35 +01:00
|
|
|
|
|
|
|
$inverse_label = "";
|
|
|
|
|
|
|
|
if ($inverse) {
|
2007-03-05 12:02:18 +01:00
|
|
|
$inverse_label = " <span class='insensitive'>".__('(Inverse)')."</span>";
|
2007-01-30 17:23:35 +01:00
|
|
|
}
|
2006-10-01 12:05:20 +02:00
|
|
|
|
2008-05-17 17:40:44 +02:00
|
|
|
print "<td $onclick>" . $line["filter_type_descr"] . "$inverse_label</td>";
|
2008-05-17 17:36:35 +02:00
|
|
|
print "<td $onclick>" . $line["action_param"] . "</td>";
|
2008-04-30 09:20:33 +02:00
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
print "</tr>";
|
|
|
|
|
|
|
|
++$lnum;
|
|
|
|
}
|
2008-05-17 05:32:36 +02:00
|
|
|
|
2006-10-01 12:05:20 +02:00
|
|
|
print "</table>";
|
|
|
|
|
|
|
|
print "<p id=\"filterOpToolbar\">";
|
2006-12-08 08:42:18 +01:00
|
|
|
|
2007-03-05 12:02:18 +01:00
|
|
|
print "<input type=\"submit\" class=\"button\" disabled=\"true\"
|
|
|
|
onclick=\"return editSelectedFilter()\" value=\"".__('Edit')."\">
|
2006-10-01 12:05:20 +02:00
|
|
|
<input type=\"submit\" class=\"button\" disabled=\"true\"
|
2007-03-05 12:02:18 +01:00
|
|
|
onclick=\"return removeSelectedFilters()\" value=\"".__('Remove')."\">";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
print "</p>";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
2008-05-17 04:52:46 +02:00
|
|
|
print "<p>";
|
|
|
|
if (!$filter_search) {
|
|
|
|
print __('No filters defined.');
|
|
|
|
} else {
|
|
|
|
print __('No matching filters found.');
|
|
|
|
}
|
|
|
|
print "</p>";
|
2006-10-01 12:05:20 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|