X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htetc%2Fglobal.asa;h=bb30608a4dc8d61348cec98f32c75526158fa379;hb=a5a4afbb77bbdffc25ae94d10b645b0bcc76e859;hp=612f6f4af51c20aef52d9f804f6cd55be987733f;hpb=0d1d2630e726ab4ce32bab9c3e4a889eee43fcb4;p=freeside.git diff --git a/htetc/global.asa b/htetc/global.asa index 612f6f4af..bb30608a4 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -10,25 +10,32 @@ use CGI 2.47; use Date::Format; use Date::Parse; use Time::Local; +use Time::Duration; use Tie::IxHash; +use URI::Escape; use HTML::Entities; +use JSON; use IO::Handle; use IO::File; +use IO::Scalar; use Net::Whois::Raw qw(whois); if ( $] < 5.006 ) { eval "use Net::Whois::Raw 0.32 qw(whois)"; die $@ if $@; } +use Text::CSV_XS; +use Spreadsheet::WriteExcel; use Business::CreditCard; use String::Approx qw(amatch); use Chart::LinesPoints; -use HTML::Widgets::SelectLayers 0.03; +use HTML::Widgets::SelectLayers 0.05; use FS; use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name); use FS::Record qw(qsearch qsearchs fields dbdef); use FS::Conf; use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot small_custview myexit http_header); +use FS::UI::Web; use FS::Msgcat qw(gettext geterror); use FS::Misc qw( send_email ); use FS::Report::Table::Monthly; @@ -41,7 +48,7 @@ use FS::cust_bill; use FS::cust_bill_pay; use FS::cust_credit; use FS::cust_credit_bill; -use FS::cust_main; +use FS::cust_main qw(smart_search); use FS::cust_main_county; use FS::cust_pay; use FS::cust_pkg; @@ -76,6 +83,8 @@ use FS::msgcat; use FS::rate; use FS::rate_region; use FS::rate_prefix; +use FS::payment_gateway; +use FS::agent_payment_gateway; sub Script_OnStart { $Response->AddHeader('Cache-control' => 'no-cache'); @@ -206,9 +215,16 @@ sub sprintAutoProfile { } sub include { - ( my $file = shift ) =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); + my $file = shift; + my $shift = 0; + if ( $file =~ m(^([^/].*)/[^/]+) ) { + unshift @{$Response->{asp}{includes_dir}}, "./$1"; + $shift = 1; + } + $file =~ s(^/)(%%%FREESIDE_DOCUMENT_ROOT%%%/); #broken in 5.005# ${$Response->TrapInclude($file, @_)}; my $ref = $Response->TrapInclude($file, @_); + shift @{$Response->{asp}{includes_dir}} if $shift; $$ref; }