mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-21 11:16:29 +01:00
mailx default
This commit is contained in:
parent
1131cc4b81
commit
7a54a35b00
8 changed files with 50 additions and 45 deletions
1
copri4/main/js/iframeResizer.contentWindow.min.js
vendored
Symbolic link
1
copri4/main/js/iframeResizer.contentWindow.min.js
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/shareeconf/iframeResizer.contentWindow.min.js
|
1
copri4/main/js/iframeResizer.min.js
vendored
Symbolic link
1
copri4/main/js/iframeResizer.min.js
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
/etc/shareeconf/iframeResizer.min.js
|
|
@ -1499,7 +1499,7 @@ sub bikes_available(){
|
|||
$return->{$id}->{tariff_description}->{max_eur_per_day} = "$tariff_content->{$tid}->{int17}" if($tariff_content->{$tid}->{int17});
|
||||
$return->{$id}->{tariff_description}->{free_hours} = "$tariff_content->{$tid}->{int16}" if($tariff_content->{$tid}->{int16});
|
||||
$return->{$id}->{tariff_description}->{abo_eur_per_month} = "$tariff_content->{$tid}->{int15}" if($tariff_content->{$tid}->{int15});
|
||||
$return->{$id}->{tariff_description}->{$id}->{operator_agb} = "Mit der Mietrad Anmietung wird folgender Betreiber <a href='$varenv->{wwwhost}/site/agb.html' target='_blank'>AGB</a> zugestimmt (als Demo sharee AGB)." if($auth->{c_id} == 1842 || $auth->{c_id} == 5781);
|
||||
$return->{$id}->{tariff_description}->{operator_agb} = "Mit der Mietrad Anmietung wird folgender Betreiber <a href='$varenv->{wwwhost}/site/agb.html' target='_blank'>AGB</a> zugestimmt (als Demo sharee AGB)." if($auth->{c_id} == 1842 || $auth->{c_id} == 5781);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2017,7 +2017,9 @@ sub auth_verify(){
|
|||
|
||||
my $record = { c_id => 0 };#if fails
|
||||
my $return = { authcookie => "",
|
||||
merchant_id => ""
|
||||
merchant_id => "",
|
||||
user_tour => [],
|
||||
user_group => []
|
||||
};
|
||||
my $user_group = "";
|
||||
my $bike_group = "";
|
||||
|
@ -2169,13 +2171,12 @@ sub auth_verify(){
|
|||
my @check_cookies = split(/\|/,$record->{txt05});
|
||||
foreach(@check_cookies){
|
||||
if(length($_) > 30 && $_ =~ /$cgi_authcookie/){
|
||||
$return = { authcookie => $cgi_authcookie,
|
||||
user_id => "$record->{txt08}",
|
||||
user_group => $user_group,
|
||||
user_tour => $user_tour,
|
||||
};
|
||||
$return = { %$return, debuglevel => "$record->{int11}" } if($record->{int11});
|
||||
$return = { %$return, Ilockit_admin => "$record->{int19}" } if($record->{int19});
|
||||
$return->{authcookie} = $cgi_authcookie;
|
||||
$return->{user_id} = $record->{txt08};
|
||||
$return->{user_group} = $user_group;
|
||||
$return->{user_tour} = $user_tour;
|
||||
$return->{debuglevel} = "$record->{int11}" if($record->{int11});
|
||||
$return->{Ilockit_admin} = "$record->{int19}" if($record->{int19});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2193,13 +2194,12 @@ sub auth_verify(){
|
|||
($bike_group,$user_group,$tariff_content,$user_tour) = $self->fetch_tariff($record,$q->param('authcookie'));
|
||||
#maybe there isnt't any authcookie still available on confirm
|
||||
if ($record->{c_id} > 0){
|
||||
$return = { user_id => "$record->{txt08}",
|
||||
user_group => $user_group,
|
||||
user_tour => $user_tour,
|
||||
};
|
||||
$return = { %$return, debuglevel => "$record->{int11}" } if($record->{int11});
|
||||
$return = { %$return, Ilockit_admin => "$record->{int19}" } if($record->{int19});
|
||||
$return = { %$return, response_text => "Danke, die Anmeldebestätigung war erfolgreich." };
|
||||
$return->{user_id} = $record->{txt08};
|
||||
$return->{user_group} = $user_group;
|
||||
$return->{user_tour} = $user_tour;
|
||||
$return->{debuglevel} = "$record->{int11}" if($record->{int11});
|
||||
$return->{Ilockit_admin} = "$record->{int19}" if($record->{int19});
|
||||
$return->{response_text} = "Danke, die Anmeldebestätigung war erfolgreich.";
|
||||
}
|
||||
}else{
|
||||
$bw->log("auth_verified on operator anchor FAILS by dbname $varenv{dbname}, no authcookie, dump \$q",$q,"");
|
||||
|
@ -2239,9 +2239,11 @@ sub auth_verify(){
|
|||
|
||||
#Servicetool only users with users.int09=1
|
||||
#shareetool
|
||||
if($varenv{dbname} ne "sharee_primary" && $q->param('authcookie') && $dbt->{merchant_ids}->{$return->{merchant_id}}->{id} && $dbt->{merchant_ids}->{$return->{merchant_id}}->{id} == 187){
|
||||
if($varenv{dbname} ne "sharee_primary" && $return->{merchant_id} && $dbt->{merchant_ids}->{$return->{merchant_id}}->{id} && $dbt->{merchant_ids}->{$return->{merchant_id}}->{id} == 187){
|
||||
my $users_serviceapp = { u_id => 0 };
|
||||
$users_serviceapp = $dbt->select_users($dbh,$record->{c_id},"and int09=1");
|
||||
$bw->log("users_serviceapp: $users_serviceapp->{u_id} && $varenv{dbname} && $return->{merchant_id} && $dbt->{merchant_ids}->{$return->{merchant_id}}->{id}","","");
|
||||
|
||||
if(!$users_serviceapp->{u_id} || $users_serviceapp->{u_id} == 0){
|
||||
$record = { c_id => 0 };
|
||||
$bw->log("reset auth_verify because of only Servicetool users access:",$record,"");
|
||||
|
|
|
@ -54,6 +54,7 @@ sub loop_sharees {
|
|||
$project = $val if($val eq "Bayern");#restricted map view only on lastenrad bayern iframe
|
||||
$project = $val if($val eq "Konstanz");
|
||||
$project = $val if($val eq "Demo");
|
||||
$project = $val if($val eq "LastenVelo");
|
||||
}
|
||||
}
|
||||
$rest =~ s/\&$//;
|
||||
|
|
|
@ -82,7 +82,7 @@ sub handler {
|
|||
#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");
|
||||
$varenv{syshost} = $1 if( -d "/var/www/copri-bike/$1");
|
||||
$mode = "manager" if($varenv{syshost} =~ /shareedms-/ && !$mode);
|
||||
}
|
||||
die "no configuration available" if(!$varenv{syshost});
|
||||
|
@ -690,7 +690,7 @@ sub handler {
|
|||
}
|
||||
|
||||
my $base_uri = "true";
|
||||
my $title = "";
|
||||
my $title = "$varenv{syshost} ";
|
||||
$title .= $dbt->{primary}->{$varenv{dbname}}->{pprefix} if($dbt->{primary}->{$varenv{dbname}}->{pprefix});
|
||||
$title .= $dbt->{operator}->{$varenv{dbname}}->{project} if($dbt->{operator}->{$varenv{dbname}}->{project});
|
||||
$title .= " " . $dbt->{operator}->{$varenv{dbname}}->{oprefix} if($dbt->{operator}->{$varenv{dbname}}->{oprefix});
|
||||
|
|
|
@ -47,8 +47,8 @@ sub send_mail(){
|
|||
my $sendref = shift;
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
|
||||
|
||||
my $mail_from = $sendref->{mail_from} || $mailxconf{mailx}->{mail_from};
|
||||
my $mail_to = $sendref->{mail_to} || $mailxconf{mailx}->{mail_to};
|
||||
my $mail_from = $sendref->{mail_from} || $mailxconf{mailx_default}->{mail_from};
|
||||
my $mail_to = $sendref->{mail_to} || $mailxconf{mailx_default}->{mail_to};
|
||||
my $subject = $sendref->{subject} || "subject fails";
|
||||
my $filename = $sendref->{filename} || "";
|
||||
my $message = $sendref->{message} || "Failure, no message\n";
|
||||
|
@ -65,7 +65,7 @@ sub send_mail(){
|
|||
#@files = $lb->read_dirfiles("$dbt->{copri_conf}->{basedir}/csv",$filename,"file","") if($filename =~ /\d+-\d+/);
|
||||
|
||||
if($dbt->{copri_conf}->{stage} eq "test"){
|
||||
$mail_to = $mailxconf{mailx}->{mail_to};
|
||||
$mail_to = $mailxconf{mailx_default}->{mail_to};
|
||||
$subject .= " * offline Test *";
|
||||
}
|
||||
|
||||
|
@ -74,15 +74,15 @@ sub send_mail(){
|
|||
|
||||
if(ref($sendref) eq "HASH"){
|
||||
|
||||
$mailxconf{mailx}->{sasl_password} = Encode::encode('iso-8859-1', Encode::decode('utf-8', $mailxconf{mailx}->{sasl_password}));
|
||||
$mailxconf{mailx_default}->{sasl_password} = Encode::encode('iso-8859-1', Encode::decode('utf-8', $mailxconf{mailx_default}->{sasl_password}));
|
||||
my $transport = Email::Sender::Transport::SMTPS->new(
|
||||
host => "$mailxconf{mailx}->{mail_gateway}",
|
||||
host => "$mailxconf{mailx_default}->{mail_gateway}",
|
||||
ssl => 'ssl',
|
||||
port => 465,
|
||||
sasl_username => "$mailxconf{mailx}->{sasl_username}",
|
||||
sasl_password => "$mailxconf{mailx}->{sasl_password}",
|
||||
helo => "$dbt->{copri_conf}->{stage}",
|
||||
debug => 0,
|
||||
sasl_username => "$mailxconf{mailx_default}->{sasl_username}",
|
||||
sasl_password => "$mailxconf{mailx_default}->{sasl_password}",
|
||||
helo => "$mailxconf{mailx_default}->{mail_from}",
|
||||
debug => 1,
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -129,9 +129,9 @@ sub updater(){
|
|||
|
||||
my $ctadr = &get_contentadr($c_id,$emailpw) if($c_id =~ /^\d+$/ || $emailpw =~ /\w+\@\w+/);
|
||||
|
||||
my $smtp = Net::SMTP->new($mailxconf{mailx}->{mail_gateway},
|
||||
my $smtp = Net::SMTP->new($mailxconf{mailx_default}->{mail_gateway},
|
||||
Port => 465,
|
||||
Hello => 'fahrradspezialitaeten.com',
|
||||
Hello => 'sharee.bike',
|
||||
Timeout => 30,
|
||||
Debug => 0,
|
||||
SSL => 1,
|
||||
|
@ -139,8 +139,8 @@ my $ctadr = &get_contentadr($c_id,$emailpw) if($c_id =~ /^\d+$/ || $emailpw =~ /
|
|||
|
||||
|
||||
#$varenv{sasl_password} = Encode::encode('iso-8859-1', Encode::decode('utf-8', $varenv{sasl_password}));
|
||||
$smtp->auth($mailxconf{mailx}->{sasl_username},$mailxconf{mailx}->{sasl_password});
|
||||
$smtp->mail($mailxconf{mailx}->{mail_from});
|
||||
$smtp->auth($mailxconf{mailx_default}->{sasl_username},$mailxconf{mailx}->{sasl_password});
|
||||
$smtp->mail($mailxconf{mailx_default}->{mail_from});
|
||||
|
||||
my $smtp_return = "";
|
||||
if($todo eq "emailack"){
|
||||
|
@ -268,7 +268,7 @@ EOF
|
|||
|
||||
my $subject = "$varenv{title} Anmeldebestätigung";
|
||||
if($hostname ne "ginger"){
|
||||
$email = $mailxconf{mailx}->{mail_testto};
|
||||
$email = $mailxconf{mailx_default}->{mail_to};
|
||||
$subject .= "* offline Test *";
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ EOF
|
|||
|
||||
my $subject = "$varenv{title} Passwort vergessen";
|
||||
if($hostname ne "ginger"){
|
||||
$email = $mailxconf{mailx}->{mail_testto};
|
||||
$email = $mailxconf{mailx_default}->{mail_to};
|
||||
$subject .= "* offline Test *";
|
||||
}
|
||||
|
||||
|
@ -532,7 +532,7 @@ $body =~ s/\n/<br \/>/g;
|
|||
|
||||
|
||||
if($hostname ne "ginger"){
|
||||
$email = $mailxconf{mailx}->{mail_testto};
|
||||
$email = $mailxconf{mailx_default}->{mail_to};
|
||||
$subject .= "* offline Test *";
|
||||
}
|
||||
my $message;
|
||||
|
|
|
@ -128,6 +128,16 @@ sub tpl(){
|
|||
|
||||
}
|
||||
|
||||
print "<script type='text/javascript' src='$varenv->{metahost}/js/iframeResizer.contentWindow.min.js'></script>\n";
|
||||
|
||||
my $debug_footer = "Mlogic --> (syshost: $varenv->{syshost} | users_sharee->{c_id}: $users_sharee->{c_id} | ct_table: $node_meta->{ct_table} | parent_id: $node_meta->{parent_id} | main_id: $node_meta->{main_id} | tpl_id: $node_meta->{tpl_id} | $users_dms->{u_id})";
|
||||
print $q->div({-style=>'position:fixed;bottom:0%;right:2%;z-index:10;font-size:13px;'},"$debug_footer"),"\n" if($users_sharee->{c_id} eq $varenv->{superu_id});
|
||||
|
||||
if($return && $return =~ /failure/){
|
||||
require "Mod/Failure.pm";
|
||||
&Failure::tpl("",$users_dms->{u_id},"","","","",$return);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#2021-05-05 changed to Mlogic
|
||||
|
@ -140,7 +150,6 @@ sub tplselect(){
|
|||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $u_id = $users_dms->{u_id} || "";
|
||||
my $lang = "de";
|
||||
my $tpl_id = $node_meta->{tpl_id};
|
||||
|
||||
|
@ -168,15 +177,6 @@ sub tplselect(){
|
|||
}
|
||||
}
|
||||
|
||||
print "<script type='text/javascript' src='$varenv->{metahost}/js/iframeResizer.contentWindow.min.js'></script>\n";
|
||||
|
||||
my $debug_footer = "Mlogic --> (syshost: $varenv->{syshost} | users_sharee->{c_id}: $users_sharee->{c_id} | ct_table: $node_meta->{ct_table} | parent_id: $node_meta->{parent_id} | main_id: $node_meta->{main_id} | tpl_id: $node_meta->{tpl_id} | u_id: $u_id | mode: $mode)";
|
||||
print $q->div({-style=>'position:fixed;bottom:0%;right:2%;z-index:10;font-size:13px;'},"$debug_footer"),"\n" if($users_sharee->{c_id} eq $varenv->{superu_id});
|
||||
|
||||
if($return && $return =~ /failure/){
|
||||
require "Mod/Failure.pm";
|
||||
&Failure::tpl("",$u_id,"","","","",$return);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Reference in a new issue