ispman/ispman-web/cgi-bin/tmpl/clients list.tmpl,1.2,1.2.8.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/clients
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27586/ispman-web/cgi-bin/tmpl/clients
Modified Files:
Tag: rel_1_2-bugfixes
list.tmpl
Log Message:
fixes bug [ 937936 ] resellers/clients not deletable
(merged from HEAD)
Index: list.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/clients/list.tmpl,v
retrieving revision 1.2
retrieving revision 1.2.8.1
diff -u -d -r1.2 -r1.2.8.1
--- list.tmpl 28 Apr 2003 14:47:05 -0000 1.2
+++ list.tmpl 1 Jul 2004 19:08:08 -0000 1.2.8.1
@@ -1,15 +1,3 @@
-
-<HTML>
-<HEAD>
-<TITLE>ISPMan summary</TITLE>
-<LINK HREF="<perl>$ispman->getConfig('ispmanUrlPrefix')</perl>/ispman.css" REL="stylesheet" TYPE="text/css">
-
-
-</HEAD>
-
-<BODY>
-
-
<FONT FACE="Helvetica, Arial" size=2>
<font class=pageTitle><perl>_("Summary of Clients")</perl></font>
@@ -26,25 +14,54 @@
<th><perl>_("ispmanClientName")</perl></th>
<th><perl>_("Display name")</perl></th>
<th><perl>_("# Domains")</perl></th>
+<th> </th>
</tr>
<perl>
my $clients=$ispman->getClients();
-my $text="";
for (keys %$clients){
- $text.="<tr>";
- $text.= sprintf ("<td><a href=$ENV{'SCRIPT_NAME'}?mode=editClient&ispmanClientId=%s>%s</a></td>", $clients->{$_}{'ispmanClientId'}, $clients->{$_}{'uid'} );
- $text.= sprintf ("<td>%s(%s)</td>", $ispman->getResellerNameById($clients->{$_}{'ispmanResellerId'}), $clients->{$_}{'ispmanResellerId'});
- $text.= sprintf ("<td>%s</td>", $clients->{$_}{'ispmanClientId'});
- $text.= sprintf ("<td>%s</td>", $clients->{$_}{'ispmanClientName'});
- $text.= sprintf ("<td>%s</td>", $clients->{$_}{'cn'});
- $text.= sprintf ("<td align=right>%s</td>", $ispman->getDomainCountForClient($clients->{$_}{'ispmanClientId'}));
- $text.="</tr>";
+ my $id = $clients->{$_}{'ispmanClientId'};
+ my $ndomains = $ispman->getDomainCountForClient($id);
+ $OUT.= qq|
+<tr>
+ <td>
+ <a href="$ENV{'SCRIPT_NAME'}?mode=editClient&ispmanClientId=$id">
+ @{[$clients->{$_}{'uid'}]}($id)
+ </a>
+ </td>
+ <td>@{[$ispman->getResellerNameById($clients->{$_}{'ispmanResellerId'})]}(@{[$clients->{$_}{'ispmanResellerId'}]})</td>
+ <td>@{[$clients->{$_}{'ispmanClientId'}]}</td>
+ <td>@{[$clients->{$_}{'ispmanClientName'}]}</td>
+ <td>@{[$clients->{$_}{'cn'}]}</td>
+ <td align=right>$ndomains</td>
+|;
+
+
+ if($ndomains==0)
+ {
+ $OUT.= qq|
+ <td>
+ <a href="$ENV{'SCRIPT_NAME'}?mode=ispmanDeleteClients&ispmanClientId=$id">
+ <img src="@{[$ispman->getConfig('ispmanUrlPrefix')]}/gfx/delete.gif"></a>
+ </td>
+|;
+ }
+ else
+ {
+ $OUT.= qq|
+ <td>
+ <img src="@{[$ispman->getConfig('ispmanUrlPrefix')]}/gfx/deleteGray.gif">
+ </td>
+|;
+ }
+
+
+ $OUT.="</tr>";
}
-$text
</perl>
</table>
-
+<hr>
+<perl>_("Note: Only clients without domains can be deleted.")</perl>
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com