summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2013-12-08 14:12:55 +0100
committerINOPIAE <inopiae@cacert.org>2013-12-08 14:12:55 +0100
commit91d56d5b8bac51581a419bf80e3a5d044ee5476c (patch)
tree37555c269e8d1767cfe5394a92450092bbf39738
parent1d0a062885bc55193851138c336d828feff82630 (diff)
downloadcacert-devel-91d56d5b8bac51581a419bf80e3a5d044ee5476c.tar.gz
cacert-devel-91d56d5b8bac51581a419bf80e3a5d044ee5476c.tar.xz
cacert-devel-91d56d5b8bac51581a419bf80e3a5d044ee5476c.zip
bug 1138: added function get_domains
-rw-r--r--includes/notary.inc.php40
-rw-r--r--pages/account/43.php6
-rw-r--r--pages/account/59.php20
3 files changed, 59 insertions, 7 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index b9a13d2..54c3f60 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -1188,6 +1188,7 @@ function get_alerts($userid){
* @return
*/
function get_email_address($userid, $primary,$deleted=0){
+ //should be entered in account/2.php
$userid = intval($userid);
$filter='';
if (0==$deleted) {
@@ -1200,6 +1201,17 @@ function get_email_address($userid, $primary,$deleted=0){
return mysql_query($query);
}
+function get_domains($userid, $deleted=0){
+ //should be entered in account/9.php
+ $userid = intval($userid);
+ $filter='';
+ if (0==$deleted) {
+ $filter=' and `deleted`=0';
+ }
+ $query = "select * from `domains` where `memid`='".$userid."' and `hash`=''".$filter." order by `created`";
+ return mysql_query($query);
+}
+
function output_log_email_header(){
?>
<tr
@@ -1221,8 +1233,30 @@ function output_log_email($row,$primary){
}
<tr>
- <td class="<?$bold . $italic ?>">$row['email']</td>
- <td class="<?$bold . $italic ?>">$row['created']</td>
- <td class="<?$bold . $italic ?>">$row['deleted']</td>
+ <td class="<? $bold . $italic ?>">$row['email']</td>
+ <td class="<? $bold . $italic ?>">$row['created']</td>
+ <td class="<? $bold . $italic ?>">$row['deleted']</td>
+ </tr>
+}
+
+function output_log_domains_header(){
+ ?>
+ <tr
+ <td>_("Domain")</td>
+ <td>_("Created")</td>
+ <td>_("Deleted")</td>
+ </tr>
+
+ <?
+}
+function output_log_domains($row){
+ $italic='';
+ if (0==$row['deleted']) {
+ $italic='italic ';
+ }
+ <tr>
+ <td class="<? $italic ?>">$row['domain']</td>
+ <td class="<? $italic ?>">$row['created']</td>
+ <td class="<? $italic ?>">$row['deleted']</td>
</tr>
} \ No newline at end of file
diff --git a/pages/account/43.php b/pages/account/43.php
index 8dcedad..2ba94b0 100644
--- a/pages/account/43.php
+++ b/pages/account/43.php
@@ -346,8 +346,10 @@ include_once($_SESSION['_config']['filepath']."/includes/notary.inc.php");
</table>
<br><? } ?>
<?
- $query = "select * from `domains` where `memid`='".intval($row['id'])."' and `deleted`=0 and `hash`=''";
- $dres = mysql_query($query);
+// comment to be deleted before release
+// $query = "select * from `domains` where `memid`='".intval($row['id'])."' and `deleted`=0 and `hash`=''";
+// $dres = mysql_query($query);
+ $dres=get_domains(intval($row['id']));
if(mysql_num_rows($dres) > 0) { ?>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
diff --git a/pages/account/59.php b/pages/account/59.php
index 53c885b..e794e97 100644
--- a/pages/account/59.php
+++ b/pages/account/59.php
@@ -31,7 +31,7 @@ $name = $fname." ".$mname." ".$lname." ".$suffix;
$email = $row['email'];
$alerts =get_alerts($userid)
?>
-<table>
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
<td colspan="<? $colspandefault ?>" class="title"><?=sprintf(_('Account history of %s'),'username')?></td>
</tr>
@@ -103,7 +103,7 @@ $alerts =get_alerts($userid)
$dres = get_email_address($userid,'',1);
if(mysql_num_rows($dres) > 0) {
?>
-<table>
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>
<td colspan="3" class="title"><?=_('Email addresses')?></td>
</tr>
@@ -115,6 +115,22 @@ while($drow = mysql_fetch_assoc($dres))
} ?>
</table>
<br/>
+<?
+$dres = get_domains($userid,'',1);
+if(mysql_num_rows($dres) > 0) {
+?>
+<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
+ <tr>
+ <td colspan="3" class="title"><?=_('Domains')?></td>
+ </tr>
+<?
+output_log_domain_header();
+while($drow = mysql_fetch_assoc($dres))
+{
+ output_log_domain($drow,$email);
+} ?>
+</table>
+<br/>
<table>
<tr>