X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htetc%2Fglobal.asa;h=bb30608a4dc8d61348cec98f32c75526158fa379;hp=5652a6f4f5e2235c1ec9cd8d9b31e995822560d7;hb=d8b70477cf7fd3b87464940f13e85547ccdbd31d;hpb=654234a526b5447ec02970962cccb1cf879796c8 diff --git a/htetc/global.asa b/htetc/global.asa index 5652a6f4f..bb30608a4 100644 --- a/htetc/global.asa +++ b/htetc/global.asa @@ -10,21 +10,36 @@ 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; +use FS::TicketSystem; use FS::agent; use FS::agent_type; @@ -33,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; @@ -65,9 +80,13 @@ use FS::part_export; use FS::part_export_option; use FS::export_svc; 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('Pragma' => 'no-cache'); $Response->AddHeader('Cache-control' => 'no-cache'); # $Response->AddHeader('Expires' => 0); $Response->{Expires} = -36288000; @@ -196,7 +215,17 @@ sub sprintAutoProfile { } sub include { - $Response->Include(@_); + 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; } if ( defined(@DBIx::Profile::ISA) ) {