2004-12-07 12:35:40 +00:00
|
|
|
<? /*
|
|
|
|
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
|
|
|
|
|
|
|
|
This file is part of CAcert.
|
|
|
|
|
|
|
|
CAcert has been released under the CAcert Source License
|
|
|
|
which can be found included with these source files or can
|
|
|
|
be downloaded from the internet from the following address:
|
|
|
|
http://www.cacert.org/src-lic.php
|
|
|
|
|
|
|
|
CAcert is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
|
|
|
PARTICULAR PURPOSE. See the License for more details.
|
|
|
|
*/ ?>
|
|
|
|
<?
|
|
|
|
if(intval($_GET['userid']) <= 0)
|
|
|
|
{
|
2005-12-04 21:04:05 +00:00
|
|
|
$domainsearch = $domain = mysql_escape_string(stripslashes($_POST['domain']));
|
|
|
|
if(!strstr($domain, "%"))
|
|
|
|
$domainsearch = "%$domain%";
|
|
|
|
if(intval($domain) > 0)
|
|
|
|
$domainsearch = "";
|
2004-12-07 12:35:40 +00:00
|
|
|
$query = "select `users`.`id` as `id`, `domains`.`domain` as `domain` from `users`,`domains`
|
2005-12-04 21:04:05 +00:00
|
|
|
where `users`.`id`=`domains`.`memid` and
|
|
|
|
(`domains`.`domain` like '$domainsearch' or `domains`.`id`='$domain') and
|
|
|
|
`domains`.`deleted`=0 and `users`.`deleted`=0 and
|
2004-12-07 13:21:06 +00:00
|
|
|
`users`.`verified`=1
|
2004-12-07 12:35:40 +00:00
|
|
|
group by `users`.`id` limit 100";
|
|
|
|
$res = mysql_query($query);
|
2005-12-04 21:04:05 +00:00
|
|
|
if(mysql_num_rows($res) >= 1) { ?>
|
2004-12-07 12:35:40 +00:00
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Select Specific Account Details")?></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{ ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Domain")?>:</td>
|
|
|
|
<td class="DataTD"><a href="account.php?id=43&userid=<?=$row['id']?>"><?=$row['domain']?></a></td>
|
|
|
|
</tr>
|
|
|
|
<? } if(mysql_num_rows($res) >= 100) { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><?=_("Only the first 100 rows are displayed.")?></td>
|
|
|
|
</tr>
|
|
|
|
<? } else { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
</table><br><br>
|
2005-12-04 21:04:05 +00:00
|
|
|
<? } elseif(mysql_num_rows($res) == 1) {
|
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
$_GET['userid'] = $row['id'];
|
|
|
|
} else {
|
|
|
|
// printf(_("No domains found matching %s"), $email);
|
|
|
|
}
|
|
|
|
|
|
|
|
$query = "select `orgid`,`domain` from `orgdomains` where `domain` like '$domainsearch' or `id`='$domain' limit 100";
|
|
|
|
$res = mysql_query($query);
|
|
|
|
if(mysql_num_rows($res) >= 1) { ?>
|
|
|
|
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
|
|
|
|
<tr>
|
|
|
|
<td colspan="5" class="title"><?=_("Select Specific Account Details")?></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
while($row = mysql_fetch_assoc($res))
|
|
|
|
{ ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD"><?=_("Domain")?>:</td>
|
|
|
|
<td class="DataTD"><a href="account.php?id=26&orgid=<?=$row['orgid']?>"><?=$row['domain']?></a></td>
|
|
|
|
</tr>
|
|
|
|
<? } if(mysql_num_rows($res) >= 100) { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><?=_("Only the first 100 rows are displayed.")?></td>
|
|
|
|
</tr>
|
|
|
|
<? } else { ?>
|
|
|
|
<tr>
|
|
|
|
<td class="DataTD" colspan="2"><? printf(_("%s rows displayed."), mysql_num_rows($res)); ?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
</table><br><br>
|
2004-12-07 12:35:40 +00:00
|
|
|
<? } elseif(mysql_num_rows($res) == 1) {
|
|
|
|
$row = mysql_fetch_assoc($res);
|
|
|
|
$_GET['userid'] = $row['id'];
|
|
|
|
} else {
|
|
|
|
printf(_("No domains found matching %s"), $email);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(intval($_GET['userid']) > 0)
|
|
|
|
{
|
|
|
|
header("location: account.php?id=43&userid=".$_GET['userid']);
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|