summaryrefslogtreecommitdiff
path: root/htetc/global.asa
blob: d04a5edbf54268c92e09f2fcb4e1242c79634d62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use strict;
use vars qw( $cgi $p );
use CGI;
#use CGI::Carp qw(fatalsToBrowser);
use Date::Format;
use Date::Parse;
use Tie::IxHash;
use HTML::Entities;
use IO::Handle;
use IO::File;
use String::Approx qw(amatch);
use HTML::Widgets::SelectLayers 0.02;
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);
use FS::Msgcat qw(gettext geterror);

use FS::agent;
use FS::agent_type;
use FS::domain_record;
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_county;
use FS::cust_pay;
use FS::cust_pkg;
use FS::cust_refund;
use FS::cust_svc;
use FS::nas;
use FS::part_bill_event;
use FS::part_pkg;
use FS::part_referral;
use FS::part_svc;
use FS::pkg_svc;
use FS::port;
use FS::queue qw(joblisting);
use FS::raddb;
use FS::session;
use FS::svc_acct;
use FS::svc_acct_pop qw(popselector);
use FS::svc_acct_sm;
use FS::svc_domain;
use FS::svc_forward;
use FS::svc_www;
use FS::type_pkgs;
use FS::part_export;
use FS::part_export_option;
use FS::export_svc;
use FS::msgcat;

sub Script_OnStart {
  $Response->AddHeader('Pragma' => 'no-cache');
  $Response->AddHeader('Cache-control' => 'no-cache');
#  $Response->AddHeader('Expires' => 0);
  $Response->{Expires} = -36288000;

  $cgi = new CGI;
  &cgisuidsetup($cgi);
  $p = popurl(2);
  #print $cgi->header( '-expires' => 'now' );
}

sub Script_OnFlush {
  my $ref = $Response->{BinaryRef};
  $$ref = $cgi->header( @FS::CGI::header ) . $$ref;
  if ( dbh->can('sprintProfile') ) {

    $$ref =~ s/<\/BODY>[\s\n]*<\/HTML>[\s\n]*$//i
      or warn "can't remove";
  
    #$$ref .= '<PRE>'. ("\n"x96). encode_entities(dbh->sprintProfile()). '</PRE>';
    #  wtf?  konqueror...
    $$ref .= '<PRE>'. ("\n"x4096). encode_entities(dbh->sprintProfile()). '</PRE>';

    $$ref .= '</BODY></HTML>';
    
    dbh->{'private_profile'} = {};
  }
}