sharee.bike/copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm

75 lines
1.7 KiB
Perl
Raw Normal View History

2021-12-30 12:05:56 +01:00
package PayoneSelect;
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
#
use strict;
use warnings;
use POSIX;
use CGI ':standard';
use Lib::Config;
use Mod::DBtank;
2021-12-30 12:05:56 +01:00
use Tpl::AccountSubmenu;
use Tpl::PayoneSEPA;
use Tpl::PayoneCCclient;
sub new {
my $class = shift;
my $self = {};
bless($self,$class);
return $self;
}
#Template
sub tpl(){
my $node_meta = shift;
my $users_dms = shift || "";
my $mode = shift || "";
my $varenv = shift;
my $users_sharee = shift || "";
2023-01-17 20:43:36 +01:00
my $feedb = shift || "";
2021-12-30 12:05:56 +01:00
my $q = new CGI;
my $cf = new Config;
my $dbt = new DBtank;
2021-12-30 12:05:56 +01:00
my $submenu = new AccountSubmenu;
my $paySEPA = new PayoneSEPA;
my $payCC = new PayoneCCclient;
$q->import_names('R');
my @keywords = $q->param;
my $dbh = "";
2021-12-30 12:05:56 +01:00
my $script = $q->script_name();
my $path_info = $q->path_info();
my $path = $path_info;
#with meta_host,
if("$varenv->{metahost}"){
$path = "$script" . "$path_info";
$script="";
}
my $time = time;
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
my $ctrel = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
my $tpl = $dbt->get_tpl($dbh,$node_meta->{tpl_id});
2021-12-30 12:05:56 +01:00
print "<div id='Contentapp'>\n";
#subMenue--------
2023-01-17 20:43:36 +01:00
$submenu->tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$feedb);
2021-12-30 12:05:56 +01:00
#-----------------
#Selected Payment
if($ctrel->{int03} == 1 || $ctrel->{int03} == 3){
2023-01-17 20:43:36 +01:00
$paySEPA->tpl("309",$node_meta,$users_dms,$mode,$varenv,$users_sharee,$feedb);
2021-12-30 12:05:56 +01:00
}elsif($ctrel->{int03} == 2){
2023-01-17 20:43:36 +01:00
$payCC->tpl("310",$node_meta,$users_dms,$mode,$varenv,$users_sharee,$feedb);
2021-12-30 12:05:56 +01:00
}
print "</div>\n";
}
1;