summaryrefslogtreecommitdiff
blob: 3b21e2d15c51dd9b758f68796e87516effce44b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff -aNru pfa/admin/create-admin.php postfixAdmin/admin/create-admin.php
--- pfa/admin/create-admin.php	2006-02-08 19:00:47.510456000 +0100
+++ postfixAdmin/admin/create-admin.php	2006-02-09 16:07:48.646646750 +0100
@@ -79,7 +79,7 @@
       $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text'];
 
 
-      $result = db_query ("INSERT INTO admin (username,password,created,modified) VALUES ('$fUsername','$password',NOW(),NOW())");
+      $result = db_query ("INSERT INTO admin (username,password,created,modified,active) VALUES ('$fUsername','$password',NOW(),NOW(),'t')");
       if ($result['rows'] != 1)
       {
          $tMessage = $PALANG['pAdminCreate_admin_result_error'] . "<br />($fUsername)<br />";
diff -aNru pfa/admin/create-domain.php postfixAdmin/admin/create-domain.php
--- pfa/admin/create-domain.php	2006-02-08 19:00:47.574460000 +0100
+++ postfixAdmin/admin/create-domain.php	2006-02-09 16:05:24.385631000 +0100
@@ -81,14 +81,14 @@
          $fAliases = -1;
          $fMailboxes = -1;
          $fMaxquota = -1;
-         $fBackupmx = 1;
+         $fBackupmx = 't';
       }
       else
       {
-         $fBackupmx = 0;
+         $fBackupmx = 'f';
       }
       
-      $result = db_query ("INSERT INTO domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport',$fBackupmx,NOW(),NOW())");
+      $result = db_query ("INSERT INTO domain (domain,description,aliases,mailboxes,maxquota,transport,backupmx,created,modified) VALUES ('$fDomain','$fDescription',$fAliases,$fMailboxes,$fMaxquota,'$fTransport','$fBackupmx',NOW(),NOW())");
       if ($result['rows'] != 1)
       {
          $tMessage = $PALANG['pAdminCreate_domain_result_error'] . "<br />($fDomain)<br />";
diff -aNru pfa/admin/edit-active-admin.php postfixAdmin/admin/edit-active-admin.php
--- pfa/admin/edit-active-admin.php	2006-02-08 19:00:47.674466250 +0100
+++ postfixAdmin/admin/edit-active-admin.php	2006-02-09 15:54:24.412385250 +0100
@@ -25,8 +25,8 @@
 if ($_SERVER['REQUEST_METHOD'] == "GET")
 {
    if (isset ($_GET['username'])) $fUsername = escape_string ($_GET['username']);
-   
-   $result = db_query ("UPDATE admin SET active=1-active WHERE username='$fUsername'");
+
+   $result = db_query ("UPDATE admin SET active=NOT active WHERE username='$fUsername'");
    if ($result['rows'] != 1)
    {
       $error = 1;
diff -aNru pfa/admin/edit-active-domain.php postfixAdmin/admin/edit-active-domain.php
--- pfa/admin/edit-active-domain.php	2006-02-08 19:00:47.706468250 +0100
+++ postfixAdmin/admin/edit-active-domain.php	2006-02-09 15:54:45.329692500 +0100
@@ -26,7 +26,7 @@
 {
    if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
    
-   $result = db_query ("UPDATE domain SET active=1-active WHERE domain='$fDomain'");
+   $result = db_query ("UPDATE domain SET active=NOT active WHERE domain='$fDomain'");
    if ($result['rows'] != 1)
    {
       $error = 1;
diff -aNru pfa/admin/edit-active.php postfixAdmin/admin/edit-active.php
--- pfa/admin/edit-active.php	2006-02-08 19:00:47.742470500 +0100
+++ postfixAdmin/admin/edit-active.php	2006-02-09 15:58:32.827910250 +0100
@@ -28,7 +28,7 @@
    if (isset ($_GET['username'])) $fUsername = escape_string ($_GET['username']);
    if (isset ($_GET['domain'])) $fDomain = escape_string ($_GET['domain']);
    
-   $result = db_query ("UPDATE mailbox SET active=1-active WHERE username='$fUsername' AND domain='$fDomain'");
+   $result = db_query ("UPDATE mailbox SET active= NOT active WHERE username='$fUsername' AND domain='$fDomain'");
    if ($result['rows'] != 1)
    {
       $error = 1;
diff -aNru pfa/admin/edit-admin.php postfixAdmin/admin/edit-admin.php
--- pfa/admin/edit-admin.php	2006-02-08 19:00:47.774472500 +0100
+++ postfixAdmin/admin/edit-admin.php	2006-02-09 16:10:36.421132000 +0100
@@ -75,13 +75,15 @@
 
       if (empty ($fPassword) and empty ($fPassword2))
       {
-         if ($fActive == "on") $fActive = 1;
+         if ($fActive == "on") $fActive = 't';
+	 else $fActive = 'f';
          $result = db_query ("UPDATE admin SET modified=NOW(),active='$fActive' WHERE username='$username'");
       }
       else
       {
          $password = pacrypt ($fPassword);
-         if ($fActive == "on") $fActive = 1;
+         if ($fActive == "on") $fActive = 't';
+	 else $fActive = 'f';
          $result = db_query ("UPDATE admin SET password='$password',modified=NOW(),active='$fActive' WHERE username='$username'");
       }
 
diff -aNru pfa/admin/viewlog.php postfixAdmin/admin/viewlog.php
--- pfa/admin/viewlog.php	2006-02-08 19:00:48.074491250 +0100
+++ postfixAdmin/admin/viewlog.php	2006-02-08 17:51:06.043514250 +0100
@@ -30,7 +30,7 @@
 
    if ((is_array ($list_domains) and sizeof ($list_domains) > 0)) $fDomain = $list_domains[0];
 
-   $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
+   $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 100");
    if ($result['rows'] > 0)
    {
       while ($row = db_array ($result['result']))
@@ -49,7 +49,7 @@
 {
    $fDomain = escape_string ($_POST['fDomain']);
    
-   $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 10");
+   $result = db_query ("SELECT * FROM log WHERE domain='$fDomain' ORDER BY timestamp DESC LIMIT 100");
    if ($result['rows'] > 0)
    {
       while ($row = db_array ($result['result']))
diff -aNru pfa/edit-active.php postfixAdmin/edit-active.php
--- pfa/edit-active.php	2006-02-08 19:00:48.222500500 +0100
+++ postfixAdmin/edit-active.php	2006-02-09 16:14:10.890535500 +0100
@@ -37,7 +37,7 @@
    }
    else
    {
-      $result = db_query ("UPDATE mailbox SET active=1-active WHERE username='$fUsername' AND domain='$fDomain'");
+      $result = db_query ("UPDATE mailbox SET active=NOT active WHERE username='$fUsername' AND domain='$fDomain'");
       if ($result['rows'] != 1)
       {
          $error = 1;
diff -aNru pfa/templates/admin_list-virtual.tpl postfixAdmin/templates/admin_list-virtual.tpl
--- pfa/templates/admin_list-virtual.tpl	2006-02-08 19:00:50.090617250 +0100
+++ postfixAdmin/templates/admin_list-virtual.tpl	2006-02-09 16:01:38.463511750 +0100
@@ -95,7 +95,7 @@
          print "      <td>" . $tMailbox[$i]['name'] . "</td>\n";
          if ($CONF['quota'] == 'YES') print "      <td>" . $tMailbox[$i]['quota'] / $CONF['quota_multiplier'] . "</td>\n";
          print "      <td>" . $tMailbox[$i]['modified'] . "</td>\n";
-         $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
+         $active = ($tMailbox[$i]['active'] == 't') ? $PALANG['YES'] : $PALANG['NO'];
          print "      <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n";
          print "      <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n";
          print "      <td><a href=\"delete.php?table=mailbox" . "&delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";
diff -aNru pfa/templates/overview.tpl postfixAdmin/templates/overview.tpl
--- pfa/templates/overview.tpl	2006-02-08 19:00:50.650652250 +0100
+++ postfixAdmin/templates/overview.tpl	2006-02-09 16:16:36.891660000 +0100
@@ -127,7 +127,7 @@
             print "</td>\n";
          }
          print "      <td>" . $tMailbox[$i]['modified'] . "</td>\n";
-         $active = ($tMailbox[$i]['active'] == 1) ? $PALANG['YES'] : $PALANG['NO'];
+         $active = ($tMailbox[$i]['active'] == 't') ? $PALANG['YES'] : $PALANG['NO'];
          print "      <td><a href=\"edit-active.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $active . "</a></td>\n";
          print "      <td><a href=\"edit-mailbox.php?username=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\">" . $PALANG['edit'] . "</a></td>\n";
          print "      <td><a href=\"delete.php?delete=" . urlencode ($tMailbox[$i]['username']) . "&domain=$fDomain" . "\"onclick=\"return confirm ('" . $PALANG['confirm'] . $PALANG['pOverview_get_mailboxes'] . ": ". $tMailbox[$i]['username'] . "')\">" . $PALANG['del'] . "</a></td>\n";