diff options
author | INOPIAE <inopiae@cacert.org> | 2013-01-09 14:20:33 +0100 |
---|---|---|
committer | INOPIAE <inopiae@cacert.org> | 2013-01-09 14:20:33 +0100 |
commit | c1856e28f8c8d55c1d49b533b10cc1b88e02984c (patch) | |
tree | 4cabad064e4647cabde3a002d6d6192eb76391aa /pages | |
parent | 5501ed2683fcffc9bb866e9120090dbf66eb374b (diff) | |
download | cacert-devel-c1856e28f8c8d55c1d49b533b10cc1b88e02984c.tar.gz cacert-devel-c1856e28f8c8d55c1d49b533b10cc1b88e02984c.tar.xz cacert-devel-c1856e28f8c8d55c1d49b533b10cc1b88e02984c.zip |
bug 1008: Add call on pages/account/43.php and small changes in pages/account/58.php
Diffstat (limited to 'pages')
-rw-r--r-- | pages/account/43.php | 70 | ||||
-rw-r--r-- | pages/account/58.php | 7 |
2 files changed, 39 insertions, 38 deletions
diff --git a/pages/account/43.php b/pages/account/43.php index 7bf6d04..100ee1d 100644 --- a/pages/account/43.php +++ b/pages/account/43.php @@ -53,14 +53,14 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); } else { // $email contains non-digits ==> search for mail addresses // Be defensive here (outer join) if primary mail is not listed in email table - $query = "select `users`.`id` as `id`, `email`.`email` as `email` + $query = "select `users`.`id` as `id`, `email`.`email` as `email` from `users` left outer join `email` on (`users`.`id`=`email`.`memid`) - where (`email`.`email` like '$emailsearch' + where (`email`.`email` like '$emailsearch' or `users`.`email` like '$emailsearch') and `users`.`deleted`=0 group by `users`.`id` limit 100"; } - // bug-975 ted+uli changes --- end + // bug-975 ted+uli changes --- end $res = mysql_query($query); if(mysql_num_rows($res) > 1) { ?> <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper"> @@ -338,7 +338,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); <td colspan="2" class="title"><?=_("Account State")?></td> </tr> -<? +<? // --- bug-975 begin --- // potential db inconsistency like in a20110804.1 // Admin console -> don't list user account @@ -359,7 +359,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); 4. email.email = primary-email (???) or'd not covered by admin console find user routine, but may block users login 5. users.verified = 0|1 - further "special settings" + further "special settings" 6. users.locked (setting displayed in display form) 7. users.assurer_blocked (setting displayed in display form) @@ -370,7 +370,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); 1. users.verified = 1 2. users.deleted = 0 3. users.locked = 0 - 4. users.email = primary-email + 4. users.email = primary-email --- Assurer, assure someone find user query select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' @@ -384,11 +384,11 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); 1. email.hash = '' Yes No No 2. email.deleted = 0 Yes No No 3. users.deleted = 0 Yes Yes Yes - 4. users.verified = 1 No Yes No + 4. users.verified = 1 No Yes No 5. users.locked = 0 No Yes No 6. users.email = prim-email No Yes Yes 7. email.email = prim-email Yes No No - + full usable account needs all 7 requirements fulfilled so if one setting isn't set/cleared there is an inconsistency either way if eg email.email is not avail, admin console cannot open user info @@ -432,7 +432,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); } - + if ($drow) { $eemail = $drow['eemail']; $edeleted = $drow['edeleted']; @@ -451,11 +451,11 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); } if ($edeleted!=0) { $inconsistency += 8; - $inccause .= (empty($inccause)?"":"<br>")._("Email record set deleted"); + $inccause .= (empty($inccause)?"":"<br>")._("Email record set deleted"); } if ($ehash!='') { $inconsistency += 16; - $inccause .= (empty($inccause)?"":"<br>")._("Email record hash not unset"); + $inccause .= (empty($inccause)?"":"<br>")._("Email record hash not unset"); } } else { $inconsistency = 32; @@ -474,14 +474,14 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); "operations and needs to be fixed manually through arbitration/critical ". "team.")?> </td> - </tr> + </tr> <? } // --- bug-975 end --- ?> </table> <br> -<? +<? // End - Debug infos ?> @@ -510,12 +510,12 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $total = $drow['total']; - + $maxexpire = "0000-00-00 00:00:00"; if ($drow['maxexpire']) { $maxexpire = $drow['maxexpire']; } - + if($total > 0) { $query = "select COUNT(*) as `valid` from `domains` inner join `domaincerts` @@ -526,7 +526,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $valid = $drow['valid']; - + $query = "select COUNT(*) as `expired` from `domains` inner join `domaincerts` on `domains`.`id` = `domaincerts`.`domid` @@ -535,7 +535,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $expired = $drow['expired']; - + $query = "select COUNT(*) as `revoked` from `domains` inner join `domaincerts` on `domains`.`id` = `domaincerts`.`domid` @@ -568,12 +568,12 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $total = $drow['total']; - + $maxexpire = "0000-00-00 00:00:00"; if ($drow['maxexpire']) { $maxexpire = $drow['maxexpire']; } - + if($total > 0) { $query = "select COUNT(*) as `valid` from `emailcerts` @@ -583,7 +583,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $valid = $drow['valid']; - + $query = "select COUNT(*) as `expired` from `emailcerts` where `memid` = '".intval($row['id'])."' @@ -591,7 +591,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $expired = $drow['expired']; - + $query = "select COUNT(*) as `revoked` from `emailcerts` where `memid` = '".intval($row['id'])."' @@ -623,12 +623,12 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $total = $drow['total']; - + $maxexpire = "0000-00-00 00:00:00"; if ($drow['maxexpire']) { $maxexpire = $drow['maxexpire']; } - + if($total > 0) { $query = "select COUNT(*) as `valid` from `gpg` @@ -637,7 +637,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $valid = $drow['valid']; - + $query = "select COUNT(*) as `expired` from `emailcerts` where `memid` = '".intval($row['id'])."' @@ -645,7 +645,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $expired = $drow['expired']; - + ?> <td class="DataTD"><?=intval($total)?></td> <td class="DataTD"><?=intval($valid)?></td> @@ -662,7 +662,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); </tr> <tr> - <td class="DataTD"><?=_("Org Server")?>:</td> + <td class="DataTD"<a href="account.php?id=58&userid=<?=intval($row['id'])?>"><?=_("Org Server")?></a>:</td> <? $query = "select COUNT(*) as `total`, MAX(`orgcerts`.`expire`) as `maxexpire` @@ -672,12 +672,12 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $total = $drow['total']; - + $maxexpire = "0000-00-00 00:00:00"; if ($drow['maxexpire']) { $maxexpire = $drow['maxexpire']; } - + if($total > 0) { $query = "select COUNT(*) as `valid` from `orgdomaincerts` as `orgcerts` inner join `org` @@ -688,7 +688,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $valid = $drow['valid']; - + $query = "select COUNT(*) as `expired` from `orgdomaincerts` as `orgcerts` inner join `org` on `orgcerts`.`orgid` = `org`.`orgid` @@ -697,7 +697,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $expired = $drow['expired']; - + $query = "select COUNT(*) as `revoked` from `orgdomaincerts` as `orgcerts` inner join `org` on `orgcerts`.`orgid` = `org`.`orgid` @@ -732,12 +732,12 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $total = $drow['total']; - + $maxexpire = "0000-00-00 00:00:00"; if ($drow['maxexpire']) { $maxexpire = $drow['maxexpire']; } - + if($total > 0) { $query = "select COUNT(*) as `valid` from `orgemailcerts` as `orgcerts` inner join `org` @@ -748,7 +748,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $valid = $drow['valid']; - + $query = "select COUNT(*) as `expired` from `orgemailcerts` as `orgcerts` inner join `org` on `orgcerts`.`orgid` = `org`.`orgid` @@ -757,7 +757,7 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php"); $dres = mysql_query($query); $drow = mysql_fetch_assoc($dres); $expired = $drow['expired']; - + $query = "select COUNT(*) as `revoked` from `orgemailcerts` as `orgcerts` inner join `org` on `orgcerts`.`orgid` = `org`.`orgid` @@ -884,7 +884,7 @@ function showassuredby() </table> <? } ?> <br><br> -<? } } +<? } } switch ($_GET['shownotary']) { diff --git a/pages/account/58.php b/pages/account/58.php index 44429e6..dda96e6 100644 --- a/pages/account/58.php +++ b/pages/account/58.php @@ -22,10 +22,11 @@ if ($_SESSION['profile']['admin'] != 1 || !array_key_exists('userid',$_REQUEST) echo _('You do not have access to this page'); } else { $user_id = intval($_REQUEST['userid']); + $query = "select * from `users` where `id`='$user_id' and `users`.`deleted`=0"; + $res = mysql_query($query); if(mysql_num_rows($res) <= 0){ echo _("I'm sorry, the user you were looking for seems to have disappeared! Bad things are a foot!"); } else { - $row = mysql_fetch_assoc($res); $query = "select `users`.`fname`, `users`.`mname`, `users`.`lname`, `orginfo`.`o`, `org`.`masteracc` FROM `users`, `orginfo`, `org` WHERE `users`.`id` = `org`.`memid` AND `orginfo`.`id` = `org`.`orgid` @@ -46,8 +47,8 @@ if ($_SESSION['profile']['admin'] != 1 || !array_key_exists('userid',$_REQUEST) </tr><? while($drow = mysql_fetch_assoc($res)){?> <tr> - <td class="DataTD"><?=$data['o']?></td> - <td class="DataTD"><?=$data['masteracc']?></td> + <td class="DataTD"><?=$drow['o']?></td> + <td class="DataTD"><?=$drow['masteracc'] ? _("Yes") : _("No") ?></td> </tr> <?} ?></table> |