package AccountSubmenu; # # 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::Buttons; use Mod::Libenz; use Mod::Libenzdb; use Mod::DBtank; sub new { my $class = shift; my $self = {}; bless($self,$class); return $self; } #Template sub tpl(){ my $self = shift; my $node_meta = shift; my $users_dms = shift || ""; my $mode = shift || ""; my $varenv = shift; my $users_sharee = shift || ""; my $return = shift || ""; my $q = new CGI; my $cf = new Config; my $but = new Buttons; my $lb = new Libenz; my $db = new Libenzdb; my $dbt = new DBtank; my $lang = "de"; 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 $session=""; if($R::sessionid && length($R::sessionid) > 20){ $session = "?sessionid=$R::sessionid"; } my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/); #my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid || ""; my $coo = $R::authcookie || $R::sessionid || ""; #my $merchant_id = ""; #$merchant_id = $coo if($coo && length($coo) <= 10); #$merchant_id = $1 if($coo =~ /_(\w+)$/); my $bgcolor1 = "009899";#sharee my $hgcolor1 = "c0c0c0";#silver my $fgcolor1 = "ffffff";#white #my $bgcolor1 = "e2001a"; $bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1}); $hgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{hgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{hgcolor1}); $fgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{fgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{fgcolor1}); #$bgcolor1 = $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1} if($merchant_id && $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1}); $bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1}); #payable check my $payable_check=0; if(($users_sharee->{int03} == 1 && $users_sharee->{ct_name} =~ /\w{2}-\d+/) || ($users_sharee->{int03} == 2 && length($users_sharee->{ct_name}) >= 19)){ $payable_check=1; } my $node1 = $db->collect_node($node_meta->{parent_id},$lang,"1"); #bootstrap 5 with standalone bayern if($varenv->{syshost} eq "shareeweb-bayern"){ #subMenue-------- print "\n"; #print "
\n"; print "\n"; #print "
\n"; #----------------- }else{ #subMenue-------- print "\n"; #print "
\n"; print "\n"; #print "
\n"; #----------------- }#end else bootstrap version #print $q->div({-style=>'position:fixed;bottom:4%;right:2%;z-index:10;font-size:13px;'},"--> $varenv->{syshost} | $varenv->{merchant_id} | $bgcolor1 | template -> $node_meta->{tpl_name} | $users_sharee->{c_id}"),"\n" if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test"); } 1;