#!/usr/bin/perl -I../../../.. package Pos::Webtop::Web::OEM::2; use strict; use Pos::Webtop::Toolbox(); use Pos::Webtop::OcxLauncher(); # --------------------------------------------------------------- # OEM #2 # Birch Telecom HTML Framework # --------------------------------------------------------------- sub new { my $this = shift; my $class = ref($this) || $this; my $self; my ($oemId) = @{{@_}}{qw/oemId/}; if ( not defined $self ) { $self = {}; bless($self,$class); } $self->{'oemId'} = $oemId; return $self; } sub setOemInformation { my $self = shift; my ($id, $name, $rebrandName, $short, $vpnProductName, $webtopProductName, $customerServiceUrl, $customerServicePhone, $learnMoreUrl, $installerPath, $webtopUrl, $gettingStartedUrl, $helpUrl, $supportEmail, $domain, $webtopTutorialUrl, $clientTutorialUrl, $pmTutorialUrl, $oemWebtopContactUrl, $oemNetconInstallerPath, $oemNetworkConnectorName, $webtopSupportToolLink, $webtopInstallerPath) = @{{@_}}{qw/id name rebrandName short vpnProductName webtopProductName customerServiceUrl customerServicePhone learnMoreUrl installerPath webtopUrl gettingStartedUrl helpUrl supportEmail domain webtopTutorialUrl clientTutorialUrl pmTutorialUrl webtopContactUrl netconInstallerPath networkConnectorName webtopSupportToolLink webtopInstallerPath/}; $self->{'id'} = $id; $self->{'name'} = $name; $self->{'rebrandName'} = $rebrandName; $self->{'short'} = $short; $self->{'vpnProductName'} = $vpnProductName; $self->{'webtopProductName'} = $webtopProductName; $self->{'customerServiceUrl'} = $customerServiceUrl; $self->{'customerServicePhone'} = $customerServicePhone; $self->{'learnMoreUrl'} = $learnMoreUrl; $self->{'installerPath'} = $installerPath; $self->{'webtopUrl'} = $webtopUrl; $self->{'gettingStartedUrl'} = $gettingStartedUrl; $self->{'helpUrl'} = $helpUrl; $self->{'supportEmail'} = $supportEmail; $self->{'domain'} = $domain; $self->{'webtopTutorialUrl'} = $webtopTutorialUrl; $self->{'clientTutorialUrl'} = $clientTutorialUrl; $self->{'pmTutorialUrl'} = $pmTutorialUrl; $self->{'webtopContactUrl'} = $oemWebtopContactUrl; $self->{'networkConnectorName'} = $oemNetworkConnectorName; $self->{'webtopSupportToolLink'} = $webtopSupportToolLink; $self->{'webtopInstallerPath'} = $webtopInstallerPath; return 1; } sub getSetting { my $self = shift; my $setting = @{{@_}}{qw/setting/}; return $self->{$setting}; } sub printHtmlHeader { my $self = shift; my ($title,$isLogin) = @{{@_}}{qw/title isLogin/}; my $tb; my $launcherJs = ""; if (not defined($title)) { $title = ""; } if (!$isLogin) { $tb = Pos::Webtop::Toolbox->new(); $launcherJs = Pos::Webtop::OcxLauncher::getLauncherHtml( tb=>$tb ); } my $oemStylesheetFileVersion = Pos::Webtop::Web::OEMLoader::getStylesheetFileVersion(oemId=> $self->{'oemId'}); # print "Content-type: text/html\n\n # # # # # $title # # # # "; print "Content-type: text/html\n\n " . HTML::Entities::encode($title) . " {'oemId'} . "/stylesheet.css?version='$oemStylesheetFileVersion'\" type='text/css' rel='stylesheet'> " . $launcherJs . " "; } sub printBodyHeader { my $self = shift; my ($onLoad) = @{{@_}}{qw/onLoad/}; print "
"; # print "
# # # # #
#
# # # # # # # # #
  #

#
#
# # # # » # options #
#
#
# #
#
#
 
"; } sub printBodyContent { my $self = shift; my ($mode,$desc,$b1) = @{{@_}}{qw/mode desc b1/}; if( defined $mode and $mode eq 'vpn') { print "
Installing the BirchNet VPN client

Please sign on to download the BirchNet VPN client software.

"; } elsif( defined $mode and $mode eq 'netcon' ) { print "
Installing the BirchNet Network Connector

Please sign on to download the BirchNet Network Connector software.

"; } else { print "

BirchNet WebTop

Your personalized environment for accessing your organization's resources
and data through any standard Internet browser. "; my $learnMoreUrl = $self->getSetting(setting => 'learnMoreUrl'); print " Learn more " if defined $learnMoreUrl; print "

"; } print $b1->getHeaderHtml(); print " "; } sub printPasswordHelp { my $self = shift; print " \"Password "; } sub printBodyContentFooter { my $self = shift; my ($err,$b1) = @{{@_}}{qw/err b1/}; # This is closing the signon table because earthlink wanted text to show # up under the buttons in the same cell so i close it here and you can add stuff where you want print "
"; print $b1->getFooterHtml(); # print "
"; print "

"; if ( defined $err ) { print "$err"; } else { print "

Please enter your username and password.

"; } print "

Need help? Customer Service "; } sub printBodyFooter { my $self = shift; print "

"; } sub printHtmlFooter { my $self = shift; print " "; } sub getMainHtmlHeader { my $self = shift; my ($title,$menu,$smenu,$navBar,$onLoad) = @{{@_}}{qw/title menu smenu navBar onLoad/}; if (not defined($title)) { $title = ""; } my $oemStylesheetFileVersion = Pos::Webtop::Web::OEMLoader::getStylesheetFileVersion(oemId=> $self->{'oemId'}); my $ret = "Content-type: text/html\n\n " . HTML::Entities::encode($title) . " {'oemId'} . "/stylesheet.css?version='$oemStylesheetFileVersion'\">
"; if (defined($menu)) { $ret .= "
$menu \ \  $smenu
\ $navBar
"; } return $ret; } sub getMainHtmlFooter { my $self = shift; my $ret .= "
"; return $ret; } 1;