cleanup merchant_id and Karte on OP

This commit is contained in:
Rainer Gümpelein 2022-01-02 14:57:19 +01:00
parent aff4b9d1e1
commit 0184300a35
12 changed files with 191 additions and 155 deletions

12
.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
cache/
data/
pdf/
cache/
*.kml
*.html
*.sql.gz
xml/
csv/
ftp/
site/
apk/

View file

@ -168,6 +168,12 @@ div#Oline {
.content2 {
padding:10px 15px;
}
.content2_legende {
font-size:16px;
line-height:2.0;
max-width:750px;
text-align:left;
}
.content_float2 {
float:left;
text-align:right;

View file

@ -1418,7 +1418,8 @@ sub bikes_available(){
$return->{$id}->{Ilockit_ID} = "$record->{$id}->{txt18}";
$return->{$id}->{bike_group} = ["$dbt->{operator}->{$varenv{dbname}}->{oprefix}$record->{$id}->{main_id}"];
#if($users_serviceapp->{int09}){
if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/ && scalar(@{$user_tour} >= 1)){
#shareetool
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/ && scalar(@{$user_tour} >= 1)){
my @service_code = split(/\s/,$record->{$id}->{txt23});
$return->{$id}->{service_code} = [@service_code];
}
@ -1477,7 +1478,9 @@ sub bikes_all(){
#on servicetool only stations on user_tour
$bw->log("stations_service_tour",$stations_allraw,"");
my @stations_service_tour = ();
if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/){
#shareetool
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/){
my $stations = "";
if(ref($stations_allraw) eq "HASH" && scalar(@{$user_tour} >= 1)){
foreach my $id (sort { $stations_allraw->{$a}->{int04} <=> $stations_allraw->{$b}->{int04} } keys (%$stations_allraw)){
@ -1520,7 +1523,8 @@ sub bikes_all(){
$return->{$id}->{Ilockit_ID} = "$record->{$id}->{txt18}";
$return->{$id}->{bike_group} = ["$dbt->{operator}->{$varenv{dbname}}->{oprefix}$record->{$id}->{main_id}"];
#if($users_serviceapp->{int09}){
if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/ && scalar(@{$user_tour} >= 1)){
#shareetool
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/ && scalar(@{$user_tour} >= 1)){
my @service_code = split(/\s/,$record->{$id}->{txt23});
$return->{$id}->{service_code} = [@service_code];
}
@ -1565,7 +1569,8 @@ sub stations_available(){
my $record = {};
#on servicetool only stations on user_tour
if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/){
#shareetool
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/){
if(scalar(@{$user_tour}) >= 1){
$pref_sql .= " AND (";
foreach(@{$user_tour}){
@ -1656,13 +1661,12 @@ sub stations_all(){
my $station_id = $1 if($q->param('station') =~ /(\d+)/);
my $work_val_id = $1 if($q->param('work_val') =~ /(\d+)/);
if(looks_like_number($station_id)){
$pref = { %$pref, int04 => "=::" . $q->escapeHTML($station_id) };
$pref->{int04} = $station_id;
}elsif($q->param('work_id') eq "int04" && $work_val_id){
$pref = { %$pref, int04 => "=::" . $q->escapeHTML("$work_val_id") };
$pref->{int04} = $work_val_id;
}
#$pref = { %$pref, int04 => ">::0" } if($q->param('authcookie') !~ /34567890|cleeJet3/);#Werkstatt
$pref = { %$pref, int10 => "1" } if($q->param('authcookie') !~ /34567890|cleeJet3/);#Werkstatt
#shareetool werktatt
$pref->{int10} = 1 if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/);
my $pref_sql = "";
$pref_sql .= " and (";
@ -1677,7 +1681,8 @@ sub stations_all(){
my $record = {};
#on servicetool only stations on user_tour
if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/){
#shareetool
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/){
if(scalar(@{$user_tour}) >= 1){
$pref_sql .= " AND (";
foreach(@{$user_tour}){
@ -1798,7 +1803,8 @@ sub fetch_tariff(){
};
$auth_operator = $dbt->fetch_record($dbh,$authref);
if($authcookie && $authcookie =~ /_cleeJet3|_34567890/){
#shareetool
if($authcookie && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $authcookie =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/){
my $users_serviceapp = $dbt->select_users($dbh,$auth_operator->{c_id},"and int09=1");
if($users_serviceapp->{int09}){
$auth_operator->{txt18} =~ s/(\d+)/$dbt->{operator}->{$varenv{dbname}}->{oprefix}$1/g;
@ -1840,7 +1846,8 @@ sub fetch_tariff(){
}
#fallback to public tarif if no user tariff defined and not servicetool app request
if(!@tarifnr && $authcookie !~ /_cleeJet3|_34567890/){
#shareetool
if(!@tarifnr && (!$dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} || $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} != 187)){
foreach my $id (keys (%$tariff_content)){
if($tariff_content->{$id}->{int18} eq 2){
$bw->log("Tarif FOUND FALLBACK for No Tarif users if($tariff_content->{$id}->{int12} && $varenv{dbname}) (s-type:$tariff_content->{$id}->{int18})",$id,"");
@ -2155,7 +2162,8 @@ sub auth_verify(){
$bw->log("auth_verify done on txt05 authcookies by dbname $varenv{dbname}:",$record->{txt05},"");
#Servicetool only users with users.int09=1
if($varenv{dbname} ne "sharee_primary" && $q->param('authcookie') =~ /_34567890$|_cleeJet3$/){
#shareetool
if($varenv{dbname} ne "sharee_primary" && $q->param('authcookie') && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv{merchant_id}}->{id} == 187 && $q->param('authcookie') =~ /$dbt->{merchant_ids}->{$varenv{merchant_id}}/){
my $users_serviceapp = { u_id => 0 };
$users_serviceapp = $dbt->select_users($dbh,$record->{c_id},"and int09=1");
if(!$users_serviceapp->{u_id} || $users_serviceapp->{u_id} == 0){
@ -2205,7 +2213,8 @@ sub authorization(){
$authref->{txt11} = "$pwmd5";
#Servicetool, only users with users.int09=1
if($merchant_id =~ /_34567890$|_cleeJet3$/){
#shareetool
if($aowner && $aowner eq "187"){
my $users_serviceapp = { u_id => 0 };
$users_serviceapp = $dbt->select_users($dbh,$record->{c_id},"and int09=1");
$record = { c_id => 0 } if(!$users_serviceapp->{u_id});

View file

@ -445,7 +445,7 @@ elsif($q->param('request') eq "bikes_all"){
#on servicetool only stations on user_tour
my $stations_allraw = {};
(my $stations_not_used,$stations_allraw) = $apif->stations_all($q,"",$authraw) if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/);
(my $stations_not_used,$stations_allraw) = $apif->stations_all($q,"",$authraw) if($owner && $owner eq "187");#shareetool
my ($bikes_all,$bikes_allraw,$bikes_on_station) = $apif->bikes_all($q,$authraw,$stations_allraw);
@ -455,7 +455,8 @@ elsif($q->param('request') eq "bikes_all"){
my $pos_record = {};
my $response_work = {};
if($q->param('authcookie') =~ /cleeJet3|34567890$/){
#shareetool
if($owner && $owner eq "187"){
(my $xresponse, $pos_record, my $node_template, my $crecord) = $apif->service_select($q,$authraw,"",$interval);
($response_work, my $node) = $apif->service_work($pos_record,$bikes_allraw,"",$node_template);
@ -479,8 +480,8 @@ elsif($q->param('request') eq "bikes_all"){
#print "bid:$bid|$bikes_allraw->{$bid}->{mtime}\n";
#disabled, needs also to much cpu-time
#if(ref($response_work->{$biselect}) ne "HASH" || $response_work->{$biselect}->{int01}->{c_id} !~ /\d/ && $q->param('authcookie') =~ /cleeJet3|34567890$/){
#shareetool disabled, needs also to much cpu-time
#if(ref($response_work->{$biselect}) ne "HASH" || $response_work->{$biselect}->{int01}->{c_id} !~ /\d/ && $owner && $owner eq "187"){
# my $pos_record_bi = $apif->service_work_select($biselect,"","");
# (my $response_work_bi, my $node) = $apif->service_work($pos_record_bi,$bikes_allraw);
# $response_work->{$biselect} = $response_work_bi->{$biselect};
@ -488,7 +489,7 @@ elsif($q->param('request') eq "bikes_all"){
#}
#2019-02-14, fixed
if(ref($response_work->{$biselect}) eq "HASH" && $q->param('authcookie') =~ /cleeJet3|34567890$/){
if(ref($response_work->{$biselect}) eq "HASH" && $owner && $owner eq "187"){#shareetool
#print "$biselect: $response_work->{$biselect}->{mtime}\n";
$bikes_allraw->{$bid}->{service_state_exist} = 1;
@ -570,14 +571,6 @@ elsif($q->param('request') eq "bikes_all"){
}
}
#print "all:$i\n";
#if($q->param('authcookie') =~ /_cleeJet3$|_34567890$/){
# $bw->log("on bikes_all: kmlGenerator","","");
#require "Mod/KMLout.pm";
#my $kmlfile = Mod::KMLout::kmlGenerator("","");
#}
$bw->log("service_state_debug",$service_state_debug,"");
$response->{bikes} = $bikes_all;
}

View file

@ -276,7 +276,6 @@ sub channel_map(){
my $self = shift;
my $channel = {
173 => "merchant fallback",#mig
174 => "example Web",#mig
175 => "example App",#mig
176 => "Mein konrad App",#mig
177 => "LastenradBay App",#mig
@ -290,8 +289,12 @@ sub channel_map(){
186 => "sharee App",#mig
187 => "shareetool App",#mig
188 => "sys API",
196 => "DMS Form",#mig
197 => "Web Form",#mig
192 => "Web Bayern",
193 => "Web Demo",#mig
194 => "Web Example",#mig
195 => "Web KN",#mig
196 => "DMS Form std",#mig
197 => "Web Form std",#mig
198 => "primary",#mig
199 => "LV API",#mig
};

View file

@ -56,13 +56,6 @@ sub handler {
my %varenv = $cf->envonline();
my $netloc = $q->url(-base=>1);
#main datadir is main config directive like "shareeapp-kn" and catched by syshost name
if($netloc =~ /:\/\/(sharee\w+-\w+)\.copri/){
#$bw->log("Indexsharee merchant select by netloc:",$netloc,"");
$varenv{syshost} = $1 if( -d "/var/www/copri4/$1");
}
die "no configuration available" if(!$varenv{syshost});
my $dbh = "";
my $script = $q->script_name();
my $path = $q->path_info();
@ -86,13 +79,17 @@ sub handler {
$mode = $1;
}
my $aowner = 197;#user agent access_owner --> Web Formular
$varenv{merchant_id} = "niejeiC7iu";#2021-12-08 merchant fallback
if($varenv{syshost} =~ /shareedms-/){
$aowner = 196;
$varenv{merchant_id} = "Ohmeew0gie";
$mode = "manager" if(!$mode);
my $aowner = 0;
$varenv{merchant_id} = "";
#main datadir is main config directive like "shareeapp-kn" and catched by syshost name
if($netloc =~ /:\/\/(sharee\w+-\w+)\.copri/){
#$bw->log("Indexsharee merchant select by netloc:",$netloc,"");
$varenv{syshost} = $1 if( -d "/var/www/copri4/$1");
$mode = "manager" if($varenv{syshost} =~ /shareedms-/ && !$mode);
}
die "no configuration available" if(!$varenv{syshost});
if($varenv{orga} ne "dms" && $path =~ /DMS|Waren|Kunden\/|Einstellung|journal|Faktur/i){
print redirect("$varenv{wwwhost}");
@ -142,14 +139,21 @@ if(!$merchanized){
}
}
if(!$merchanized){
if($varenv{syshost} eq "shareeapp-primary"){
#TODO, check it will be deleted
if(1==2 && !$merchanized){
if($varenv{syshost} eq "shareeapp-primary" || $varenv{syshost} eq "shareedms-primary"){
$aowner = $dbt->{primary}->{sharee_primary}->{owner};
$varenv{merchant_id} = $dbt->{primary}->{sharee_primary}->{merchant_id};
$merchanized = 1;
$bw->log("Indexsharee merchant select by $varenv{syshost} eq 'shareeapp-primary':",$varenv{merchant_id},"");
$bw->log("Indexsharee merchant select by dbname: sharee_primary:",$varenv{merchant_id},"");
}
if($varenv{syshost} =~ /shareeweb-/){
elsif($varenv{syshost} =~ /shareedms-(\w+)/){
$aowner = $dbt->{operator}->{$varenv{dbname}}->{owner};
$varenv{merchant_id} = $dbt->{operator}->{$varenv{dbname}}->{merchant_id};
$merchanized = 1;
$bw->log("Indexsharee merchant select by dbname=$varenv{dbname}:",$varenv{merchant_id},"");
}
elsif($varenv{syshost} =~ /shareeweb-/){
$aowner = $dbt->{website}->{$varenv{syshost}}->{owner};
$varenv{merchant_id} = $dbt->{website}->{$varenv{syshost}}->{merchant_id};
$merchanized = 1;

View file

@ -36,9 +36,9 @@ sub handler {
my $cf = new Config;
my %varenv = $cf->envonline();
my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "rafo87znqx";
my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "";
my $users_sharee = { c_id => 0 };
my $api_return = { authcookie => 'rafo87znqx' };
my $api_return = { authcookie => '' };
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
@ -74,8 +74,8 @@ sub kmlGenerator {
#my $netloc = $q->url(-base=>1);
#print "kmlGenerator accessed by netlocation: " . $netloc;
my $project = "all";
$project = "Bayern" if($varenv->{syshost} eq "shareeweb-bayern");
$project = "Konstanz" if($varenv->{syshost} eq "shareeweb-konstanz");
$project = $dbt->{website}->{$varenv->{syshost}}->{project} if($dbt->{website}->{$varenv->{syshost}}->{project});
$project = $dbt->{operator}->{$varenv->{dbname}}->{project} if($dbt->{operator}->{$varenv->{dbname}}->{project});
my $timestamp = strftime "%Y%m%d%H%M%S", localtime;
my $kmlfile = "sharee-$timestamp-$users_sharee->{c_id}.kml";

View file

@ -0,0 +1,103 @@
package Karte;
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
#
use strict;
use warnings;
use CGI ':standard';
use Lib::Config;
use Mod::DBtank;
use Mod::APIfunc;
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 || { c_id => 0 };
my $return = shift || "";
my $q = new CGI;
my $cf = new Config;
my $dbt = new DBtank;
my $apif = new APIfunc;
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
my $aconf = Config::General->new($api_file);
my %apikeyconf = $aconf->getall;
#print $apikeyconf{googlemap}->{google_key};
my $initMap = $dbt->{website}->{$varenv->{syshost}}->{initMap};
$initMap = $dbt->{operator}->{$varenv->{dbname}}->{initMap} if($dbt->{operator}->{$varenv->{dbname}}->{initMap});
$initMap = $dbt->{primary}->{$varenv->{dbname}}->{initMap} if($dbt->{primary}->{$varenv->{dbname}}->{initMap});
$initMap =~ s/\s//g;
my ($lat,$lng) = split(/,/,$initMap);
my $api_return = { authcookie => '' };
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
require "Mod/KMLout.pm";
my $kmlfile = Mod::KMLout::kmlGenerator($api_return,$varenv,$users_sharee);
print "<div style='background-color:#cccccc;width:100%;margin-top:40px;'>\n";
print "<div id='map' style='height:600px;'></div>\n";
print<<EOF
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
scrollwheel: false,
draggable: !("ontouchend" in document),
center: {lat: $lat, lng: $lng},
zoom: 8
});
var ctaLayer = new google.maps.KmlLayer({
position: map.getCenter(),
//preserveViewport: true,
//url: '$dbt->{primary}->{sharee_primary}->{primaryApp}/KMLout?kml=' + (new Date()).getTime() + '$users_sharee->{c_id}',
//url: '$varenv->{metahost}/xml/KMLout-3',
//url: '$varenv->{wwwhost}/?kml=' + (new Date()).getTime(),
url: '$varenv->{metahost}/xml/$kmlfile',
map: map
});
console.log('$varenv->{metahost}/xml/$kmlfile');
};
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=$apikeyconf{googlemap}->{google_key}&callback=initMap">
</script>
EOF
;
print "</div>\n";
print $q->div({-class=>"content2_legende", -style=>'font-weight:bold;'}, "&bull; Ist ein Lastenrad an einer Mietradstation verfügbar?"),"\n";
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Green.png"}), "Lastenrad verfügbar"),"\n";
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Red.png"}), "Lastenrad nicht verfügbar"),"\n";
#print "$varenv->{syshost}/$varenv->{dbname} --> $dbt->{operator}->{$varenv->{dbname}}->{initMap}";
#if($R::ask_radID && $R::ask_radID =~ /^\d+$/){
# require "Tpl/ModalboxDialog.pm";
# &ModalboxDialog::mobox2($tpl_name,$tpl_id,$parent_id,$main_id,$u_id,$u_group,$lang,$users_sharee,$bg_color1,$bg_color2,$R::ask_radID);
# }
#
}
1;

View file

@ -74,6 +74,7 @@ sub tpl(){
}
print $q->start_multipart_form(-id=>'authform', -name=>'loginscreen'),"\n";
print $q->hidden(-name=>"merchant_id",-override=>1,-value=>"$varenv->{merchant_id}") if($varenv->{merchant_id});
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid") if($R::sessionid);
print $q->hidden(-name=>"clientIP",-override=>1,-value=>"$clientIP");

View file

@ -1,100 +0,0 @@
package Karte;
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
#
use strict;
use warnings;
use CGI ':standard';
use Lib::Config;
use Mod::DBtank;
use Mod::APIfunc;
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 || { c_id => 0 };
my $return = shift || "";
my $q = new CGI;
my $cf = new Config;
my $dbt = new DBtank;
my $apif = new APIfunc;
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
my $aconf = Config::General->new($api_file);
my %apikeyconf = $aconf->getall;
#print $apikeyconf{googlemap}->{google_key};
my $initMap = $dbt->{website}->{$varenv->{syshost}}->{initMap};
$initMap =~ s/\s//g;
my ($lat,$lng) = split(/,/,$initMap);
my $api_return = { authcookie => '' };
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
require "Mod/KMLout.pm";
my $kmlfile = Mod::KMLout::kmlGenerator($api_return,$varenv,$users_sharee);
print "<div style='background-color:#cccccc;width:100%;margin-top:40px;'>\n";
print "<div id='map' style='height:600px;'></div>\n";
print<<EOF
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
scrollwheel: false,
draggable: !("ontouchend" in document),
center: {lat: $lat, lng: $lng},
zoom: 8
});
var ctaLayer = new google.maps.KmlLayer({
position: map.getCenter(),
//preserveViewport: true,
//url: '$dbt->{primary}->{sharee_primary}->{primaryApp}/KMLout?kml=' + (new Date()).getTime() + '$users_sharee->{c_id}',
//url: '$varenv->{metahost}/xml/KMLout-3',
//url: '$varenv->{wwwhost}/?kml=' + (new Date()).getTime(),
url: '$varenv->{metahost}/xml/$kmlfile',
map: map
});
console.log('$varenv->{metahost}/xml/$kmlfile');
};
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=$apikeyconf{googlemap}->{google_key}&callback=initMap">
</script>
EOF
;
print "</div>\n";
print $q->div({-class=>"content2_legende", -style=>'font-weight:bold;'}, "&bull; Ist ein Lastenrad an einer Mietradstation verfügbar?"),"\n";
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Green.png"}), "Lastenrad verfügbar"),"\n";
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Red.png"}), "Lastenrad nicht verfügbar"),"\n";
#if($R::ask_radID && $R::ask_radID =~ /^\d+$/){
# require "Tpl/ModalboxDialog.pm";
# &ModalboxDialog::mobox2($tpl_name,$tpl_id,$parent_id,$main_id,$u_id,$u_group,$lang,$users_sharee,$bg_color1,$bg_color2,$R::ask_radID);
# }
#
}
1;

View file

@ -0,0 +1 @@
../../../main/src/Tpl/Karte.pm

View file

@ -1 +1 @@
/etc/shareeconf/global_devel.cfg
/exports/sharee.bike/copri-bike/shareeconf/global_devel.cfg

View file

@ -103,7 +103,8 @@ sub tpl(){
print "<div id='ContentLogin'>\n";
print $q->start_multipart_form(-id=>'authform', -name=>'loginscreen'),"\n";
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
print $q->hidden(-name=>"merchant_id",-override=>1,-value=>"$varenv->{merchant_id}") if($varenv->{merchant_id});
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid") if($R::sessionid);
print "<div class='form-group'>\n";
#Login
@ -159,7 +160,7 @@ sub tpl(){
#
#0. menue
my $aclass = "dropdown-item";
$aclass = "nav-link" if($node->{$id}->{node_name} =~ /Mietjourna|Alarmjournal/);
$aclass = "nav-link" if($node->{$id}->{node_name} =~ /Mietjourna|Alarmjournal|Karte/);
if($users_dms->{u_id} && ($users_dms->{int01} == 2 && $node_meta->{ct_table} =~ /content$/) || ($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id})){
my $url = "$topath/maintainer?node2edit=edit_relation\&main_id=$node->{$id}->{main_id}";
$lmenu0 = $but->event_button("$topath","$node->{$id}->{node_name}","$node->{$id}->{main_id}","$aclass $mclass","","$users_dms->{u_id}","$url");
@ -258,7 +259,7 @@ sub tpl(){
print "</div>\n";
$debug = "(c_id4trans:$users_dms->{c_id4trans} && tpl_id4trans:$users_dms->{tpl_id4trans} && kind_of_trans:$users_dms->{kind_of_trans}) $node_meta->{tpl_name},$node_meta->{tpl_id},$node_meta->{ct_table},$parent_id,$main_id, permissions: ($users_dms->{int01},$users_dms->{int02},$users_dms->{int03},$users_dms->{int07},$users_dms->{int08},$users_dms->{int09})" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
$debug = "syshost: $varenv->{syshost}, merchant_id: $varenv->{merchant_id}, (c_id4trans:$users_dms->{c_id4trans} && tpl_id4trans:$users_dms->{tpl_id4trans} && kind_of_trans:$users_dms->{kind_of_trans}) $node_meta->{tpl_name},$node_meta->{tpl_id},$node_meta->{ct_table},$parent_id,$main_id, permissions: ($users_dms->{int01},$users_dms->{int02},$users_dms->{int03},$users_dms->{int07},$users_dms->{int08},$users_dms->{int09})" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
print $q->div({-style=>'position:fixed;bottom:0%;right:1%;z-index:10;padding:2px;font-size:13px;'},"$debug",$q->a({-style=>'color:black;text-decoration: none;',-href=>'https://sharee.bike',-target=>'_blank'},"sharee.bike &copy; TeilRad GmbH 2021")),"\n";
@ -335,6 +336,9 @@ EOF
require "Tpl/AttributMatrix.pm";
$return = &AttributMatrix::tpl($node_meta,$users_dms,$mode,$return);
#}elsif($tpl_id && $tpl_id >= 400 && $tpl_id <= 699){#contentpos or contentadrpos
}elsif($node_meta->{tpl_id} == 1 && $node_meta->{main_id} == 200017){
require "Tpl/Karte.pm";
&Karte::tpl($node_meta,$users_dms,$mode,$varenv,"",$return);
}elsif($node_meta->{ct_table} =~ /contentpos|contentadrpos|users$/){#contentpos or contentadrpos
require "Tpl/SubListe.pm";
$return = &SubListe::tpl($node_meta,$users_dms,$mode,$return);