mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 11:46:27 +01:00
Operator sharee_mak init
This commit is contained in:
parent
75c38a8721
commit
b586568e68
8 changed files with 33 additions and 55 deletions
|
@ -1735,7 +1735,7 @@ sub bikes_available(){
|
|||
|
||||
if(ref($tariff_content) eq "HASH"){
|
||||
foreach my $tid (sort { $tariff_content->{$a}->{barcode} <=> $tariff_content->{$b}->{barcode} } keys (%$tariff_content)){
|
||||
$bw->log("bikes_available tariff_content tariff_description $tariff_content->{$tid}->{int12} && $auth->{txt30} =~ /$tariff_content->{$tid}->{barcode}/ BIKE:",$return->{$id}->{bike},"");
|
||||
#$bw->log("bikes_available tariff_content tariff_description $tariff_content->{$tid}->{int12} && $auth->{txt30} =~ /$tariff_content->{$tid}->{barcode}/ BIKE:",$return->{$id}->{bike},"");
|
||||
|
||||
foreach(@adr_tariff){
|
||||
if($record->{$id}->{main_id} == $tariff_content->{$tid}->{int12} && $_ == $tariff_content->{$tid}->{barcode}){
|
||||
|
|
|
@ -388,7 +388,8 @@ sub collect_noderel {
|
|||
my $dbh = shift || $dbh_intern;
|
||||
my $main_id = shift;
|
||||
my $template_id = shift || "";
|
||||
my $where = "WHERE n.main_id=rel.main_id and rel.content_id=0 and n.parent_id=$main_id";
|
||||
#my $where = "WHERE n.main_id=rel.main_id and rel.content_id=0 and n.parent_id=$main_id";
|
||||
my $where = "WHERE n.main_id=rel.main_id and rel.content_id=0 and n.parent_id=$main_id and node_public='t'";
|
||||
$where .= " and rel.template_id=$template_id" if($template_id);
|
||||
my $sth = $dbh->prepare("SELECT * FROM nodes n, relation rel $where");
|
||||
my $rc = $sth->execute();
|
||||
|
@ -1142,7 +1143,7 @@ sub insert_nodeoid(){
|
|||
my $node_path = $insert->{node_name};
|
||||
($node_name,$node_path) = split(/\|/,$node_name) if($node_name =~ /\|/);
|
||||
|
||||
my $sth2 = $dbh->prepare("INSERT INTO nodes (main_id,parent_id,lang,node_name,node_path,n_sort,owner) VALUES('$insert->{main_id}','$insert->{parent_id}','$insert->{lang}','$node_name','$node_path','$insert->{n_sort}','$insert->{owner}')");
|
||||
my $sth2 = $dbh->prepare("INSERT INTO nodes (main_id,parent_id,lang,node_name,node_path,n_sort,owner,node_public) VALUES('$insert->{main_id}','$insert->{parent_id}','$insert->{lang}','$node_name','$node_path','$insert->{n_sort}','$insert->{owner}','t')");
|
||||
my $rc = $sth2->execute();
|
||||
$sth2 = $dbh->prepare("INSERT INTO relation (main_id,template_id,content_id,lang,change) VALUES('$insert->{main_id}','$insert->{template_id}','$insert->{content_id}','$insert->{lang}','now()') RETURNING rel_id");
|
||||
$rc = $sth2->execute();
|
||||
|
|
|
@ -735,10 +735,10 @@ sub handler {
|
|||
|
||||
my $base_uri = "true";
|
||||
my $title = "";
|
||||
$title .= "devel " if($dbt->{copri_conf}->{stage} eq "test");
|
||||
$title .= $dbt->{primary}->{$varenv{dbname}}->{title} if($dbt->{primary}->{$varenv{dbname}}->{title});
|
||||
$title .= $dbt->{operator}->{$varenv{dbname}}->{title} if($dbt->{operator}->{$varenv{dbname}}->{title});
|
||||
$title .= $dbt->{website}->{$varenv{syshost}}->{title} if($dbt->{website}->{$varenv{syshost}}->{title});
|
||||
$title = $dbt->{primary}->{$varenv{dbname}}->{title} if($dbt->{primary}->{$varenv{dbname}}->{title});
|
||||
$title = $dbt->{operator}->{$varenv{dbname}}->{title} if($dbt->{operator}->{$varenv{dbname}}->{title});
|
||||
$title = $dbt->{website}->{$varenv{syshost}}->{title} if($dbt->{website}->{$varenv{syshost}}->{title});
|
||||
$title .= " devel" if($dbt->{copri_conf}->{stage} eq "test");
|
||||
my $html5 = $q->start_html(-title=>"$title",
|
||||
-lang=>'de',
|
||||
-onload=>"$onload",
|
||||
|
|
|
@ -173,15 +173,7 @@ sub esender_success {
|
|||
my $wwwhost = shift;
|
||||
my %varenv = &Config::envonline("","$wwwhost");
|
||||
|
||||
my $ct = {};
|
||||
if($varenv{syshost} =~ /konrad|tink/i){
|
||||
$ct = &get_content("content","3435","1");
|
||||
$ct->{txt01} = $q->unescapeHTML($ct->{txt01});
|
||||
$ct->{txt01} =~ s/\r\n/<br \/>/g;
|
||||
$ct->{txt01} = Encode::encode('iso-8859-1', Encode::decode('utf-8', $ct->{txt01}));
|
||||
}else{
|
||||
$ct = &get_content("contentuser",$globalconf{shareedms_conf}->{parent_node},"201");
|
||||
}
|
||||
my $ct = &get_content("contentuser",$globalconf{shareedms_conf}->{parent_node},"201");
|
||||
|
||||
|
||||
my $email = $q->unescapeHTML($ctadr->{txt08});
|
||||
|
@ -207,33 +199,12 @@ sub esender_success {
|
|||
|
||||
|
||||
#email html body---------------------------------------------------
|
||||
my $body;
|
||||
|
||||
if($varenv{syshost} =~ /konrad|tink/i){
|
||||
my $body = "";
|
||||
my $encoded_email = $uri_encode->encode($ctadr->{txt08});
|
||||
$body = <<EOF
|
||||
Vielen Dank für Ihre Anmeldung.
|
||||
Vielen Dank für Ihre Registrierung im Mietradsystem.
|
||||
|
||||
Damit wir das Fahrradmietsystem für Sie freischalten können, benötigen wir abschließend eine Bestätigung. Klicken Sie hierzu auf folgenden Link:
|
||||
<a href='http://www.konrad-konstanz.net?confirm_email=$encoded_email&confirm_code=$ctadr->{c_id}'>www.konrad-konstanz.net?confirm_email=$encoded_email&confirm_code=$ctadr->{c_id}</a>
|
||||
Der Link führt Sie zur Website der Stadtwerke Konstanz. Damit sind Sie freigeschaltet.
|
||||
|
||||
Falls Sie zur Eingabe eines Bestätigungscode aufgefordert werden, lautet dieser: <b>$ctadr->{c_id}</b>
|
||||
|
||||
Die hinterlegten Zugangsdaten dienen zum Anmelden im Fahrradmietsystem der APP und im Browser <a href='http://www.konrad-konstanz.de'>www.konrad-konstanz.de</a>
|
||||
|
||||
Viel Spaß beim Radeln.
|
||||
|
||||
EOF
|
||||
;
|
||||
|
||||
}else{#sharee
|
||||
|
||||
my $encoded_email = $uri_encode->encode($ctadr->{txt08});
|
||||
$body = <<EOF
|
||||
Vielen Dank für Ihre Anmeldung.
|
||||
|
||||
Damit wir das Fahrradmietsystem für Sie freischalten können, benötigen wir eine e-Mail Bestätigung.
|
||||
Damit Sie Ihr Nutzerkonto in der App freischalten können, verwenden Sie folgenden e-Mail Bestätigungscode bei Ihrer Registrierung.
|
||||
Der e-Mail Bestätigungscode lautet: <b>$email_ack_digest</b>
|
||||
|
||||
Viel Spaß beim Radeln.
|
||||
|
@ -249,24 +220,17 @@ $ct->{txt11}
|
|||
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
$body =~ s/\n/<br \/>/g;
|
||||
my $html = "<html><head><title>$varenv{title}</title></head><body style='text-align:left;border:0px solid silver;padding:15px;margin:2%;width:90%;'>\n";
|
||||
$html .= "<div>$body</div>";
|
||||
#if($mandant eq "TINK"){
|
||||
# $html .= "<div><img src=\"https://www2.tink-konstanz.de/img/TINK_Signatur.jpg\" \/></div>";
|
||||
#}
|
||||
if($varenv{syshost} =~ /konrad|tink/i){
|
||||
$html .= "<div>$ct->{txt01}</div>\n";
|
||||
}
|
||||
$html .= "</body></html>";
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
|
||||
|
||||
my $subject = "$varenv{title} Anmeldebestätigung";
|
||||
my $subject = "Mietrad Anmeldebestätigung";
|
||||
if($hostname ne "ginger"){
|
||||
$email = $mailxconf{mailx_default}->{mail_to};
|
||||
$subject .= "* offline Test *";
|
||||
|
|
|
@ -362,7 +362,7 @@ EOF
|
|||
print $q->td({-class=>'left_italic_cms',-colspan=>'1'},"$des");
|
||||
print $q->td({-class=>'content1_cms',-colspan=>'1'},$but->selector_class("$key","eselect","width:350px;",$ctrel->{$key},@_valxx));
|
||||
}
|
||||
elsif($key =~ /int10/ && "$size" eq "select" && ($node_meta->{tpl_id} == 205 || $node_meta->{tpl_id} == 225)){#bike_state
|
||||
elsif($key =~ /int10/ && "$size" eq "select" && $node_meta->{tpl_id} == 205){#bike_state
|
||||
my @_lock_valxx = ();
|
||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{bike_state} }) {
|
||||
push @_lock_valxx, "$key:$value";#[1:available] ...
|
||||
|
@ -371,6 +371,16 @@ EOF
|
|||
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
|
||||
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_lock_valxx));
|
||||
}
|
||||
elsif($key =~ /int10/ && "$size" eq "select" && $node_meta->{tpl_id} == 225){#station_state
|
||||
my @_lock_valxx = ();
|
||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{station_state} }) {
|
||||
push @_lock_valxx, "$key:$value";#[1:available] ...
|
||||
}
|
||||
print $q->Tr();
|
||||
print $q->td({-class=>'left_italic_cms'},"$des"),"\n";
|
||||
print $q->td({-class=>'content1_cms',-colspan=>'2'},$but->selector_class("$key","eselect","",$ctrel->{$key},@_lock_valxx));
|
||||
}
|
||||
|
||||
elsif($key =~ /int18/ && "$size" eq "select" && $node_meta->{tpl_id} == 210){#sharing_type
|
||||
my @_lock_valxx = ();
|
||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{sharing_type} }) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#SMS message if 24h,48h,72h occupied
|
||||
#sudo su www-data -c "./src/scripts/sms_message.pl shareedms-fr01 '24h_occupied' '' ''"
|
||||
#
|
||||
#SMS message locking_progress after 45sec
|
||||
#SMS message locking_progress after 60sec
|
||||
#sudo su www-data -c "./src/scripts/sms_message.pl shareeapp-operator locking_progress '0179xxxx372' $pos_id"
|
||||
#
|
||||
#
|
||||
|
@ -107,9 +107,9 @@ if($todo eq "24h_occupied"){
|
|||
}
|
||||
}#end
|
||||
|
||||
#SMS message locking_progress after 45sec
|
||||
#SMS message locking_progress after 60sec
|
||||
if($todo eq "locking_progress" && $phone && $pos_id){
|
||||
sleep 45;
|
||||
sleep 60;
|
||||
#select booking pos if lock_state=locking still set
|
||||
my $booking_pos = {
|
||||
table => "contenttranspos",
|
||||
|
|
|
@ -159,7 +159,6 @@ my $and_station_state_unlocked = "";
|
|||
|
||||
#system=sigo
|
||||
if($operator_key eq "sharee_sx"){
|
||||
#$bike = "SX1150";
|
||||
$latitude = "";
|
||||
$longitude = "";
|
||||
#$and_station_state_locking = "&station_state=locking";
|
||||
|
@ -168,15 +167,18 @@ if($operator_key eq "sharee_sx"){
|
|||
}
|
||||
|
||||
if($operator_key eq "sharee_kn"){
|
||||
#$bike = "KN259";
|
||||
$latitude = "47.66267";
|
||||
$longitude = "9.17262";
|
||||
}
|
||||
if($operator_key eq "sharee_wue"){
|
||||
#$bike = "WUE5529";
|
||||
$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";
|
||||
|
|
|
@ -23,6 +23,7 @@ sub new {
|
|||
sub tpl(){
|
||||
my $self = shift;
|
||||
my ($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return) = @_;
|
||||
#print Dumper($node_meta);exit;
|
||||
|
||||
my $lang = "de";
|
||||
my $debug = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue