\n";
my $i=0;
my @tpl_order;
foreach(@split_lates){
$i++;
if($i==1){
if($R::confirm_success){
print $q->div({-class=>'content_title3'},"$varenv->{cms}->{'iframe-registration-confirmed'}->{txt}"),"\n";
}else{
print $q->div({-class=>'content_title3'},"$varenv->{cms}->{$tpl01->{tpl_name}}->{txt}"),"\n";
}
if($path =~ /$varenv->{accounting_1}/){
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-paymentdata-form'}->{txt}"),"\n";
}
if($path =~ /$varenv->{accounting_2}/){
if($tpl_id == 302008){
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-choose-payment'}->{txt}"),"\n";
}else{#old SEPA only style
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-sepa-mandat-prolog'}->{txt}"),"\n";
}
}
}
if($i==2){
print $q->div({-class=>'content_title3'},"$varenv->{cms}->{$tpl02->{tpl_name}}->{txt}"),"\n";
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-login-needs'}->{txt}"),"\n";
}
@tpl_order = split /,/,$_;
my $scol = "itime";
foreach (@tpl_order){
my ($key,$des,$size) = split /=/,$_;
$ctrel->{$key} = $q->unescapeHTML("$ctrel->{$key}");
$ctrel->{$key} = $lb->newline($ctrel->{$key},"","1");
#$des = "$tpl_id.$key" if($debug);
$des = $varenv->{cms}->{"iframe-form-$tpl_id.$key"}->{txt} if($varenv->{cms}->{"iframe-form-$tpl_id.$key"}->{txt});
if($ctrel->{int03} && $path =~ /$varenv->{accounting_3}|$varenv->{profile}/){
if(1==1){
if($key =~ /ct_name/){
if($ctrel->{int12}){
print $q->div({-class=>'content2', -style=>'color:#c83434;'}, "$varenv->{cms}->{'iframe-block-rental-access'}->{txt}"),"\n";
}else{
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-success-welcome'}->{txt}"),"\n";
}
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-invoice-note'}->{txt}"),"\n";
print $q->div({-class=>'content2'}, "$bonus_ak"),"\n" if($R::success && $R::success eq "txt15");
}elsif($key =~ /barcode/){
if($cttpos_count){
print $q->div({-style=>'padding-top:1.5em;font-weight:bold;'},"$varenv->{cms}->{'iframe-items-for-debit'}->{txt}"),"\n";
my @tpl_posorder = ("txt01=$varenv->{cms}->{'iframe-description'}->{txt}","int04=$varenv->{cms}->{'iframe-station'}->{txt}","ct_name=$varenv->{cms}->{'iframe-bike-nr'}->{txt}","int26=CO2","int02=$varenv->{cms}->{'iframe-amount'}->{txt}");
my $j=0;
my $nx=0;
my $sum = 0;
print "
\n";
print $q->start_table({-style=>'margin:15px 0;', -border=>'0', -width=>'auto',-align=>'left', -cellpadding=>'3', -cellspacing=>'0'}),"\n";
print $q->Tr(),"\n";
foreach my $id (sort { lc($cttpos->{$b}->{$scol}) cmp lc($cttpos->{$a}->{$scol}) } keys(%$cttpos)){
$j++;
$nx++;
my $pricing = {};
my $counting = {};
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
($pricing,$counting) = $pri->counting_rental($varenv,$cttpos->{$id});
}
print $q->Tr(),"\n";
foreach (@tpl_posorder){
my ($key,$val) = split /=/,$_;
my $occupied_style = "background-color:#fcfdfb;";
$occupied_style = "background-color:#f4f1ee;" if($nx %= 2);
#$occupied_style = "color:#ff1493;" if($cttpos->{$id}->{txt10} =~ /occupied|requested/);
$occupied_style = "color:#ff1493;" if($cttpos->{$id}->{int10} == 2 || $cttpos->{$id}->{int10} == 3);
if($key eq "txt01"){
#print $q->td({-class=>'tdtxt', -style=>"$occupied_style"},"$cttpos->{$id}->{$key}");
print "
\n";
if($cttpos->{$id}->{txt01}){
$cttpos->{$id}->{$key} =~ s/\ /; /g;
print "$cttpos->{$id}->{$key} \n";
}
if($pricing->{start_time} && $pricing->{end_time}){
$pricing->{start_time} = $lb->time4de($pricing->{start_time},"1");
$pricing->{end_time} = $lb->time4de($pricing->{end_time},"1");
my $rental_time = "";
$rental_time = "(rental debug: $pricing->{real_clock} $pricing->{freed_time})" if($debug);
print $q->span("→ $pricing->{start_time} ← $pricing->{end_time} $rental_time");
}
print " | \n";
}elsif($key =~ /int04/){
if($cttpos->{$id}->{int09}){#if Tarifnr then bike
#print $q->td({-class=>'tdint', -style=>"$occupied_style"},"Station $cttpos->{$id}->{$key}");
print "\n";
my $return_station = "";
$return_station = "← $cttpos->{$id}->{txt13}$cttpos->{$id}->{int04}" if($cttpos->{$id}->{txt13} && $cttpos->{$id}->{int04});
print $q->span("$varenv->{cms}->{'iframe-station'}->{txt} → $cttpos->{$id}->{txt12}$cttpos->{$id}->{int06} $return_station");
print " | \n";
}else{
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"$cttpos->{$id}->{$key}");
}
}elsif($key =~ /ct_name/){
if($cttpos->{$id}->{int09}){#if Tarifnr then bike
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"$varenv->{cms}->{'iframe-bike'}->{txt}
$cttpos->{$id}->{$key}"),"\n";
}else{
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"$cttpos->{$id}->{$key}"),"\n";
}
}elsif($key eq "int26"){
my $co2saving = "";
if($cttpos->{$id}->{int26}){
$co2saving = "$varenv->{cms}->{'iframe-saving'}->{txt}";
my $co2diff = $pri->co2calc($cttpos->{$id});
#my $sprit_price = $pri->sprit2calc($cttpos->{$id});
$co2saving .= "$co2diff kg CO²
";
#$co2saving .= "$sprit_price EUR
" if($sprit_price !~ /-/);
$cttpos->{$id}->{int26} =~ s/\./,/;
$co2saving .= "bei $cttpos->{$id}->{int26} KM";
}
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$co2saving"),"\n";
}elsif($key eq "int02"){
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
my $gesamt = 0;
$sum += $pricing->{total_price};
$gesamt = $lb->round($pricing->{total_price});
$gesamt = sprintf('%.2f', $gesamt);
$gesamt =~ s/\./,/;
my $rabatt = "";
$rabatt = "$pricing->{discount}" if($pricing->{discount});
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €"),"\n";
}else{
my $gesamt = 0;
my $rabatt = "";
($gesamt,$rabatt) = $pri->price2calc($cttpos->{$id});
$sum += $gesamt;
$gesamt = $lb->round($gesamt);
$gesamt = sprintf('%.2f',$gesamt);
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €"),"\n";
}
}
}
}
if($j==0){
print $q->Tr(),"\n";
print $q->td({-class=>'tdint'},"$varenv->{cms}->{'iframe-no-data'}->{txt}"),"\n";
}else{
$sum = $lb->round($sum);
$sum = sprintf('%.2f',$sum);
print $q->Tr(),"\n";
print $q->td({-class=>'tdint', -colspan=>3},""),"\n";
print $q->td({-class=>'tdint'},"$varenv->{cms}->{'iframe-total'}->{txt}"),"\n";
print $q->td({-class=>'tdint'},$q->b("$sum €")),"\n";
}
print $q->end_table;
print "\n";
}else{
print $q->div({-class=>'content2',-style=>'padding:0.5em 0;'}, "$varenv->{cms}->{'iframe-no-bookings'}->{txt}"),"\n";
}#end if $cttpos_count
my $i=0;
my $dtext = "";
print "
\n";
foreach my $id (sort { $ctt_all->{$b}->{ct_name} cmp $ctt_all->{$a}->{ct_name} } keys(%$ctt_all)){
if( -f "$ctt_all->{$id}->{basedir}/pdfinvoice/Rechnung-$ctt_all->{$id}->{operator}-$ctt_all->{$id}->{ct_name}.pdf" && $ctt_all->{$id}->{ct_name} =~ /\d/ && $coo){
#print "$ctt_all->{$id}->{basedir}/pdfinvoice/Rechnung-$ctt_all->{$id}->{operator}-$ctt_all->{$id}->{ct_name}.pdf && $ctt_all->{$id}->{ct_name} =~ /\d/ && $coo
";
$i++;
my $invoice_time = $ctt_all->{$id}->{invoice_time} || $ctt_all->{$id}->{mtime};
$invoice_time = $lb->time4de($invoice_time,0);
#$varenv->{operator} only defined in sharee
my $webtarget = "_blank";
my $dtext = "";
if($varenv->{syshost} =~ /app/){
$webtarget = "_self";
$dtext = "$varenv->{cms}->{'iframe-pdf-download-info'}->{txt}";
}
if($i==1){
print $q->div({-id=>'Rechnungen',-style=>'font-weight:bold;'},"$varenv->{cms}->{'iframe-your-invoice'}->{txt}"),"\n";
print $q->div({-style=>'padding:0.5em 0;'},"$dtext"),"\n";
}
print $q->div({-style=>'padding:0.7em 0;border:0px solid #cccccc;'},$q->a({-href=>"$ctt_all->{$id}->{wwwhost}/FileOut?file=Rechnung-$ctt_all->{$id}->{operator}-$ctt_all->{$id}->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}, $q->span({-class=>"bi bi-file-earmark-pdf"}), "$varenv->{cms}->{'iframe-invoice'}->{txt} $ctt_all->{$id}->{ct_name}.pdf"), " ($invoice_time)"),"\n";
}
}
print "
\n";
}
}
}
#------------------------------------------------------
my $label_des="* $des";
my $autofocus="";
if($key =~ /txt15|txt19/){
$label_des="$des";
}
if($key =~ /txt/ && $size eq "select" && $key eq "txt10"){
my $country = $lb->country_code();
my $country_all = $lb->country_code_all();
$ctrel->{$key} = "DE" if(!$ctrel->{$key});
my @_valxx = ();
foreach (sort { $country->{$a} cmp $country->{$b} } keys (%$country)){
push @_valxx, "$_:$country->{$_}";
}
foreach (sort { $country_all->{$a} cmp $country_all->{$b} } keys (%$country_all)){
push @_valxx, "$_:$country_all->{$_}";
}
print $q->label({-for=>"$key",-style=>'padding-top:15px;'},"$label_des"),"\n";
print $but->selector_class("$key","form-control","","$ctrel->{$key}",@_valxx);
}elsif($key =~ /txt/ && $size eq "select"){
my @_valxx = split(/,/,$varenv->{$des});
print $q->label({-for=>"$key",-style=>'padding-top:15px;'},"$label_des"),"\n";
print $but->selector_class("$key","form-control","","$ctrel->{$key}",@_valxx);
#}elsif($key =~ /txt/ && !$R::confirm_success){
}elsif($key =~ /txt/){
my $required="required";
#start failure messages
#Gutschein
if($key =~ /txt16/ && $ctrel->{c_id}){
if($R::failure =~ /^txt16/){
$autofocus = "autofocus";
$label_des = "
$varenv->{cms}->{'iframe-voucher-not-available'}->{txt}";
}
elsif($R::failure =~ /conflict_txt16/){
$autofocus = "autofocus";
$label_des = "
$varenv->{cms}->{'iframe-voucher-deposit'}->{txt}";
}else{
$required="";
$label_des = "
$des";
}
}
elsif($key eq "txt08" && $R::failure && $R::failure =~ /conflict_txt08/){
$autofocus = "autofocus";
my ($failkey,$failval) = split(/=/,$R::failure);
$label_des = "
$varenv->{cms}->{'iframe-attention-email-exist'}->{txt} $failval";
$ctrel->{$key} = $R::conflict_txt08;
}
elsif(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){
$autofocus = "autofocus";
$varenv->{cms}->{'iframe-correct-input'}->{txt} =~ s/::input::/$des/;
$label_des = "
$varenv->{cms}->{'iframe-correct-input'}->{txt}";
}#end failure messages
if($key eq "txt15"){
if($R::failure =~ /^txt15/){
$autofocus = "autofocus";
$bonus_desc = "
$bonus_avail";
}
if($R::failure =~ /conflict_txt15/){
$bonus_desc = "
$bonus_conflict";
}
my $saved_coupon = "";
if($project eq "Konstanz" && $ctadrcoupon->{sharee_kn}->{txt15}){
$bonus_desc = "$varenv->{cms}->{'iframe-bonusnumber-saved'}->{txt}";
$saved_coupon = "$ctadrcoupon->{sharee_kn}->{txt15}";
}
if($project eq "Freiburg" && $ctadrcoupon->{sharee_bvb}->{txt15} && $ctadrcoupon->{sharee_bvb}->{txt15} !~ /-/){
$bonus_desc = "$varenv->{cms}->{'iframe-activation-code-saved'}->{txt}";
$saved_coupon = "$ctadrcoupon->{sharee_bvb}->{txt15}";
}
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$bonus_desc"),"\n";
print "
\n";
print $q->div(" ");
foreach my $opid (keys(%$ctadrcoupon)){
if($ctadrcoupon->{$opid}->{txt15}){
print $q->div("$bonus_saved $ctadrcoupon->{$opid}->{oprefix}-$ctadrcoupon->{$opid}->{txt15}"),"\n";
}
}
}
elsif($key eq "txt04"){
if($R::failure && $R::failure =~ /confirm_txt04/){
$autofocus = "autofocus";
$label_des = "
$varenv->{cms}->{'iframe-repeat-pw-failure'}->{txt}";
}
my $pw = "xxxxxxxx";
$pw = "" if(!$ctrel->{c_id});
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
print "
\n";
print $q->label({-for=>"confirm_$key"},"* $varenv->{cms}->{'iframe-repeat-pw'}->{txt}"),"\n";
print "
\n";
print $q->div({-style=>'text-align:left;color:grey;'}, "
", "$varenv->{cms}->{'iframe-show-pw'}->{txt}"),"\n" if($pw ne "xxxxxxxx");
}else{
#all other input textfields
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
print "
\n";
}
}
#end $key =~ /txt/
#all int checkboxes disabled because of AGB downunder
elsif($key =~ /int/ && $size eq "checkbox"){
if(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){
$autofocus = "autofocus";
$varenv->{cms}->{'iframe-please-confirm'}->{txt} =~ s/::value::/$des/;
$label_des = "
$varenv->{cms}->{'iframe-please-confirm'}->{txt}";
}
my $required="";
#sharee AGB global new
if($key eq "int14" && $size eq "checkbox"){
$required="";
#bootstrap 5
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->hidden(-name=>"$key",-override=>1,-value=>"null");
my $sharee_privacy = "
\n";
print $q->div({-style=>'padding-top:10px;'},"$sharee_privacy"),"\n";
}elsif(1==2 && $key =~ /int02/){#newsletter
print $q->label({-for=>"$key", -style=>'padding-top:10px;'},""),"\n";
print $q->div({-id=>"$key"},$but->checkbox("1","$key","$ctrel->{$key}","","$required"), " $des"),"\n";
print $q->hidden(-name=>"$key",-override=>1,-value=>"0");
}else{
print $q->label({-for=>"$key", -style=>'padding-top:10px;'},""),"\n";
print $q->div({-id=>"$key"},$but->checkbox("1","$key","$ctrel->{$key}","","$required"), " $des"),"\n";
print $q->hidden(-name=>"$key",-override=>1,-value=>"0");
}
}elsif($key =~ /int/){
if(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){
$autofocus = "autofocus";
$varenv->{cms}->{'iframe-please-confirm'}->{txt} =~ s/::value::/$des/;
$label_des = "
$varenv->{cms}->{'iframe-please-confirm'}->{txt}";
print $q->label({-for=>"$key", -style=>'padding-top:10px;'},"$label_des"),"\n";
}
if($key =~ /int03/){
print $q->div({-class=>'content2'}, "$varenv->{cms}->{'iframe-choose-payment-method'}->{txt}"),"\n";
my $incasso="1";
my $creditcard="2";
my $checked_incasso;
my $checked_creditcard;
$checked_incasso=1 if($ctrel->{$key} == 1 || $ctrel->{$key} == 3);
$checked_creditcard=2 if($ctrel->{$key} == 2);
print $q->div({ -class=>'radio', -style=>'padding-top:20px;' },$but->radiobox_vertical("$key","$incasso","$checked_incasso",$q->img({-id=>"pic-payment" ,-style=>'height:50px;', -title=>'Abbuchung',-src=>"$varenv->{metahost}/img/payment-incasso2.png"}))),"\n";
print $q->div({ -class=>'radio', -style=>'padding-bottom:20px;' },$but->radiobox_vertical("$key","$creditcard","$checked_creditcard",$q->img({-id=>"pic-payment" ,-style=>'height:30px;', -title=>'Kreditkarte', -src=>"$varenv->{metahost}/img/payment-creditcard2.png"}))),"\n";
print $q->hidden(-name=>"$key",-override=>1,-value=>"null");
}
}
if($key eq "txt16" && $ctrel->{c_id}){
print $q->div({-style=>'margin-top:1em;text-align:center;'},"
"),"\n";
}
}#end foreach (@tpl_order)
}
if(($R::failure && $R::failure =~ /\w+/ && $R::failure !~ /txt15|txt16/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /\w/)){
print $q->div({-class=>'content2', -style=>"color:$red"}, "* $varenv->{cms}->{'iframe-please-check-profile'}->{txt}"),"\n";
}
if($path !~ /$varenv->{accounting_3}|$varenv->{profile}/){
if($ctrel->{c_id}){
my $button_name = "$varenv->{cms}->{'iframe-save'}->{txt}";
$button_name = "$varenv->{cms}->{'iframe-next'}->{txt}" if($path =~ /$varenv->{accounting_1_5}|$varenv->{accounting_2}/);
print $q->hidden(-name=>"tinkc_id",-override=>1,-value=>"$ctrel->{c_id}");
print $q->div({-style=>'margin-top:1em;text-align:center;'},"
"),"\n";
if($path =~ /$varenv->{accounting_1}/){
print $q->div({-style=>'margin-top:3em;text-align:center;'},$q->a({-style=>"color:#$bgcolor1;font-size:1.2em;", -role=>"button", -href=>"/$viewsel[0]/Account?sharee_edit=delete_account1$session_and"}, "$varenv->{cms}->{'iframe-ask-delete-account'}->{txt}")),"\n";
}
}else{
print $q->div({-style=>'margin-top:1em;text-align:center;'},"
"),"\n";
}
}
}#ende e-Mail iif
print $q->div({-class=>'content2', -style=>'margin-top:2em;'}, "$varenv->{cms}->{'iframe-registration-contact-hotline'}->{txt}"),"\n" if($path =~ /$varenv->{accounting_1}|$varenv->{accounting_3}/);
print "
\n";
print $q->end_form,"\n";
print $q->div({-style=>'position:fixed;bottom:2%;right:2%;z-index:10;font-size:13px;'},"--> $varenv->{syshost} | $varenv->{merchant_id} | $bgcolor1 | template -> $node_meta->{tpl_name},$tpl_id ($template01,$template02) | $users_sharee->{c_id}"),"\n" if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test");
print "