From: <tom...@us...> - 2003-12-02 15:38:11
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1:/tmp/cvs-serv9136 Modified Files: user.c Log Message: add comments, minor code cleanup Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- user.c 13 Oct 2003 22:31:10 -0000 1.4 +++ user.c 2 Dec 2003 15:38:07 -0000 1.5 @@ -155,10 +155,12 @@ (AdminType==USER_ADMIN && strcmp(pw->pw_name,Username)==0)) { long diskquota = 0, maxmsg = 0; + /* display account name and user name */ fprintf(actout, "<tr bgcolor=%s>", get_color_text("000")); fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_name); fprintf(actout, "<td align=\"left\">%s</td>", pw->pw_gecos); + /* display user's quota */ snprintf(path, sizeof(path), "%s/Maildir", pw->pw_dir); readuserquota(path, &diskquota, &maxmsg); fprintf(actout, "<td align=\"right\">%-2.2lf / </td>", ((double)diskquota)/1048576.0); /* Convert to MB */ @@ -170,6 +172,7 @@ } else { fprintf(actout, "<td align=\"left\">%s</td>", get_html_text("229")); } + /* display button to modify user */ fprintf(actout, "<td align=\"center\">"); fprintf(actout, "<a href=\"%s/com/moduser?user=%s&dom=%s&time=%d&moduser=%s\">", CGIPATH,user,dom,mytime,pw->pw_name); @@ -189,6 +192,7 @@ allowdelete = 0; } + /* display trashcan for delete, or nothing if delete not allowed */ fprintf(actout, "<td align=\"center\">"); if (allowdelete) { fprintf(actout, "<a href=\"%s/com/deluser?user=%s&dom=%s&time=%d&deluser=%s\">", @@ -199,24 +203,21 @@ } fprintf(actout, "</td>"); + /* display button in the 'set catchall' column */ + fprintf(actout, "<td align=\"center\">"); if (bounced==0 && strncmp(pw->pw_name,TmpBuf3,sizeof(TmpBuf3)) == 0) { - fprintf(actout, "<td align=\"center\">"); fprintf(actout, "<img src=\"%s/radio-on.png\" border=\"0\"></a>", IMAGEURL); - fprintf(actout, "</td>"); } else if (AdminType==DOMAIN_ADMIN) { - fprintf(actout, "<td align=\"center\">"); fprintf(actout, "<a href=\"%s/com/setdefault?user=%s&dom=%s&time=%d&deluser=%s&page=%s\">", CGIPATH,user,dom,mytime,pw->pw_name,Pagenumber); fprintf(actout, "<img src=\"%s/radio-off.png\" border=\"0\"></a>", IMAGEURL); - fprintf(actout, "</td>"); } else { - fprintf(actout, "<td align=\"center\">"); fprintf(actout, "<img src=\"%s/disabled.png\" border=\"0\">", IMAGEURL); - fprintf(actout, "</td>"); } + fprintf(actout, "</td>"); fprintf(actout, "</tr>\n"); } |