freeside/httemplate/view svc_acct.cgi,1.40,1.41
ivan
ivan at pouncequick.420.am
Wed Apr 13 05:31:32 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv22876/view
Modified Files:
svc_acct.cgi
Log Message:
get rid of some super ancient assumptions about slipip and uid meaning exporting to RADIUS and shell respectively
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_acct.cgi,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- svc_acct.cgi 12 Oct 2004 21:59:08 -0000 1.40
+++ svc_acct.cgi 13 Apr 2005 12:31:30 -0000 1.41
@@ -204,49 +204,80 @@
"<TD BGCOLOR=\"#ffffff\">". $svc_acct_pop->text. '</TD></TR>'
if $svc_acct_pop;
-if ($svc_acct->uid ne '') {
- print "<TR><TD ALIGN=\"right\">Uid</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->uid. "</TD></TR>",
- "<TR><TD ALIGN=\"right\">Gid</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->gid. "</TD></TR>",
- "<TR><TD ALIGN=\"right\">GECOS</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->finger. "</TD></TR>",
- "<TR><TD ALIGN=\"right\">Home directory</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->dir. "</TD></TR>",
- "<TR><TD ALIGN=\"right\">Shell</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->shell. "</TD></TR>",
- "<TR><TD ALIGN=\"right\">Quota</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->quota. "</TD></TR>"
- ;
-} else {
- print "<TR><TH COLSPAN=2>(No shell account)</TH></TR>";
-}
+%>
-if ($svc_acct->slipip) {
- print "<TR><TD ALIGN=\"right\">IP address</TD><TD BGCOLOR=\"#ffffff\">".
- ( ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
- ? "<I>(Dynamic)</I>"
- : $svc_acct->slipip
- ). "</TD>";
- my($attribute);
- foreach $attribute ( grep /^radius_/, $svc_acct->fields ) {
- #warn $attribute;
- $attribute =~ /^radius_(.*)$/;
- my $pattribute = $FS::raddb::attrib{$1};
- print "<TR><TD ALIGN=\"right\">Radius (reply) $pattribute</TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute).
- "</TD></TR>";
- }
- foreach $attribute ( grep /^rc_/, $svc_acct->fields ) {
- #warn $attribute;
- $attribute =~ /^rc_(.*)$/;
- my $pattribute = $FS::raddb::attrib{$1};
- print "<TR><TD ALIGN=\"right\">Radius (check) $pattribute: </TD>".
- "<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute).
- "</TD></TR>";
- }
-} else {
- print "<TR><TH COLSPAN=2>(No SLIP/PPP account)</TH></TR>";
+<% if ($svc_acct->uid ne '') { %>
+ <TR>
+ <TD ALIGN="right">UID</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->uid %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->gid ne '') { %>
+ <TR>
+ <TD ALIGN="right">GID</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->gid %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->finger ne '') { %>
+ <TR>
+ <TD ALIGN="right">GECOS</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->finger %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->dir ne '') { %>
+ <TR>
+ <TD ALIGN="right">Home directory</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->dir %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->shell ne '') { %>
+ <TR>
+ <TD ALIGN="right">Shell</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->shell %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->quota ne '') { %>
+ <TR>
+ <TD ALIGN="right">Quota</TD>
+ <TD BGCOLOR="#ffffff"><%= $svc_acct->quota %></TD>
+ </TR>
+<% } %>
+
+<% if ($svc_acct->slipip) { %>
+ <TR>
+ <TD ALIGN="right">IP address</TD>
+ <TD BGCOLOR="#ffffff">
+ <%= ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
+ ? "<I>(Dynamic)</I>"
+ : $svc_acct->slipip
+ %>
+ </TD>
+ </TR>
+<% } %>
+
+<%
+
+my($attribute);
+foreach $attribute ( grep /^radius_/, $svc_acct->fields ) {
+ #warn $attribute;
+ $attribute =~ /^radius_(.*)$/;
+ my $pattribute = $FS::raddb::attrib{$1};
+ print "<TR><TD ALIGN=\"right\">Radius (reply) $pattribute</TD>".
+ "<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute).
+ "</TD></TR>";
+}
+foreach $attribute ( grep /^rc_/, $svc_acct->fields ) {
+ #warn $attribute;
+ $attribute =~ /^rc_(.*)$/;
+ my $pattribute = $FS::raddb::attrib{$1};
+ print "<TR><TD ALIGN=\"right\">Radius (check) $pattribute: </TD>".
+ "<TD BGCOLOR=\"#ffffff\">". $svc_acct->getfield($attribute).
+ "</TD></TR>";
}
print '<TR><TD ALIGN="right">RADIUS groups</TD><TD BGCOLOR="#ffffff">'.
More information about the freeside-commits
mailing list