<% include("/elements/header.html",'Address Blocks', menubar('Main Menu' => $p)) %>
-%
-%
+
%use NetAddr::IP;
%
%my @addr_block = qsearch('addr_block', {});
%my $block;
%my $p2 = popurl(2);
%my $path = $p2 . "edit/process/addr_block";
-%
-%
-% if ($cgi->param('error')) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<%table()%>
% foreach $block (sort {$a->NetAddr cmp $b->NetAddr} @addr_block) {
<% include("/elements/header.html",'Virtual field definitions', menubar('Main Menu' => $p)) %>
-%
-%
+
%my %pvfs;
%my $block;
%my $p2 = popurl(2);
%foreach (qsearch('part_virtual_field', {})) {
% push @{ $pvfs{$_->dbtable} }, $_;
%}
-%
-% if ($cgi->param('error')) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<A HREF="<%$p2%>edit/part_virtual_field.cgi"><I>Add a new field</I></A><BR><BR>
% foreach $dbtable (sort { $a cmp $b } keys (%pvfs)) {
<% include("/elements/header.html",'Routers', menubar('Main Menu' => $p)) %>
%
-%
%my @router = qsearch('router', {});
%my $p2 = popurl(2);
-%
-%
-% if ($cgi->param('error')) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT>
- <BR><BR>
-% }
-%
+<% include('/elements/error.html') %>
+
%my $hidecustomerrouters = 0;
%my $hideurl = '';
%if ($cgi->param('hidecustomerrouters') eq '1') {
}
</SCRIPT>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="OneTrueForm" ACTION="config-process.cgi" METHOD="POST" enctype="multipart/form-data" onSubmit="SafeOnsubmit()">
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>">
'Main Menu' => $p,
'View all agents' => $p. 'browse/agent.cgi',
)) %>
-% if ( $cgi->param('error') ) {
-
-<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/agent.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
#'View all payment gateways' => $p. 'browse/payment_gateway.html',
'View all agents' => $p. 'browse/agent.html',
)) %>
-% if ( $cgi->param('error') ) {
-
-<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/agent_payment_gateway.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
'View all agent types' => "${p}browse/agent_type.cgi",
))
%>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% popurl(1) %>process/agent_type.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="typenum" VALUE="<% $agent_type->typenum %>">
<% header("Apply Payment", '') %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% $p1 %>process/cust_bill_pay.cgi" METHOD=POST>
<% include('/elements/header-popup.html', 'Enter Credit') %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="credit_popup" ACTION="<% $p1 %>process/cust_credit.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="crednum" VALUE="">
<% header("Apply Credit", '') %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% $p1 %>process/cust_credit_bill.cgi" METHOD=POST>
<% include('/elements/header-popup.html', "$action Customer Note") %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% popurl(1) %>process/cust_main_note.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<% include("/elements/header.html", $title, '') %>
% }
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
%
%
<% include('/elements/header.html', "Add/Edit Packages", '') %>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% $p1 %>process/cust_pkg.cgi" METHOD=POST>
<% include('/elements/header.html', 'Refund '. ucfirst(lc($payby)). ' payment', '') %>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<% small_custview($custnum, $conf->config('countrydefault')) %>
)
%>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
% my $url = $opt{'post_url'} || popurl(1)."process/$table.html";
<% header("Edit Message catalog" ) %>
<BR>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<% $widget->html %>
)
)
%>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% popurl(1) %>process/part_bill_event.cgi" NAME="editEvent" METHOD=POST>
<INPUT TYPE="hidden" NAME="eventpart" VALUE="<% $part_bill_event->eventpart %>">
'Main Menu' => popurl(2),
), ' onLoad="visualize()"')
%>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="dummy">
<INPUT TYPE="hidden" NAME="exportnum" VALUE="<% $part_export->exportnum %>">
)) %>
% #), ' onLoad="visualize()"');
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="dummy">
% }
%
% push @fixups, "pkg_svc$svcpart";
+%
+% my $quan = 0;
+% if ( $cgi->param("pkg_svc$svcpart") =~ /^\s*(\d+)\s*$/ ) {
+% $quan = $1;
+% } elsif ( $pkg_svc->quantity ) {
+% $quan = $pkg_svc->quantity;
+% }
+
<TR>
<TD>
- <INPUT TYPE="text" NAME="pkg_svc<% $svcpart %>" SIZE=4 MAXLENGTH=3 VALUE="<% $cgi->param("pkg_svc$svcpart") || $pkg_svc->quantity || 0 %>">
+ <INPUT TYPE="text" NAME="pkg_svc<% $svcpart %>" SIZE=4 MAXLENGTH=3 VALUE="<% $quan %>">
</TD>
<TD>
</TR></TABLE></TD></TR></TABLE>
-% foreach my $f ( qw( clone pkgnum ) ) {
-
- <INPUT TYPE="hidden" NAME="<% $f %>" VALUE="<% $cgi->param($f) %>">
-% }
+% foreach my $f ( qw( clone pkgnum ) ) { #safe, these were untained in %init
+ <INPUT TYPE="hidden" NAME="<% $f %>" VALUE="<% $cgi->param($f) %>">
+% }
<INPUT TYPE="hidden" NAME="pkgpart" VALUE="<% $part_pkg->pkgpart %>">
%
%
%
<% include('/elements/header.html', "$action Virtual Field Definition") %>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%$p1%>process/generic.cgi" METHOD="POST">
'Main Menu' => $p,
'View all payment gateways' => $p. 'browse/payment_gateway.html',
)) %>
-% if ( $cgi->param('error') ) {
-
-<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/payment_gateway.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="gatewaynum" VALUE="<% $payment_gateway->gatewaynum %>">
'Main Menu' => $p,
))
%>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#FF0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/reg_code.cgi" METHOD="POST" NAME="OneTrueForm" onSubmit="document.OneTrueForm.submit.disabled=true">
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agent->agentnum %>">
Generate
-<INPUT TYPE="text" NAME="num" VALUE="<% $cgi->param('num') %>" SIZE=5 MAXLENGTH=4>
+% my $num = '';
+% if ( $cgi->param('num') =~ /^\s*(\d+)\s*$/ ) {
+% $num = $1;
+% }
+<INPUT TYPE="text" NAME="num" VALUE="<% $num %>" SIZE=5 MAXLENGTH=4>
registration codes for <B><% $agent->agent %></B> allowing the following packages:
<BR><BR>
+
% foreach my $part_pkg ( qsearch('part_pkg', { 'disabled' => '' } ) ) {
+% my $pkgpart = $part_pkg->pkgpart;
+
+ <INPUT TYPE="checkbox" NAME="pkgpart<% $pkgpart %>" <% $cgi->param("pkgpart$pkgpart") ? 'CHECKED' : '' %>>
+ <% $part_pkg->pkg %> - <% $part_pkg->comment %>
+ <BR>
- <INPUT TYPE="checkbox" NAME="pkgpart<% $part_pkg->pkgpart %>">
- <% $part_pkg->pkg %> - <% $part_pkg->comment %>
- <BR>
% }
%));
%
%my $p3 = popurl(3);
-%
-%if($cgi->param('error')) {
-%
- <FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<%popurl(1)%>process/router.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="table" VALUE="router">
<% include("/elements/header.html","$action $svc account") %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
+
% if ( $cust_main ) {
<% include( '/elements/small_custview.html', $cust_main, '', 1,
%
-<%include("/elements/header.html","Broadband Service $action", '')%>
-% if ($cgi->param('error')) {
-
-<FONT SIZE="+1" COLOR="#ff0000">Error: <%$cgi->param('error')%></FONT><BR>
-% }
+<% include("/elements/header.html","Broadband Service $action", '') %>
+<% include('/elements/error.html') %>
Service #<B><%$svcnum ? $svcnum : "(NEW)"%></B><BR><BR>
<% include('/elements/header.html', "$action $svc", '') %>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% $p1 %>process/svc_domain.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
<% include("/elements/header.html","Mail Forward $action") %>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
Service #<% $svcnum ? "<B>$svcnum</B>" : " (NEW)" %><BR>
Service: <B><% $part_svc->svc %></B><BR><BR>
% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') |h %></FONT>
<BR><BR>
% }
menubar( 'Main Menu' => $p ),
)
%>
-% if ( $cgi->param('error') ) {
-
- <FONT SIZE="+1" COLOR="#ff0000"><% $cgi->param('error') %></FONT><BR><BR>
-% }
-
+<% include('/elements/error.html') %>
<FORM ACTION="process/batch-cust_pay.cgi" NAME="OneTrueForm" METHOD="POST" onsubmit="document.OneTrueForm.submit.disabled=true;">
<% include('/elements/header-popup.html', 'Cancel customer' ) %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="cust_cancel_popup" ACTION="<% popurl(1) %>cust_main-cancel.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="sc_popup" ACTION="<% popurl(1) %>process/cancel_pkg.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
<% include('/elements/header-popup.html', "Change Package") %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM ACTION="<% $p %>edit/process/cust_pkg.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
% }
%
%
-
+<%init>
+die "meta-import script not currently enabled"; #make XSS-safe if this is used for more than just admins to import data....
+</%init>
<% include('/elements/header-popup.html', 'Recharge Service' ) %>
-% if ( $cgi->param('error') ) {
- <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
- <BR><BR>
-% }
+<% include('/elements/error.html') %>
<FORM NAME="recharge_popup" ACTION="<% popurl(1) %>process/recharge_svc.html" METHOD=POST>
<INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
on open invoices. See Reports->Billing events->Billing events for current event reports.</FONT><BR><BR>
<FORM ACTION="cust_bill_event.cgi" METHOD="GET">
- <INPUT TYPE="hidden" NAME="failed" VALUE="<% $cgi->param('failed') %>">
+ <INPUT TYPE="hidden" NAME="failed" VALUE="<% $cgi->param('failed') ? 1 : 0 %>">
<TABLE>
<% include( '/elements/tr-select-agent.html' ) %>
%>
<FORM ACTION="cust_event.html" METHOD="GET">
- <INPUT TYPE="hidden" NAME="failed" VALUE="<% $cgi->param('failed') %>">
+ <INPUT TYPE="hidden" NAME="failed" VALUE="<% $cgi->param('failed') ? 1 : 0 %>">
<TABLE>
<% include( '/elements/tr-select-agent.html' ) %>