From eb061f5119325e666f0dff40d4089e5c1df58e17 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Sun, 16 Mar 2008 19:58:34 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'TRIXBOX_2_6'. --- httemplate/view/cust_main.cgi | 187 ------------------------------------------ 1 file changed, 187 deletions(-) delete mode 100755 httemplate/view/cust_main.cgi (limited to 'httemplate/view/cust_main.cgi') diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi deleted file mode 100755 index 4ca777d6a..000000000 --- a/httemplate/view/cust_main.cgi +++ /dev/null @@ -1,187 +0,0 @@ -<% include("/elements/header.html","Customer View: ". $cust_main->name ) %> - -% if ( $curuser->access_right('Edit customer') ) { - Edit this customer | -% } - - - - - - - - -% if ( $curuser->access_right('Cancel customer') -% && $cust_main->ncancelled_pkgs -% ) { - - <% cust_cancel_link($cust_main) %> | - -% } - -% if ( $conf->exists('deletecustomers') -% && $curuser->access_right('Delete customer') -% ) { - Delete this customer | -% } - -% unless ( $conf->exists('disable_customer_referrals') ) { - Refer a new customer | - View this customer's referrals -% } - -

- -% if ( $curuser->access_right('Billing event reports') -% || $curuser->access_right('View customer billing events') -% ) { - - View billing events for this customer -

- -% } - -%my $signupurl = $conf->config('signupurl'); -%if ( $signupurl ) { - This customer's signup URL: <% $signupurl %>?ref=<% $custnum %>

-% } - - - - - - - - -
- <% include('cust_main/contacts.html', $cust_main ) %> - - <% include('cust_main/misc.html', $cust_main ) %> -% if ( $conf->config('payby-default') ne 'HIDE' ) { - -
- <% include('cust_main/billing.html', $cust_main ) %> -% } - -
-% -%if ( $cust_main->comments =~ /[^\s\n\r]/ ) { -% - -
-Comments -<% ntable("#cccccc") %><% ntable("#cccccc",2) %> - - -
<% encode_entities($cust_main->comments) %>
- - - -% } -

-% my $notecount = scalar($cust_main->notes()); -% if ( ! $conf->exists('cust_main-disable_notes') || $notecount) { - -Notes
-% if ( $curuser->access_right('Add customer note') && -% ! $conf->exists('cust_main-disable_notes') -% ) { - - Add customer note - -% } - -
- -% if ($notecount) { - - - -% }else{ # make firefox happy wrt POSTDATA - - - -% } - -% } - - -% if ( $conf->config('ticket_system') ) { - -

- <% include('cust_main/tickets.html', $cust_main ) %> -% } - - -

- -% #XXX enable me# if ( $curuser->access_right('View customer packages') { -<% include('cust_main/packages.html', $cust_main ) %> -% #} - -% if ( $conf->config('payby-default') ne 'HIDE' ) { - <% include('cust_main/payment_history.html', $cust_main ) %> -% } - - -<% include('/elements/footer.html') %> -<%init> - -my $curuser = $FS::CurrentUser::CurrentUser; - -die "access denied" - unless $curuser->access_right('View customer'); - -my $conf = new FS::Conf; - -die "No customer specified (bad URL)!" unless $cgi->keywords; -my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array -$query =~ /^(\d+)$/; -my $custnum = $1; -my $cust_main = qsearchs( { - 'table' => 'cust_main', - 'hashref' => { 'custnum' => $custnum }, - 'extra_sql' => ' AND '. $curuser->agentnums_sql, -}); -die "Customer not found!" unless $cust_main; - - -<%once> - - -sub cust_cancel_link { cust_popup_link( 'misc/cancel_cust.html', - 'Cancel this customer', - 'Confirm Cancellation', - '#ff0000', - @_, - ); -} - -#false laziness w/view/cust_main/packages.html - -sub cust_popup_link { - my($action, $label, $actionlabel, $color, $cust_main) = @_; - $action .= '?'. $cust_main->custnum; - popup_link($action, $label, $actionlabel, $color); -} - -sub popup_link { - my($action, $label, $actionlabel, $color) = @_; - $color ||= '#333399'; - qq!$label!; - -# CLOSETEXT, '', -#WIDTH, 576, HEIGHT, 128, TEXTSIZE, 3, -#BGCOLOR, '#ff0000', CGCOLOR, '#ff0000' -} - - -- cgit v1.2.1