mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
Tarif and Bonus- Freischaltcode
This commit is contained in:
parent
cc24aaf6b1
commit
c990802a4c
6 changed files with 43 additions and 26 deletions
|
@ -1761,8 +1761,8 @@ sub bikes_available(){
|
|||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{bike_charge} = "$record->{$id}->{int19}" if($record->{$id}->{int19});
|
||||
$return->{$id}->{lock_state} = "locked" if($record->{$id}->{int20} == 1);
|
||||
|
@ -1900,8 +1900,8 @@ sub bikes_all(){
|
|||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
$return->{$id}->{bike} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{barcode}";
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{service_state} = "0";
|
||||
|
@ -1984,8 +1984,8 @@ sub stations_available(){
|
|||
$return->{$id}->{station} = "$dbt->{operator}->{$varenv->{dbname}}->{oprefix}$record->{$id}->{int04}";
|
||||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
#$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{state} = "$dbt->{copri_conf}->{bike_state}->{$record->{$id}->{int10}}";
|
||||
$return->{$id}->{station_group} = "";
|
||||
if($record->{$id}->{txt24}){#Ilockit with new station_group logic
|
||||
|
@ -2126,7 +2126,8 @@ sub stations_all(){
|
|||
$return->{$id}->{uri_operator} = "$varenv->{wwwhost}";
|
||||
($return->{$id}->{gps}->{latitude},$return->{$id}->{gps}->{longitude}) = split(/,/,$record->{$id}->{txt06});
|
||||
if($return->{$id}->{description}){
|
||||
$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
$return->{$id}->{description} = "$record->{$id}->{txt01}";
|
||||
#$return->{$id}->{description} = Encode::encode('utf-8', Encode::decode('iso-8859-1', $record->{$id}->{txt01}));
|
||||
}else{
|
||||
$return->{$id}->{description} = "---";
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ my $dbt = new DBtank;
|
|||
my $bw = new Basework;
|
||||
my $apif = new APIfunc;
|
||||
my $q = new CGI;
|
||||
my @keywords = $q->param;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
|
@ -241,6 +240,7 @@ sub save_relation {
|
|||
my $owner = shift;
|
||||
my %varenv = $cf->envonline();
|
||||
|
||||
my @keywords = $q->param;
|
||||
my $dbh = "";
|
||||
my $update_node = {
|
||||
table => "nodes",
|
||||
|
|
|
@ -553,7 +553,7 @@ EOF
|
|||
my @_valxx = ("");
|
||||
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
|
||||
if($tariff_all->{$rid}->{ct_name}){
|
||||
push (@_valxx, "$tariff_all->{$rid}->{barcode}:$tariff_all->{$rid}->{barcode} - $tariff_all->{$rid}->{txt01} - $tariff_all->{$rid}->{int12}");
|
||||
push (@_valxx, "$tariff_all->{$rid}->{barcode}:$tariff_all->{$rid}->{barcode} $dbt->{copri_conf}->{sharing_type}->{$tariff_all->{$rid}->{int18}} - $tariff_all->{$rid}->{ct_name} - $bike_nodes->{$tariff_all->{$rid}->{int12}}->{node_name}");
|
||||
}
|
||||
}
|
||||
my $height = scalar(@_valxx);
|
||||
|
|
|
@ -234,7 +234,7 @@ EOF
|
|||
$cttpos->{$id}->{$key} = $q->unescapeHTML($cttpos->{$id}->{$key});
|
||||
$cttpos->{$id}->{$key} = $lb->newline($cttpos->{$id}->{$key},"",$R::trans2edit) if($R::trans2edit);
|
||||
my $ct_pos = "$cttpos->{$id}->{ct_name}";
|
||||
my $txtstyle = "text-align:left;min-width:150px;";
|
||||
my $txtstyle = "text-align:left;min-width:130px;";
|
||||
my $isize = "30";
|
||||
$isize = $inputsize if($inputsize);
|
||||
if($key =~ /int\d+/){
|
||||
|
@ -261,13 +261,13 @@ EOF
|
|||
|
||||
}elsif($key =~ /int03/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print $q->td({-class=>'tdint',nowrap=>1},"$pricing->{real_clock} $pricing->{freed_time}"),"\n";
|
||||
print $q->td({-class=>'tdint', -nowrap=>1},"$pricing->{real_clock} $pricing->{freed_time}"),"\n";
|
||||
}else{
|
||||
print $q->td({-colspan=>'1',-class=>'element',-style=>"$txtstyle $set_style"},$q->textfield(-class=>'etxt',-style=>"$txtstyle",-name=>"col_$key",-default=>"$cttpos->{$id}->{$key}", -override=>'1',-size=>"$isize",-maxlength=>10, -autofocus=>1)),"\n";
|
||||
}
|
||||
}elsif($key =~ /int02/){
|
||||
if($cttpos->{$id}->{int35} && $cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){
|
||||
print "<td class='tdint'>\n";
|
||||
print "<td class='tdint' nowrap>\n";
|
||||
foreach my $fid (sort keys(%{ $rental_feed->{rental_description}->{tarif_elements} })){
|
||||
if(ref($rental_feed->{rental_description}->{tarif_elements}->{$fid}) eq "ARRAY"){
|
||||
print "$rental_feed->{rental_description}->{tarif_elements}->{$fid}[0]: $rental_feed->{rental_description}->{tarif_elements}->{$fid}[1]<br />\n";
|
||||
|
|
|
@ -75,6 +75,23 @@ sub tpl(){
|
|||
my $aowner = "198";
|
||||
$aowner = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} if($varenv->{merchant_id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id});
|
||||
|
||||
my $bonus_desc = "Bonusnummer (falls vorhanden)";
|
||||
my $bonus_ak = "Ihre Bonusnummer wurde akzeptiert. Bitte beachten Sie dass der Bonustarif im Kontext des Mietradbetreibers vergeben wird. Der Tarif wird bei der Mietrad Reservierung angezeigt.";
|
||||
my $bonus_avail = "Die Bonusnummer ist nicht vorhanden.";
|
||||
my $bonus_conflict = "Die Bonusnummer kann pro Registrierung nur einmal verwendet werden. So wird verhindert dass weitere Personen von den Freiminuten widerrechtlich Gebrauch nehmen.<br />
|
||||
Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weitere Produkte (Gas, SeeConnect, Fähre- oder Bus-Zeitkarten) nutzen. Dann könnte sich die zweite Person mit der weiteren Nummer registrieren.";
|
||||
my $bonus_saved = "Gespeicherte Bonusnummer:";
|
||||
|
||||
#sharee.bike text
|
||||
if($aowner == 186 || $aowner == 197){
|
||||
$bonus_desc = "Freischaltcode (falls vorhanden)";
|
||||
$bonus_ak = "Ihr Freischaltcode wurde angenommen. Bitte beachten sie dass der Freischaltcode mit einem Mietradtarif verkünpft ist. Der Tarif wird bei der Mietrad Reservierung angezeigt.";
|
||||
$bonus_avail = "Der Freischaltcode ist nicht vorhanden.";
|
||||
$bonus_conflict = "Der Freischaltcode kann nur einmal verwendet werden.";
|
||||
$bonus_saved = "Gespeicherte Freischaltcodes:";
|
||||
|
||||
}
|
||||
|
||||
my $ctrel = {};
|
||||
$ctrel = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
|
||||
#
|
||||
|
@ -239,7 +256,7 @@ EOF
|
|||
my $label_des="* $des";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" korrigieren</span>" if($R::failure);
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='' placeholder='$des' $required autofocus/>\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='' $required autofocus/>\n";
|
||||
print $q->div({-class=>'content2'}, "Falls Sie keinen e-Mail Bestätigungs Code erhalten haben, überprüfen Sie bitte Ihre bei der Registrierung angegebene e-Mail Adresse und/oder den Spam Bereich in Ihrem e-Mail Programm. Hier können Sie erneut einen ",$q->a({-style=>"color:#$bgcolor1;",-href=>"$varenv->{wwwhost}?sharee_edit=send_email$session_and"},"e-Mail Code anfordern")),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2', -style=>'color:gray;'}, "* E-Mail Bestätigungs-Code wurde bereits erfolgreich eingegeben."),"\n";
|
||||
|
@ -250,7 +267,7 @@ EOF
|
|||
my $label_des="* $des";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" korrigieren</span>" if($R::failure);
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='' placeholder='$des' $required autofocus />\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='' $required autofocus />\n";
|
||||
print $q->div({-class=>'content2'}, "Falls Sie keinen SMS Bestätigungs Code erhalten haben, überprüfen Sie bitte Ihre bei der Registrierung angegebene mobile Telefonnummer. Hier können Sie erneut einen ",$q->a({-style=>"color:#$bgcolor1;",-href=>"$varenv->{wwwhost}?sharee_edit=send_sms$session_and"},"SMS Code anfordern")),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2', -style=>'color:gray;'}, "* SMS Bestätigungs-Code wurde bereits erfolgreich eingegeben."),"\n";
|
||||
|
@ -322,7 +339,7 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
print $q->div({-class=>'content2'}, "Herzlich Willkommen. Sie können nach erfolgreicher Anmeldung unter dem Menue \"Fahrradstandortkarte\" ein Leihrad mieten."),"\n";
|
||||
}
|
||||
print $q->div({-class=>'content2'}, "Nach der Mietradnutzung haben Sie hier die Möglichkeit die Mietvorgänge einzusehen und gebuchte Rechnungen als PDF herunterzuladen."),"\n";
|
||||
print $q->div({-class=>'content2'}, "Ihre Bonusnummer wurde akzeptiert. Bitte beachten Sie dass der Bonustarif im Kontext des Mietradbetreibers vergeben wird. Der Tarif wird bei der Mietrad Reservierung angezeigt."),"\n" if($R::success && $R::success eq "txt15");
|
||||
print $q->div({-class=>'content2'}, "$bonus_ak"),"\n" if($R::success && $R::success eq "txt15");
|
||||
print $q->div({-class=>'content2'}, "Aktuell liegen keine Buchungen vor."),"\n" if(!$cttpos_count);
|
||||
|
||||
}elsif($key =~ /barcode/ && $cttpos_count){
|
||||
|
@ -523,21 +540,20 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg
|
|||
if($key eq "txt15"){
|
||||
if($R::failure =~ /^txt15/){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer ist leider nicht vorhanden. Bei nicht vorhandener Nummer das Feld bitte leer lassen.</span>";
|
||||
$label_des = "<span style=color:$red>$bonus_avail</span>";
|
||||
}
|
||||
if($R::failure =~ /conflict_txt15/){#TODO
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer kann pro Registrierung nur einmal verwendet werden. So wird verhindert dass weitere Personen von den 30-Freiminuten widerrechtlich Gebrauch nehmen.<br />
|
||||
Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weitere Produkte (Gas, SeeConnect, Fähre- oder Bus-Zeitkarten) nutzen. Dann könnte sich die zweite Person mit der weiteren Nummer registrieren.</span>";
|
||||
if($R::failure =~ /conflict_txt15/){
|
||||
$label_des = "<span style=color:$red>$bonus_conflict</span>";
|
||||
}
|
||||
|
||||
my $saved_coupon = "";
|
||||
$saved_coupon = "$ctadrcoupon->{sharee_kn}->{txt15}" if($ctadrcoupon->{sharee_kn}->{txt15});
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='$saved_coupon' override placeholder='$des' $autofocus />\n";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$bonus_desc"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='$saved_coupon' override $autofocus />\n";
|
||||
print $q->div(" ");
|
||||
foreach my $opid (keys(%$ctadrcoupon)){
|
||||
if($ctadrcoupon->{$opid}->{txt15} && ($aowner != 195 && $aowner != 185 && $aowner != 176)){
|
||||
print $q->div("Gespeicherte Bonusnummer: $ctadrcoupon->{$opid}->{txt15}"),"\n";
|
||||
print $q->div("$bonus_saved $ctadrcoupon->{$opid}->{txt15}"),"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -550,14 +566,14 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
|
|||
my $pw = "xxxxxxxx";
|
||||
$pw = "" if(!$ctrel->{c_id});
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='password' class='form-control' name='$key' value='$pw' override placeholder='$des' $required $autofocus /><br />\n";
|
||||
print "<input id='$key' type='password' class='form-control' name='$key' value='$pw' override $required $autofocus /><br />\n";
|
||||
print $q->label({-for=>"confirm_$key"},"* Passwort wiederholen"),"\n";
|
||||
print "<input id='confirm_$key' type='password' class='form-control' name='confirm_$key' value='$pw' override placeholder='$des bestätigen' $required />\n";
|
||||
print "<input id='confirm_$key' type='password' class='form-control' name='confirm_$key' value='$pw' override $required />\n";
|
||||
print $q->div({-style=>'text-align:left;color:grey;'}, "<input type='checkbox' onclick='show_passwd()'>", "Passwort anzeigen"),"\n" if($pw ne "xxxxxxxx");
|
||||
}else{
|
||||
#all other input textfields
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='$ctrel->{$key}' override placeholder='$des' $required $autofocus />\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' value='$ctrel->{$key}' override $required $autofocus />\n";
|
||||
}
|
||||
}
|
||||
#end $key =~ /txt/
|
||||
|
|
|
@ -140,7 +140,7 @@ print<<EOF
|
|||
|
||||
<div id="errorOutput"></div>
|
||||
|
||||
<input id="paymentsubmit" type="button" value="Weiter" onclick="check();">
|
||||
<input id="paymentsubmit" type="button" value="Speichern" onclick="check();">
|
||||
|
||||
</fieldset>
|
||||
<input type="hidden" name="sessionid" value="$R::sessionid">
|
||||
|
|
Loading…
Add table
Reference in a new issue