diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm
index 839a419..fb6ca96 100755
--- a/copri4/main/src/Mod/APIfunc.pm
+++ b/copri4/main/src/Mod/APIfunc.pm
@@ -692,11 +692,11 @@ sub service_work {
#$return->{$article}->{template_id} = "$pos_record->{$id}->{template_id}";
if(1==1){
if($pos_record->{$id}->{template_id} && $template_group->{$pos_record->{$id}->{template_id}}){
- $bw->log("$article --> service_work template on id: $id used:",$template_group->{$pos_record->{$id}->{template_id}}->{tpl_id},"");
+ #$bw->log("$article --> service_work template on id: $id used:",$template_group->{$pos_record->{$id}->{template_id}}->{tpl_id},"");
@tpl_order = split /,/,$template_group->{$pos_record->{$id}->{template_id}}->{tpl_order};
$node->{template_id} = "$pos_record->{$id}->{template_id}";
}elsif(1==1){#on init use node tpl
- $bw->log("$article --> service_work template on id: $id used node_template:",$node->{template_id},"");
+ #$bw->log("$article --> service_work template on id: $id used node_template:",$node->{template_id},"");
my $tpl = $dbt->get_tpl($dbh,$node_template->{template_id});
@tpl_order = split /,/,$tpl->{tpl_order};
$node->{template_id} = "$tpl->{tpl_id}";
@@ -711,13 +711,13 @@ sub service_work {
if((($key =~ /int/ && looks_like_number($pos_record->{$id}->{$key})) || ($key eq "txt01" && $pos_record->{$id}->{$key} && $pos_record->{$id}->{$key} ne "NaN" && $erledigt))){
$tpl_keyseen .= "$key|";
- $bw->log("$pos_record->{$id}->{barcode} --> if((($key =~ /int/ && looks_like_number($pos_record->{$id}->{$key})) || ($key eq \"txt01\" && $pos_record->{$id}->{$key} && $pos_record->{$id}->{$key} ne \"NaN\"))){",$tpl_keyseen,"");
+ #$bw->log("$pos_record->{$id}->{barcode} --> if((($key =~ /int/ && looks_like_number($pos_record->{$id}->{$key})) || ($key eq \"txt01\" && $pos_record->{$id}->{$key} && $pos_record->{$id}->{$key} ne \"NaN\"))){",$tpl_keyseen,"");
my $u_name = $users_map->{$pos_record->{$id}->{owner}}->{txt01} || $channel_map->{$pos_record->{$id}->{owner}} || $pos_record->{$id}->{owner};
my $dt2 = DateTime::Format::Pg->parse_datetime($pos_record->{$id}->{mtime});
my $time_over = "0";
if(looks_like_number($interval) && $interval > 0){
my $dt2_over = $dt2->add( days => $interval );
- $bw->log("service-interval: $interval | $dt1 > $dt2_over (mtime: $pos_record->{$id}->{mtime})",$key,"");
+ #$bw->log("service-interval: $interval | $dt1 > $dt2_over (mtime: $pos_record->{$id}->{mtime})",$key,"");
$time_over = "1" if($dt1 > $dt2_over);
}
@@ -746,8 +746,8 @@ sub service_work {
}
#set init values
- $bw->log("set service init values by @tpl_order","","");
if(!$history && scalar(@tpl_order) > 1){
+ $bw->log("set service init values by @tpl_order","","");
$bw->log("tpl_keyseen",$tpl_keyseen,"");
$tpl_keyseen =~ s/\|$//;
foreach (@tpl_order){
@@ -1877,7 +1877,7 @@ sub bikes_all(){
my $record = {};
#on servicetool only stations on user_tour
- $bw->log("stations_service_tour of adr c_id: $auth->{c_id}",$stations_allraw,"");
+ #$bw->log("stations_service_tour of adr c_id: $auth->{c_id}",$stations_allraw,"");
my @stations_service_tour = ();
#shareetool
@@ -2078,7 +2078,7 @@ sub stations_all(){
#on servicetool only stations on user_tour
#shareetool
- $bw->log("stations user_tour by merchant id $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} on $varenv->{dbname}",$user_tour,"");
+ #$bw->log("stations user_tour by merchant id $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} on $varenv->{dbname}",$user_tour,"");
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} == 187){
if(scalar(@{$user_tour}) >= 1){
@@ -2377,7 +2377,7 @@ sub auth_verify(){
$return->{merchant_id} = $1 if($cgi_authcookie && $cgi_authcookie =~ /\w+_(\w+)$/);
my $netloc = $q->url(-base=>1);
$bw->log("--> auth_verify on dbname $varenv{dbname},\n Starting with authcookie: $cgi_authcookie",$netloc,"");
- my $debug=1;
+ my $debug=0;
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
open(FILE,">>$varenv{logdir}/authcookie.log") if($debug);
print FILE "\n*-->$now_dt $netloc | $varenv{dbname} | $cgi_authcookie\n" if($debug);
diff --git a/copri4/main/src/Mod/APIjsonserver.pm b/copri4/main/src/Mod/APIjsonserver.pm
index 6b99beb..70c0498 100755
--- a/copri4/main/src/Mod/APIjsonserver.pm
+++ b/copri4/main/src/Mod/APIjsonserver.pm
@@ -76,7 +76,7 @@ my $response = {
privacy_html => "site/privacy_2.html",
agb_html => "site/agb.html",
impress_html => "site/impress_1.html",
- tariff_info_html => "site/tariff_info_1.html",
+ tariff_info_html => "site/tariff_info.html",
bike_info_html => "site/bike_info.html",
lang => "DE",
last_used_operator => {
@@ -111,7 +111,8 @@ if(!$coo && !$q->param('merchant_id')){
$response->{bike_info_html} = "site/bike_info_konrad_1.html";
}
if($return_merchant->{project_id} eq "Bayern"){
- $response->{agb_html} = "site/agb_lastenradbayern_2.html";
+ $response->{agb_html} = "site/agb_lastenradbayern.html";
+ $response->{bike_info_html} = "site/bike_info_bayern.html";
}
}
diff --git a/copri4/main/src/Tpl/TransPositionen.pm b/copri4/main/src/Tpl/TransPositionen.pm
index 4e8d052..863fee9 100755
--- a/copri4/main/src/Tpl/TransPositionen.pm
+++ b/copri4/main/src/Tpl/TransPositionen.pm
@@ -409,6 +409,7 @@ EOF
print "(raw $pos_raw)
\n";
}
}
+ print "
\n";
}
if($cttpos->{$id}->{txt01} || $cttpos->{$id}->{int09}){
#$line_count2++;
diff --git a/copri4/main/src/scripts/tests/index.pl b/copri4/main/src/scripts/tests/index.pl
deleted file mode 100755
index eb6c458..0000000
--- a/copri4/main/src/scripts/tests/index.pl
+++ /dev/null
@@ -1,273 +0,0 @@
-#!/usr/bin/perl
-#
-## SPDX-License-Identifier: AGPL-3.0-or-later
-# Copyright (c) Rainer Gümpelein, TeilRad GmbH
-#
-use lib "/var/www/copri-bike/shareeapp-primary/src";
-use strict;
-use warnings;
-use POSIX;
-use CGI ':standard';
-use CGI::Carp qw(fatalsToBrowser);
-use CGI::Cookie ();
-use DBI;
-use Lib::Config;
-use Mod::DBtank;
-
-my $q = new CGI();
-$q->import_names('R');
-my $cf = new Config;
-my $dbt = new DBtank;
-my %varenv = $cf->envonline();
-
- my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "";
-
- if($q->param('sessionid') && $q->param('sessionid') ne $q->cookie('domcookie')){
- $coo = $q->param('sessionid');
- my $cookie = CGI::Cookie->new(-name => 'domcookie',-value => $coo);
- print $q->header(-charset=>"utf-8", -cookie=>$cookie);
- }else{
- my $cookie = CGI::Cookie->new(-name => 'domcookie',-value => $coo);
- print $q->header(-charset=>"utf-8", -cookie=>$cookie);
- }
- die "no configuration available" if(!$varenv{wwwhost});
-
- my $operator_key = $q->param('api_test');
- my $bike = $q->param('bike');
- #$bike = "FR4781";
- #$bike = "FR1002";
-
- my $lang = "de";
- my $dyn_js = "";
- #my $dyn_js = "
- #function onLoad() {
- # console.log('hallo');
- #
- # if ('geolocation' in navigator) {
- # console.log('geon');
- # /* geolocation funktioniert */
- # } else {
- # console.log('geoff');
- # /* geolocation funktioniert NICHT */
- # }
- # \$( '#no_javascript' ).hide();
- # }
- # \n";
-
- my $dyn_css = "";
- my $local_style = "$varenv{metahost}/$dbt->{shareeapp_conf}->{local_style}";
- my $jquery = "$varenv{metahost}/$dbt->{shareeapp_conf}->{jquery}";
- my $js_bootstrap = "$varenv{metahost}/$dbt->{shareeapp_conf}->{js_bootstrap}";
- my $style_bootstrap = "$varenv{metahost}/$dbt->{shareeapp_conf}->{style_bootstrap}";
- if($varenv{wwwhost} =~ /shareedms/){
- $local_style = "$varenv{metahost}/$dbt->{shareedms_conf}->{local_style}";
- $jquery = "$varenv{metahost}/$dbt->{shareedms_conf}->{jquery}";
- $js_bootstrap = "$varenv{metahost}/$dbt->{shareedms_conf}->{js_bootstrap}";
- $style_bootstrap = "$varenv{metahost}/$dbt->{shareedms_conf}->{style_bootstrap}";
- }
-
-
- my $html5 = $q->start_html(
- -title => "shareetest",
- -lang => '',
- #-onload => "onLoad();",
- -encoding => "utf-8",
- -base => 'true',
- -head => Link(
- {
- -rel => 'shortcut icon',
- -type => 'image/x-icon',
- -href => "/css/favicon.ico"
- }
- ),
- -meta => {
- 'viewport'=>"width=device-width,initial-scale=1,user-scalable=yes",
- 'author' => "rainer guempelein",
- 'publisher' => "",
- 'copyright' => "",
- },
- -script=>[
- #{-language=>'JAVASCRIPT',
- #-src=>"$jquery"},
- #{-language=>'JAVASCRIPT',
- #-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_ui}"},
- #{-language=>'JAVASCRIPT',
- #-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_resize}"},
- #{-language=>'JAVASCRIPT',
- #-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jsscript}"},
- #{-language=>'JAVASCRIPT',
- #-src=>"https://unpkg.com/leaflet\@1.8.0/dist/leaflet.js"},
- {-language=>'JAVASCRIPT',
- -code=>"$dyn_js"}
- ],
- -STYLE=>{
- -code=>"$dyn_css",
- #-src=>[
- #"$local_style",
- #"$style_bootstrap",
- #"$varenv{metahost}/$dbt->{copri_conf}->{style_bootstrap_icons}",
- #"$varenv{metahost}/$dbt->{copri_conf}->{style_jquery_ui}"
- #"https://unpkg.com/leaflet\@1.8.0/dist/leaflet.css"
- #],
- -verbatim=>"\@import url(\"$local_style\");",
- -media=>'screen'
- }
-
-);
-
- $html5 =~ s{}{}s;
- $html5 =~ s{}{}s;
- print $html5;
-
-##
-my $uri = "$dbt->{primary}->{sharee_primary}->{primaryApp}/APIjsonserver";
-#print $q->div({-style=>'margin:15px;'},$q->a({-href=>"/src/scripts/tests/index.pl"},"[ index ]")),"\n";
-print $q->div({-style=>'margin:15px;'},"sharee API tests", $q->b("operator_key: $operator_key | bike: $bike")),"\n";
-
-print<
-
-
-
-
-
-EOF
-;
-
-print "\n";
-
-print<
- var map = L.map('map').setView([47.976634, 7.825490], 13);
-
- L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic2hhcmVlYmlrZSIsImEiOiJjbDM3bXdreHIwMnZxM2NtbjVkc2pwNWp4In0.QAwnPXx4yZsbPSm2DvP62w', {
- attribution: 'Map data © OpenStreetMap contributors, Imagery © Mapbox',
- maxZoom: 18,
- id: 'mapbox/streets-v11',
- tileSize: 512,
- zoomOffset: -1,
- accessToken: 'your.mapbox.access.token'
- }).addTo(map);
-
-
-
-EOF
-;
-
-
-
-
-print $q->div({-style=>'margin:15px;'},"-------------- $uri --------------------"),"\n";
-my $authorization = "$uri?request=authorization&user_id=ragu\@sharee.bike&user_pw=xxxxxx&merchant_id=oiF2kahH&hw_id=g89g8o7goguzuzug";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$authorization"},"[ authorization ]---> $authorization")),"\n";
-
-my $authout = "$uri?request=authout&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$authout"},"[ authout ]---> $authout")),"\n";
-
-my $bikes_all = "$uri?request=bikes_all&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$bikes_all"},"[ bikes_all ]---> $bikes_all")),"\n";
-
-my $bikes_available = "$uri?request=bikes_available&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$bikes_available"},"[ bikes_available ]---> $bikes_available")),"\n";
-
-my $stations_all = "$uri?request=stations_all&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$stations_all"},"[ stations_all ]---> $stations_all")),"\n";
-
-my $stations_available = "$uri?request=stations_available&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$stations_available"},"[ stations_available ]---> $stations_available")),"\n";
-
-my $user_bikes_occupied = "$uri?request=user_bikes_occupied&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$user_bikes_occupied"},"[ user_bikes_occupied ]---> $user_bikes_occupied")),"\n";
-
-my $user_minianswer = "$uri?request=user_minianswer&q1=opt5&q2=opt4&q3=iuwehfiolbev&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$user_minianswer"},"[ user_minianswer ]---> $user_minianswer")),"\n";
-
-
-###
-print $q->div({-style=>'margin:15px;'}," "),"\n";
-#config
-my $uriop = "$dbt->{operator}->{$operator_key}->{operatorApp}/APIjsonserver";
-
-#my $bike = "FR1003";
-my $latitude = "47.927738";
-my $longitude = "7.973855";
-#not used
-my $and_station_state_locking = "";
-my $and_station_state_locked = "";
-my $and_station_state_unlocked = "";
-
-#system=sigo
-if($operator_key eq "sharee_sx"){
- $latitude = "";
- $longitude = "";
- #$and_station_state_locking = "&station_state=locking";
- #$and_station_state_locked = "&station_state=locked";
- #$and_station_state_unlocked = "&station_state=unlocked";
-}
-
-if($operator_key eq "sharee_kn"){
- $latitude = "47.66267";
- $longitude = "9.17262";
-}
-if($operator_key eq "sharee_wue"){
- $latitude = "47.997930";
- $longitude = "7.785428";
-}
-if($operator_key eq "sharee_ren"){
- $latitude = "48.8975726";
- $longitude = "11.170959";
-}
-
-print $q->div({-style=>'margin:15px;'},"-------------- $uriop --------------------"),"\n";
-my $booking_request = "$uriop?request=booking_request&bike=$bike&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_request"},"[ booking_request ]---> $booking_request")),"\n";
-
-my $booking_update_cancel = "$uriop?request=booking_update&bike=$bike&state=canceled&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_cancel"},"[ booking_update_cancel ]---> $booking_update_cancel")),"\n";
-
-my $booking_update_locking = "$uriop?request=booking_update&bike=$bike&lock_state=locking$and_station_state_locking&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_locking"},"[ booking_update_locking ]---> $booking_update_locking")),"\n";
-
-my $booking_update_locked = "$uriop?request=booking_update&bike=$bike&lock_state=locked$and_station_state_locked&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_locked"},"[ booking_update_locked ]---> $booking_update_locked")),"\n";
-
-my $booking_update_occupied_unlocking = "$uriop?request=booking_update&bike=$bike&state=occupied&lock_state=unlocking$and_station_state_unlocked&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_occupied_unlocking"},"[ booking_update_occupied_unlocking ]---> $booking_update_occupied_unlocking")),"\n";
-
-my $booking_update_unlocked = "$uriop?request=booking_update&bike=$bike&lock_state=unlocked$and_station_state_unlocked&voltage=39&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_unlocked"},"[ booking_update_unlocked ]---> $booking_update_unlocked")),"\n";
-
-my $booking_update_occupied_unlocked = "$uriop?request=booking_update&bike=$bike&state=occupied&lock_state=unlocked$and_station_state_unlocked&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_occupied_unlocked"},"[ booking_update_occupied_unlocked ]---> $booking_update_occupied_unlocked")),"\n";
-
-my $booking_request_oc_uling = "$uriop?request=booking_request&bike=$bike&state=occupied&lock_state=unlocking$and_station_state_unlocked&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_request_oc_uling"},"[ booking_request_oc_unlocking ]---> $booking_request_oc_uling")),"\n";
-
-my $booking_request_oc_ul = "$uriop?request=booking_request&bike=$bike&state=occupied&lock_state=unlocked$and_station_state_unlocked&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_request_oc_ul"},"[ booking_request_oc_unlocked ]---> $booking_request_oc_ul")),"\n";
-
-my $booking_update_av_lo = "$uriop?request=booking_update&bike=$bike&state=available&lock_state=locked$and_station_state_locked&latitude=$latitude&longitude=$longitude&gps_age=300&user_device_manufaturer=samsung)&user_device_model=SM-G398FN&user_device_platform=Android&user_device_version=10&user_device_id=90af86831c10374d&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_av_lo"},"[ booking_update_av_lo ]---> $booking_update_av_lo")),"\n";
-
-my $booking_update_av_lo_nogps = "$uriop?request=booking_update&bike=$bike&state=available&lock_state=locked$and_station_state_locked&user_device_manufaturer=samsung)&user_device_model=SM-G398FN&user_device_platform=Android&user_device_version=10&user_device_id=90af86831c10374d&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$booking_update_av_lo_nogps"},"[ booking_update_av_lo_nogps ]---> $booking_update_av_lo_nogps")),"\n";
-
-my $user_feedback = "$uriop?request=user_feedback&bike=$bike&bike_broken=1&message=testnachricht äöü&authcookie=$coo";
-print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$user_feedback"},"[ user_feedback ]---> $user_feedback")),"\n";
-
-#print "\n";
-
-print $q->end_html;
-1;
diff --git a/copri4/shareeapp-operator/src/Lib/Mlogic.pm b/copri4/shareeapp-operator/src/Lib/Mlogic.pm
index 08ab803..63fa0b3 100755
--- a/copri4/shareeapp-operator/src/Lib/Mlogic.pm
+++ b/copri4/shareeapp-operator/src/Lib/Mlogic.pm
@@ -42,10 +42,10 @@ sub tpl(){
if($users_sharee->{c_id} && $R::sharee_edit ne "delete_account2" && ($users_sharee->{c_id} eq $varenv->{superu_id} || $dbt->{copri_conf}->{stage} eq "test")){
my $coo = $q->cookie('domcookie') || $q->param('sessionid') || "";
- #my $api_test = "sharee_fr01"; my $bike="FR1538";
+ my $api_test = "sharee_fr01"; my $bike="FR1538";
#my $api_test = "sharee_fr01"; my $bike="FR4781";#Tracking and BVB test
#my $api_test = "sharee_kn"; my $bike="KN205";
- my $api_test = "sharee_wue"; my $bike="WUE5524";
+ #my $api_test = "sharee_wue"; my $bike="WUE5524";
#my $api_test = "sharee_sx"; my $bike="S3X1001";
#my $api_test = "sharee_ren"; my $bike="REN2";
diff --git a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm
index daf2c15..0368e47 100755
--- a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm
+++ b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm
@@ -172,7 +172,7 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
$sharee_agb_text->{txt01} = "";
}
if($project eq "Bayern"){
- $sharee_agb_text->{txt01} = "";
+ $sharee_agb_text->{txt01} = "";
}
@@ -604,11 +604,11 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
my $sharee_agb = "\n";
print $q->label({-for=>"$key", -style=>'padding-top:20px;'},"$label_des"),"\n";
- print $q->div({-id=>"$key"},$but->checkbox("1","$key","$ctrel->{$key}","","$required","$autofocus"), " $sharee_agb"),"\n";
+ print $q->div({-id=>"$key"},$but->checkbox("1","$key","$ctrel->{$key}","","$required","$autofocus"), " $sharee_agb"),"\n";
print $q->hidden(-name=>"$key",-override=>1,-value=>"null");
- my $sharee_privacy = "\n";
- print $q->div({-style=>'padding-top:10px;'},"Bitte beachten Sie unsere neuen $sharee_privacy"),"\n" if($aowner == 195 || $aowner == 185 || $aowner == 176);
+ my $sharee_privacy = "\n";
+ print $q->div({-style=>'padding-top:10px;'},"$sharee_privacy"),"\n";
}elsif(1==2 && $key =~ /int02/){#newsletter