$script->filter(Script::T_GLOBALUSER, 'gu_hidden', Script::OP_NOT_EQUAL, 'lists'); $script->filter(Script::T_GLOBALUSER, '`gu_hidden`', Script::OP_NOT_EQUAL, 'suppressed'); $script->describeFilter("NOT hidden"); } /* add date filter */ if ($script->date) { $script->describeFilter("registered after {$script->date}"); } /* set limit */ if ($x = $backend->get('limit')) { $script->setLimit($x); } $limit = $script->limit; /* set offset */ if ($x = $backend->get('offset')) { $script->setOffset($x); } $offset = $script->offset; $script->use_regex = $use_regex; $script->show_locked = $show_locked; $script->show_hidden = $show_hidden; ############################# ## Input form ############################# $f_username = $backend->formatValue(isset($name) ? $name : ''); echo "\n\t<form action='", $backend->url('/gusersearch'), "' method='get'>\n\t\t<input type='text' name='name' value='{$f_username}' />\n\t\t", $limit != Script::DEFAULT_LIMIT ? "<input type='hidden' name='limit' value='{$limit}' />" : "", "\n\t\t<input type='submit' value='Search »' /> <br />\n\t\t<div style='padding-left:0.5em; border:1px solid gray; color:gray;'>\n\t\t\t", Form::Checkbox('show_locked', $show_locked), "\n\t\t\t<label for='show_locked'>Show locked accounts</label><br />\n\n\t\t\t", Form::Checkbox('show_hidden', $show_hidden), "\n\t\t\t<label for='show_hidden'>Show hidden accounts</label><br />\n\n\t\t\t", Form::Checkbox('regex', $use_regex, array('onClick' => 'script.toggleRegex(this.checked);')), "\n\t\t\t<label for='regex'>Use <a href='http://www.wellho.net/regex/mysql.html' title='MySQL regex reference'>regular expression</a> (much slower)</label><br />\n\n\t\t\t", Form::Checkbox('icase', $case_insensitive), "\n\t\t\t<label for='icase'>Match any capitalization (much slower)</label><br />\n\t\t\t\n\t\t\t", "\n\n\t\t\t<p>\n\t\t\t\t<b>Search syntax:</b>\n\t\t\t\t<span id='tips-regex'", $use_regex ? "" : " style='display:none;'", ">\n\t\t\t\t\tRegular expressions are much slower, but much more powerful. You will need to escape special characters like [.*^\$]. See the <a href='http://www.wellho.net/regex/mysql.html' title='MySQL regex reference'>MySQL regex reference</a>.\n\t\t\t\t</span>\n\t\t\t\t<span id='tips-like'", $use_regex ? " style='display:none;'" : "", ">\n\t\t\t\t\tAdd % to your search string for multicharacter wildcards, and _ for a single-character wildcard. For example, '%Joe%' finds every username containing the word 'Joe').\n\t\t\t\t</span>\n\t\t\t</p>\n\t\t\t<p>Beware: search is <strong><em>much slower</em></strong> if the user name starts with a wildcard!</p>\n\t\t</div>\n\t</form>\n"; ############################# ## Perform search ############################# $backend->profiler->stop('initialize'); $script->Query();