summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages/account/48.php3
-rw-r--r--pages/account/49.php14
2 files changed, 11 insertions, 6 deletions
diff --git a/pages/account/48.php b/pages/account/48.php
index 8cdd7ac..67f2520 100644
--- a/pages/account/48.php
+++ b/pages/account/48.php
@@ -26,6 +26,9 @@
<td class="DataTD"><input type="text" name="domain" value="<?=array_key_exists('domain',$_POST)?sanitizeHTML($_POST['domain']):''?>"></td>
</tr>
<tr>
+ <td class="DataTD" colspan="2"><?=_("For search by ID use # prefix e.g. #123456")?></td>
+ </tr>
+ <tr>
<td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td>
</tr>
</table>
diff --git a/pages/account/49.php b/pages/account/49.php
index e1e6206..9802917 100644
--- a/pages/account/49.php
+++ b/pages/account/49.php
@@ -19,14 +19,16 @@
$userid=0; if(array_key_exists('userid',$_GET)) $userid=intval($_GET['userid']);
if($userid <= 0)
{
- $domainsearch = $domain = mysql_real_escape_string(stripslashes($_POST['domain']));
- if(!strstr($domain, "%"))
+ $domainsearch = $domain = mysql_real_escape_string(trim(stripslashes($_POST['domain'])));
+ if(!strstr($domain, "%")) {
$domainsearch = "%$domain%";
- if(preg_match("/^\d+$/",$domain))
- $domainsearch = "";
+ }
+
//check if request is id if not set search ID to -1
- $domainid = intval($domain);
- if($domain !== $domainid){
+ if(preg_match('/^#(\d+)$/', $domain, $match)) {
+ $domainsearch = "";
+ $domainid = intval($match[1]);
+ } else {
$domainid = -1;
}