--- manage.php.19stable 2008-10-10 13:19:57.000000000 -0500 +++ manage.php.edited 2008-10-10 14:31:34.000000000 -0500 @@ -1,4 +1,4 @@ -libdir.'/tablelib.php'); @@ -12,6 +12,7 @@ $tagtypes = optional_param('tagtypes', array(), PARAM_ALPHA); $action = optional_param('action', '', PARAM_ALPHA); $perpage = optional_param('perpage', DEFAULT_PAGE_SIZE, PARAM_INT); +$filter = optional_param('filter', False, PARAM_CLEAN); require_login(); @@ -144,6 +145,13 @@ ''); print(''); +// form to filter tags +print('
'); +print('
'. + ''. + ''. + '
'); +print('
'); //setup table $tablecolumns = array('id', 'name', 'fullname', 'count', 'flag', 'timemodified', 'rawname', 'tagtype', ''); @@ -194,6 +202,16 @@ $where = ''; } +if ($filter) { + if ($where) { + $where .= ' AND'; + } else { + $where = 'WHERE'; + } + + $where .= ' tg.name LIKE "%' . $filter . '%"'; +} + $query = 'SELECT tg.id, tg.name, tg.rawname, tg.tagtype, COUNT(ti.id) AS count, u.id AS owner, tg.flag, tg.timemodified, u.firstname, u.lastname '. 'FROM '. $CFG->prefix .'tag_instance ti RIGHT JOIN '. $CFG->prefix .'tag tg ON tg.id = ti.tagid LEFT JOIN '. $CFG->prefix .'user u ON tg.userid = u.id '. $where .' '.