X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htetc%2Fglobal.asa;h=3781f947d16a5782c412eefd9fc53349c2423ceb;hp=5cfcca6b431f1fcaf9ac31ca976a0145244be83c;hb=c2146ae32fdef80049abfa13098db2d45f3ebdd5;hpb=52a2dbebe522c0866e18f09a169d39a0cbd4d7b8 diff --git a/htetc/global.asa b/htetc/global.asa index 5cfcca6b4..3781f947d 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -10,15 +10,19 @@ use CGI 2.47; use Date::Format; use Date::Parse; use Time::Local; +use Time::Duration; use Tie::IxHash; use HTML::Entities; 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; @@ -29,9 +33,11 @@ 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; +use FS::TicketSystem; use FS::agent; use FS::agent_type; @@ -205,9 +211,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; }