#!/usr/bin/perl -w use CGI qw(:standard); use DBI; require("hffgroup/cgi-lib.pl"); require("sql.lib"); &ReadParse(*input_data); if ($input_data{"submit"} eq "Enter") { hffconnect(); error_check("ar_hfflogin"); if ($ErrorMsg eq "") { my $usern = $input_data{"HFFUserName"}; my $psw = $input_data{"HFFPassword"}; my ($hffclient, $hffclient_code, $lastinvoiceno, $sales_tax, $defaulterm, $balwin, $actwin, $notwin, $hfflink, $hfflink_clientcode) = login($usern, $psw); if ($ErrorMsg eq "") { # my $cookie = cookie(-name => "username2", -value => $usern , -expires => '+30m' ,-path => '/' ); my $cookie = cookie(-name => "username2", -value => $usern , -expires => '+1h' ,-path => '/' ); my $cookie2 = cookie(-name => "hffclient", -value => $hffclient , -expires => '+365d' ,-path => '/' ); my $cookie3 = cookie(-name => "hffclient_code", -value => $hffclient_code , -expires => '+365d' ,-path => '/' ); my $cookie4 = cookie(-name => "lastinvoiceno", -value => $lastinvoiceno , -expires => '+365d' ,-path => '/' ); my $cookie5 = cookie(-name => "defaulterm", -value => $defaulterm , -expires => '+365d' ,-path => '/' ); my $cookie6 = cookie(-name => "sales_tax", -value => $sales_tax , -expires => '+365d' ,-path => '/' ); my $cookie7 = cookie(-name => "balwin", -value => $balwin , -expires => '+365d' ,-path => '/' ); my $cookie8 = cookie(-name => "actwin", -value => $actwin , -expires => '+365d' ,-path => '/' ); my $cookie9 = cookie(-name => "notwin", -value => $notwin , -expires => '+365d' ,-path => '/' ); my $cookie10 = cookie(-name => "hfflink", -value => $hfflink , -expires => '+365d' ,-path => '/' ); my $cookie11 = cookie(-name => "hfflink_clientcode", -value => $hfflink_clientcode , -expires => '+365d' ,-path => '/' ); my $application = cookie("application"); if ($application eq "") {$application = "ar.cgi";} if ($hfflink ne "") {$application = "ar_admin.cgi";} else { if ($application eq "ar_admin.cgi") {$application = "ar.cgi";} } insert_logs($usern, $application); print header(-cookie => [$cookie, $cookie2, $cookie3, $cookie4, $cookie5, $cookie6, $cookie7, $cookie8, $cookie9, $cookie10, $cookie11], -location => $application), start_html(), end_html(); } $dbh->disconnect(); } } print "Content-type: text/html\n\n"; print qq~
|
For questions or comments regarding this page, please contact CustomerService\@HFFCapital.com |