mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-10 05:56:27 +02:00
Initial commit
This commit is contained in:
parent
b686656e88
commit
5e91fe947d
177 changed files with 41037 additions and 0 deletions
112
copri4/shareeapp-operator/apache/shareeapp-operator.conf
Normal file
112
copri4/shareeapp-operator/apache/shareeapp-operator.conf
Normal file
|
@ -0,0 +1,112 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName shareeapp-operator.copri-bike.de
|
||||
ServerAlias shareeapp-operator1.copri-bike.de
|
||||
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareeapp-operator
|
||||
|
||||
ErrorLog /var/log/apache2/shareeapp-operator-error.log
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareeapp-operator-access.log combined
|
||||
ServerSignature Off
|
||||
RewriteEngine on
|
||||
RewriteCond %{SERVER_NAME} =shareeapp-operator.copri-bike.de
|
||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
</VirtualHost>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ServerName shareeapp-operator1.copri-bike.de
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareeapp-operator
|
||||
AddHandler cgi-script .cgi .sh .pl
|
||||
|
||||
<Directory /var/www/copri4/shareeapp-operator>
|
||||
Options -Indexes +FollowSymLinks +ExecCGI
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<FilesMatch ".(eot|ttf|otf|woff|woff2)">
|
||||
Header set Access-Control-Allow-Origin "copri-bike.de"
|
||||
</FilesMatch>
|
||||
|
||||
<Directory /var/www/copri4/shareeapp-operator/site>
|
||||
Options -Indexes +FollowSymLinks -ExecCGI
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/copri4/shareeapp-operator/cache>
|
||||
Options -Indexes +FollowSymLinks
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
ForceType application/octet-stream
|
||||
Header set Content-Disposition attachment
|
||||
</Directory>
|
||||
|
||||
ErrorLog /var/log/apache2/shareeapp-operator-error.log
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareeapp-operator-access.log combined
|
||||
ServerSignature Off
|
||||
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||
|
||||
SSLCertificateFile /etc/letsencrypt/live/copri-bike.de-0003/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/copri-bike.de-0003/privkey.pem
|
||||
</VirtualHost>
|
||||
|
||||
|
||||
<VirtualHost *:443>
|
||||
ServerName shareeapp-operator.copri-bike.de
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareeapp-operator
|
||||
|
||||
PerlOptions +Parent
|
||||
PerlRequire /var/www/copri4/shareeapp-operator/startup.pl
|
||||
|
||||
<Location />
|
||||
SetHandler perl-script
|
||||
PerlResponseHandler Mod::Indexsharee
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlOptions +ParseHeaders +GlobalRequest
|
||||
Options -ExecCGI +FollowSymLinks
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Location>
|
||||
|
||||
<Location /APIvelo>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::APIvelo
|
||||
</Location>
|
||||
|
||||
<Location /APIjsonserver>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::APIjsonserver
|
||||
</Location>
|
||||
|
||||
<Location /FileOut>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::FileOut
|
||||
</Location>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RedirectMatch ^/$ /app/Anmelden
|
||||
SSLProxyEngine On
|
||||
RewriteCond %{REQUEST_URI} ^/(site|img|data|css|js|jquery)
|
||||
RewriteRule ^(.*)$ https://shareeapp-operator1.copri-bike.de/$1 [P,L]
|
||||
</IfModule>
|
||||
|
||||
ErrorLog /var/log/apache2/shareeapp-operator-error.log
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareeapp-operator-access.log combined
|
||||
ServerSignature Off
|
||||
Include /etc/letsencrypt/options-ssl-apache.conf
|
||||
SSLCertificateFile /etc/letsencrypt/live/copri-bike.de-0003/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/copri-bike.de-0003/privkey.pem
|
||||
</VirtualHost>
|
||||
|
||||
</IfModule>
|
||||
|
1
copri4/shareeapp-operator/css/bootstrap-icons-1.5.0
Symbolic link
1
copri4/shareeapp-operator/css/bootstrap-icons-1.5.0
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/css/bootstrap-icons-1.5.0
|
699
copri4/shareeapp-operator/css/local_style1344.css
Executable file
699
copri4/shareeapp-operator/css/local_style1344.css
Executable file
|
@ -0,0 +1,699 @@
|
|||
<!--
|
||||
|
||||
html,body {
|
||||
background-color: white;
|
||||
background-repeat:repeat-x;
|
||||
background-position: top left;
|
||||
background-attachment:fixed;
|
||||
color: #3f3f3f;
|
||||
line-height:1.4;
|
||||
font-family:'Arial';
|
||||
font-size:14px;
|
||||
line-height:1.0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.bgheader{
|
||||
background: linear-gradient(top, #eaeaea 0%, #008dd2 25%, #008dd2 100%);
|
||||
background: -moz-linear-gradient(top, #eaeaea 0%, #008dd2 25%, #008dd2 100%);
|
||||
background: -webkit-linear-gradient(top, #eaeaea 0%, #008dd2 25%, #008dd2 100%);
|
||||
background: -ms-linear-gradient(top, #eaeaea 0%, #008dd2 25%, #008dd2 100%);
|
||||
background: -o-linear-gradient(top, #eaeaea 0%, #008dd2 25%, #008dd2 100%);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#scroll-top-wrapper {
|
||||
position: fixed;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
z-index: 999;
|
||||
-webkit-transition: all 0.5s ease-in-out;
|
||||
-moz-transition: all 0.5s ease-in-out;
|
||||
-ms-transition: all 0.5s ease-in-out;
|
||||
-o-transition: all 0.5s ease-in-out;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
#scroll-top-wrapper a:hover {
|
||||
color: gray;
|
||||
}
|
||||
#scroll-top-wrapper.show {
|
||||
visibility:visible;
|
||||
cursor:pointer;
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
|
||||
#map a{
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
#google-maps {
|
||||
position: relative;
|
||||
padding-bottom: 75%; // This is the aspect ratio
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#google-maps iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
th {
|
||||
padding:0.3em 0.5em;
|
||||
text-align:center;
|
||||
font-weight: normal;
|
||||
background-color: silver;
|
||||
border-right: solid thin gray;
|
||||
border-bottom: solid thin gray;
|
||||
}
|
||||
|
||||
.tdint {
|
||||
padding:0.3em 0.5em;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
|
||||
}
|
||||
.tdtxt {
|
||||
padding:0.3em 0.5em;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
select,input {
|
||||
border: 1px solid #c7c8ca;
|
||||
color:black;
|
||||
}
|
||||
.ebutton {
|
||||
font-size:1em;
|
||||
font-weight:normal;
|
||||
border: 1px solid #fff;
|
||||
color:black;
|
||||
background-color:#c7c8ca;
|
||||
width:160px;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
}
|
||||
.ebutton:hover {
|
||||
color:#464433;
|
||||
background-color:#e2dcd4;
|
||||
}
|
||||
.ebutton2 {
|
||||
font-size:1em;
|
||||
font-weight:normal;
|
||||
border: 0px solid #fff;
|
||||
color:black;
|
||||
background-color:#c7c8ca;
|
||||
width:160px;
|
||||
text-align:right;
|
||||
cursor:pointer;
|
||||
}
|
||||
.ebutton2:hover {
|
||||
color:#464433;
|
||||
}
|
||||
|
||||
.ebutton3 {
|
||||
font-size:0.91em;
|
||||
font-weight:normal;
|
||||
height:100%;
|
||||
border: 1px solid silver;
|
||||
color:black;
|
||||
background-color:#ca7044;
|
||||
width:100px;
|
||||
margin:0 10px;
|
||||
text-align:center;
|
||||
cursor:pointer;
|
||||
}
|
||||
.ebutton3:hover {
|
||||
color:#464433;
|
||||
background-color:#e2dcd4;
|
||||
}
|
||||
|
||||
|
||||
.etxt {
|
||||
font-size:100%;
|
||||
border: 0px solid #c7c8ca;
|
||||
background-color: #fff;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
width:100%;
|
||||
box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
.etxt2 {
|
||||
color:black;
|
||||
font-size:14px;
|
||||
border: 0px solid #c7c8ca;
|
||||
background-color: #fff;
|
||||
padding:0 1px;
|
||||
}
|
||||
.stxt {
|
||||
font-size:100%;
|
||||
border: 0px solid silver;
|
||||
background-color: #ffffff;
|
||||
width:100%;
|
||||
box-sizing:border-box;
|
||||
-moz-box-sizing:border-box;
|
||||
}
|
||||
|
||||
.eimg {
|
||||
height: 20px;
|
||||
width: 200px;
|
||||
border: 1px solid #c7c8ca;
|
||||
background-color: #fff;
|
||||
}
|
||||
.eselect {
|
||||
font-size:100%;
|
||||
border: 1px solid #c7c8ca;
|
||||
background-color: #fff;
|
||||
color:black;
|
||||
}
|
||||
|
||||
|
||||
.hide {display: all;}
|
||||
|
||||
img {border:0px solid black;}
|
||||
|
||||
div a {
|
||||
color:#3f3f3f;
|
||||
text-decoration: underline;
|
||||
}
|
||||
div a:hover {
|
||||
color: grey;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.content_teaser2 {
|
||||
padding:3px 5px 0 0;
|
||||
}
|
||||
.content_img2 {
|
||||
float:left;
|
||||
vertical-align: top;
|
||||
padding:3px 14px 3px 14px;
|
||||
}
|
||||
.content_img3 {
|
||||
vertical-align: bottom;
|
||||
padding:14px 5px;
|
||||
}
|
||||
.content_img4 {
|
||||
float:right;
|
||||
vertical-align: top;
|
||||
padding:2px 15px;
|
||||
}
|
||||
.chron_underlined3 {
|
||||
font-weight:normal;
|
||||
text-decoration: underline;
|
||||
font-size:12px;
|
||||
color:white;
|
||||
padding:14px 15px 0 15px;
|
||||
}
|
||||
.chron_direct3 {
|
||||
color: white;
|
||||
padding:0 15px 0 15px;
|
||||
}
|
||||
/*end*/
|
||||
|
||||
|
||||
/*---a basic box ---*/
|
||||
.box{
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
margin: 10px;
|
||||
float: left;
|
||||
border: 1px solid #333;
|
||||
background: #999;
|
||||
|
||||
}
|
||||
|
||||
div#botlogic {
|
||||
background-color: #f1f1f1;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
padding:1em 0.1em 0em 0.1em;
|
||||
border: 1px solid silver;
|
||||
min-width: 30em;
|
||||
max-width: 53em;
|
||||
}
|
||||
|
||||
|
||||
div#retm {
|
||||
position:fixed;
|
||||
right:0;
|
||||
top:15px;;
|
||||
border:1px solid #007700;
|
||||
padding:5px;
|
||||
width:150px;
|
||||
text-align:left;
|
||||
color:white;
|
||||
background-color:#7ec43b;
|
||||
cursor:pointer;
|
||||
z-index:11;
|
||||
}
|
||||
|
||||
div#cody {
|
||||
position:fixed;
|
||||
width: 100%;
|
||||
height:100%;
|
||||
//background: transparent url(/img/overlay2.png) repeat 0 0;
|
||||
}
|
||||
|
||||
|
||||
.tdmenu {
|
||||
font-size:13px;
|
||||
border:3px solid white;
|
||||
padding:0 2px;
|
||||
width:170px;
|
||||
height:20px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
.editnav {
|
||||
color: #000000;
|
||||
font-size: 1em;
|
||||
background-image: url(/img/linkpfeil.gif);
|
||||
background-position: 3px 5px;
|
||||
background-repeat: no-repeat;
|
||||
padding:1px 1px 1px 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.editnav_menu {
|
||||
position:absolute;
|
||||
z-index:2;
|
||||
color: #000000;
|
||||
font-size: 1em;
|
||||
background-image: url(/img/linkpfeil.gif);
|
||||
background-position: 3px 5px;
|
||||
background-repeat: no-repeat;
|
||||
padding:1px 1px 1px 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.elinkbutton {
|
||||
font-weight: normal;
|
||||
font-size: 0.91em;
|
||||
border: 1px solid silver;
|
||||
color: #000000;
|
||||
background-color: #eaeaea;
|
||||
text-decoration: none;
|
||||
padding:0.2em 0.5em;
|
||||
}
|
||||
.elinkbutton:hover { color: #000000;}
|
||||
|
||||
.elinkbutton1 {
|
||||
padding:0 0.1em;
|
||||
color:black;
|
||||
font-size: 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.elinkbutton1:hover { color:silver;}
|
||||
|
||||
|
||||
.elinkbutton2 {
|
||||
font-weight: normal;
|
||||
font-size: 0.91em;
|
||||
border: 1px solid white;
|
||||
color: #000000;
|
||||
background-image:url(/img/bg_main_bottom.gif);
|
||||
text-decoration: none;
|
||||
padding:0.1em 0.5em;
|
||||
}
|
||||
.elinkbutton2:link {color: #000000;}
|
||||
.elinkbutton2:visited { color: #000000;}
|
||||
.elinkbutton2:hover { color: #000000;}
|
||||
|
||||
.link {
|
||||
text-decoration: none;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.linknav {
|
||||
margin:0px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.linknav:hover { color:silver;}
|
||||
|
||||
.linknav1 {
|
||||
text-decoration: none;
|
||||
}
|
||||
.linknav1:hover { color:silver;}
|
||||
|
||||
.linknav5 {
|
||||
margin:0px;
|
||||
color:white;
|
||||
text-decoration: none;
|
||||
}
|
||||
.linknav5:hover { color:silver;}
|
||||
|
||||
|
||||
|
||||
.linknav2 {
|
||||
margin:2px;
|
||||
padding:1px 5px;
|
||||
border:1px solid gray;
|
||||
color:blue;
|
||||
background-color:white;
|
||||
background-image:url(http://www.copri.eu/img/bg_main_top.gif);
|
||||
font-size:12px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.linknav2:hover { color:silver;}
|
||||
|
||||
.linknav3 {
|
||||
position:static;
|
||||
float:left;
|
||||
color:black;
|
||||
margin-right:1px;
|
||||
padding:1px 3px;
|
||||
text-decoration: none;
|
||||
font-size:17px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.linknav4 {
|
||||
position:static;
|
||||
float:left;
|
||||
color:white;
|
||||
background-color:black;
|
||||
margin-right:0px;
|
||||
padding:0px 3px;
|
||||
text-decoration: none;
|
||||
font-size:17px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.headnav {
|
||||
color: #d0a6a6;
|
||||
background-color: gray;
|
||||
border: 0px solid red;
|
||||
text-decoration: none;
|
||||
font-size: 16px;
|
||||
}
|
||||
.headnav:hover { color: #DEC3A9;}
|
||||
|
||||
.headnav2 {color: #000000; text-decoration: none; font-size: 14px;}
|
||||
.headnav2:link {color: #000000;}
|
||||
.headnav2:visited { color: #000000;}
|
||||
.headnav2:hover { color: #DEC3A9;}
|
||||
|
||||
|
||||
.leftnav {margin:0px; color: #000000; text-decoration: none;}
|
||||
.leftnav:link {color: #000000;}
|
||||
.leftnav:visited { color: #000000;}
|
||||
.leftnav:hover { color:white;}
|
||||
|
||||
.leftnav1 {margin:0px; color:#000000; text-decoration: none;}
|
||||
.leftnav2 {margin:0px; color:#666666; text-decoration: none;}
|
||||
|
||||
div#Contenttxt {
|
||||
font-size: 14px;
|
||||
min-height:300px;
|
||||
padding-left:0px;
|
||||
border:0px solid silver;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div#ContentLogin {
|
||||
text-align:center;
|
||||
max-width:425px;
|
||||
width:100%;
|
||||
padding:20px;
|
||||
margin:10px 0;
|
||||
border: 0px solid #cccccc;
|
||||
}
|
||||
|
||||
div#Mlogic {
|
||||
display:none;
|
||||
}
|
||||
|
||||
div#fish {
|
||||
position:fixed;
|
||||
margin:0 auto;
|
||||
border:0px solid black;
|
||||
bottom:5px;
|
||||
left:30px;
|
||||
z-index:2;
|
||||
}
|
||||
div#bottom_text {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#pic-serial { display:inline; height:auto;width:100%;padding:0; }
|
||||
#pic-contact { display:inline; float:left; height:300px;padding:96px 14px 10px 0; }
|
||||
#pic-float { display:inline; float:left; height:188px;padding:15px 10px 0px 0px; }
|
||||
#pic-payment { height:40px;padding-left:10px; }
|
||||
|
||||
.title2 {
|
||||
font-weight:300;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.content_title2 {
|
||||
font-size:16px;
|
||||
}
|
||||
|
||||
.content_title3 {
|
||||
font-size:24px;
|
||||
padding-top:24px;
|
||||
}
|
||||
.content_title3teaser {
|
||||
font-weight:normal;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.content1 {
|
||||
font-size:18px;
|
||||
line-height:1.2;
|
||||
font-weight:bold;
|
||||
padding-bottom:7px;
|
||||
}
|
||||
.content12 {
|
||||
font-size:17px;
|
||||
line-height:1.2;
|
||||
font-weight:bold;
|
||||
padding-top:22px;
|
||||
}
|
||||
.content13 {
|
||||
font-size:16px;
|
||||
line-height:1.2;
|
||||
font-weight:bold;
|
||||
}
|
||||
.content2 {
|
||||
font-size:16px;
|
||||
line-height:1.2;
|
||||
padding-top:22px;
|
||||
max-width:750px;
|
||||
}
|
||||
.content2_legende {
|
||||
font-size:16px;
|
||||
line-height:2.0;
|
||||
max-width:750px;
|
||||
text-align:left;
|
||||
}
|
||||
.content23 {
|
||||
font-size:16px;
|
||||
line-height:1.2;
|
||||
padding-bottom:22px;
|
||||
max-width:750px;
|
||||
}
|
||||
.content2_contact {
|
||||
font-size:14px;
|
||||
line-height:1.5;
|
||||
max-width:750px;
|
||||
}
|
||||
.footer {
|
||||
font-size:11px;
|
||||
padding:15px 5%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px){
|
||||
|
||||
div#Contenttxt {
|
||||
border:0px solid silver;
|
||||
padding:0px;
|
||||
text-align: left;
|
||||
}
|
||||
.container_img {
|
||||
text-align:left;
|
||||
padding: 3% 0%;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding:10px 15px;
|
||||
}
|
||||
|
||||
.container_imgcontact {
|
||||
text-align:left;
|
||||
padding: 3% 3%;
|
||||
width:100%;
|
||||
}
|
||||
.content2_contact {
|
||||
text-align:left;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
div#Contenttxt1 {
|
||||
position:relative;
|
||||
margin:0;
|
||||
padding: 0 14px;
|
||||
width:100%;
|
||||
}
|
||||
div#Contenttxt2 {
|
||||
position:relative;
|
||||
margin:0;
|
||||
padding: 10px 15px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
div#fish {
|
||||
position:fixed;
|
||||
margin:5px 15px;
|
||||
border:0px solid black;
|
||||
bottom:3px;
|
||||
left:0px;
|
||||
z-index:0;
|
||||
}
|
||||
|
||||
div#fish img {
|
||||
width:35px;
|
||||
}
|
||||
div#bottom_text {
|
||||
position:fixed;
|
||||
display:inline;
|
||||
background-color:white;
|
||||
opacity:0.90;
|
||||
margin:0 auto;
|
||||
border:0px solid black;
|
||||
padding:3px 15px;
|
||||
bottom:0px;
|
||||
right:0px;
|
||||
z-index:5;
|
||||
}
|
||||
}
|
||||
|
||||
div#navtop {
|
||||
vertical-align:top;
|
||||
border: 0px solid white;
|
||||
}
|
||||
div#navtop a {
|
||||
color: white;
|
||||
margin: 0; padding: 10px 15px 0 7px;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
font-size:1.4em;
|
||||
}
|
||||
div#navtop a:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
div#navtop a:active {
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
div#navfoo {
|
||||
vertical-align:top;
|
||||
border: 0px solid white;
|
||||
}
|
||||
div#navfoo a {
|
||||
color: white;
|
||||
margin: 0; padding: 30px 15px 0 7px;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
font-size:1.4em;
|
||||
}
|
||||
div#navfoo a:hover {
|
||||
color: #cccccc;
|
||||
}
|
||||
div#navfoo a:active {
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
ul#Navi li#bold {
|
||||
color: black;
|
||||
font-size:14px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 1px 1px 1px 5px;
|
||||
}
|
||||
ul#Navi li#thin {
|
||||
color: white;
|
||||
font-size:14px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 1px 5px 1px 15px;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
div#Container_cms {
|
||||
font-size: 12px;
|
||||
border: 0px solid gray;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
min-width: 100%;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.tdescr2 {
|
||||
padding:1px 10px;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
width:130px;
|
||||
}
|
||||
.tdval2 {
|
||||
padding:1px 10px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.left_italic_cms {
|
||||
padding:5px;
|
||||
min-width:80px;
|
||||
max-width:100px;
|
||||
padding-right: 15px;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
font-style:italic;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
}
|
||||
|
||||
.content1_cms {
|
||||
padding:0 5px 5px 5px;
|
||||
min-width:100px;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
border-right: solid thin silver;
|
||||
border-bottom: solid thin silver;
|
||||
}
|
||||
.editnav {
|
||||
color:black;
|
||||
background-color:silver;
|
||||
background-image: url(/img/linkpfeil.gif);
|
||||
background-position: 3px 6px;
|
||||
background-repeat: no-repeat;
|
||||
padding:1px 10px 1px 17px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.editnav:hover {
|
||||
color:black;
|
||||
background-color:#f0f1da;
|
||||
}
|
||||
|
||||
//-->
|
||||
|
||||
|
1
copri4/shareeapp-operator/csv
Symbolic link
1
copri4/shareeapp-operator/csv
Symbolic link
|
@ -0,0 +1 @@
|
|||
../shareedms-operator/csv
|
1
copri4/shareeapp-operator/glyphicons
Symbolic link
1
copri4/shareeapp-operator/glyphicons
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/glyphicons
|
1
copri4/shareeapp-operator/img
Symbolic link
1
copri4/shareeapp-operator/img
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/img
|
1
copri4/shareeapp-operator/js
Symbolic link
1
copri4/shareeapp-operator/js
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/js
|
1
copri4/shareeapp-operator/pdfinvoice
Symbolic link
1
copri4/shareeapp-operator/pdfinvoice
Symbolic link
|
@ -0,0 +1 @@
|
|||
../shareedms-operator/pdfinvoice
|
2
copri4/shareeapp-operator/robots.txt
Executable file
2
copri4/shareeapp-operator/robots.txt
Executable file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow: /
|
1
copri4/shareeapp-operator/site
Symbolic link
1
copri4/shareeapp-operator/site
Symbolic link
|
@ -0,0 +1 @@
|
|||
../shareedms-operator/site
|
77
copri4/shareeapp-operator/src/Lib/Config.pm
Normal file
77
copri4/shareeapp-operator/src/Lib/Config.pm
Normal file
|
@ -0,0 +1,77 @@
|
|||
package Config;
|
||||
|
||||
#Deprecated config file
|
||||
#Please use shareeconf/*
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI;
|
||||
use Config::General;
|
||||
my $q = new CGI;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
||||
sub envonline(){
|
||||
my $self = shift;
|
||||
|
||||
my $globalconf_file = "/var/www/copri4/shareeconf/global.cfg";
|
||||
my $conf = Config::General->new($globalconf_file);
|
||||
my %globalconf = $conf->getall;
|
||||
|
||||
my $basedir = "$globalconf{copri_conf}->{basedir}/$globalconf{operator}{sharee_operator}->{dir_app}";
|
||||
my $metahost = $globalconf{operator}{sharee_operator}->{operatorApp1};
|
||||
my %varenv = (
|
||||
dbname => $globalconf{operator}{sharee_operator}{database}->{dbname},
|
||||
dbuser => $globalconf{operator}{sharee_operator}{database}->{user},
|
||||
dbpassw => $globalconf{operator}{sharee_operator}{database}->{passwd},
|
||||
dbhost => $globalconf{operator}{sharee_operator}{database}->{host},
|
||||
syshost => $globalconf{operator}{sharee_operator}->{dir_app},
|
||||
wwwhost => $globalconf{operator}{sharee_operator}->{operatorApp},
|
||||
praefix => $globalconf{operator}{sharee_operator}{database}->{dbname},
|
||||
systype => "sharee",#(azn)
|
||||
mandant => $globalconf{shareeapp_conf}->{parent_node},
|
||||
start => $globalconf{shareeapp_conf}->{start},
|
||||
profile => $globalconf{shareeapp_conf}->{profile},
|
||||
accounting_1 => $globalconf{shareeapp_conf}->{accounting_1},
|
||||
accounting_1_5 => $globalconf{shareeapp_conf}->{accounting_1_5},
|
||||
accounting_2 => $globalconf{shareeapp_conf}->{accounting_2},
|
||||
accounting_3 => $globalconf{shareeapp_conf}->{accounting_3},
|
||||
|
||||
superu_id => $globalconf{copri_conf}->{superu_id},
|
||||
debug => $globalconf{copri_conf}->{debug},
|
||||
logdir => $globalconf{copri_conf}->{logdir},
|
||||
live_hostname => $globalconf{primary}{sharee_primary}->{live_hostname},
|
||||
metahost=>"$metahost",
|
||||
orga => "",
|
||||
style_font => "$metahost/img/OfficinaSansITCStd-Book.otf",
|
||||
font_family => "OfficinaSansITCStd-Book,Arial",
|
||||
background_image => "",
|
||||
background_size => "cover",
|
||||
background_color => "white",
|
||||
background_color2 => "#c7c8ca",
|
||||
background_align => "center",
|
||||
background_repeat => "no-repeat",
|
||||
font_size => "100.01%",
|
||||
line_height => "1",
|
||||
basedir => "$basedir",
|
||||
pdf => "$basedir/pdf",
|
||||
pdfinvoice => "$basedir/pdfinvoice",
|
||||
data => "$basedir/data",
|
||||
xmlfile => "$basedir/xml",
|
||||
ftp_getfile => "ftp/SWK_codes/got_last.csv",
|
||||
ftp_putfile => "ftp/SWK_return/konrad_code_protokoll.csv",
|
||||
head_logo => "",
|
||||
barcode => "",
|
||||
printer => "PDF"
|
||||
);
|
||||
return %varenv;
|
||||
}
|
||||
|
||||
1;
|
||||
|
100
copri4/shareeapp-operator/src/Lib/Mlogic.pm
Normal file
100
copri4/shareeapp-operator/src/Lib/Mlogic.pm
Normal file
|
@ -0,0 +1,100 @@
|
|||
package Mlogic;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
use CGI ':standard';
|
||||
use Mod::DBtank;
|
||||
|
||||
use Data::Dumper;
|
||||
my $q = new CGI;
|
||||
my $dbt = new DBtank;
|
||||
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $self = shift;
|
||||
my ($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return) = @_;
|
||||
|
||||
my $session="";
|
||||
my $session_and="";
|
||||
if($R::sessionid && length($R::sessionid) > 20 && !$q->cookie(-name=>'domcookie')){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
$session_and = "&sessionid=$R::sessionid";
|
||||
}
|
||||
my $bgcolor1 = $dbt->{primary}->{$varenv->{dbname}}->{bgcolor1};
|
||||
|
||||
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') || "";
|
||||
print $q->div({-style=>'text-align:right;height:25px;padding:6px 15px 6px 0px;background-color:white'},$q->a({-style=>"color:#$bgcolor1;", -href=>"$varenv->{metahost}/src/scripts/tests/index.pl?sessionid=$coo", -target=>'_blank'}," [ booking-test ] "),"$users_sharee->{txt08}",$q->a({-style=>"color:#$bgcolor1;", -href=>"logout_sharee$session"},"logout")),"\n";
|
||||
}
|
||||
|
||||
print "<div class='container'>\n";
|
||||
print "<div id='Contenttxt' style='margin-top:20px;padding-bottom:350px;'>\n";
|
||||
$self->tplselect($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
print "</div>\n";
|
||||
print "</div>\n";
|
||||
#print "<script src='$varenv->{js_bootstrap}'></script>\n";
|
||||
|
||||
}
|
||||
|
||||
#2021-05-05 changed to Mlogic
|
||||
sub tplselect(){
|
||||
my $self = shift;
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $u_id = $users_dms->{u_id} || "";
|
||||
my $sort = "";
|
||||
my $lang = "de";
|
||||
my $tpl_id = $node_meta->{tpl_id};
|
||||
|
||||
if($node_meta->{main_id}){
|
||||
if($tpl_id == 2){
|
||||
require "Tpl/Anmelden.pm";
|
||||
&Anmelden::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
|
||||
}elsif($tpl_id == 302 || $tpl_id == 302008 || $tpl_id == 302004){#Adresse
|
||||
require "Tpl/FormEdit.pm";
|
||||
&FormEdit::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
}elsif($tpl_id == 308){
|
||||
require "Tpl/PayoneSelect.pm";
|
||||
&PayoneSelect::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
}elsif($tpl_id == 197){
|
||||
require "Tpl/Contact.pm";
|
||||
&Contact::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
}elsif($tpl_id == 1 || $tpl_id == 3){
|
||||
require "Tpl/Listing.pm";
|
||||
&Listing::tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
|
||||
#require "Tpl/ModalboxDialog.pm";
|
||||
#&ModalboxDialog::mobox2($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
|
||||
}
|
||||
}
|
||||
my $debug = "Mlogic --> (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"),"\n" if($users_sharee->{c_id} eq $varenv->{superu_id});
|
||||
|
||||
if($return && $return =~ /failure/){
|
||||
require "Mod/Failure.pm";
|
||||
&Failure::tpl("",$u_id,"","","","",$return);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
1
copri4/shareeapp-operator/src/Lib/PDFGenerator.pm
Symbolic link
1
copri4/shareeapp-operator/src/Lib/PDFGenerator.pm
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../main/src/Lib/PDFGenerator.pm
|
1
copri4/shareeapp-operator/src/Lib/Printpreview.pm
Symbolic link
1
copri4/shareeapp-operator/src/Lib/Printpreview.pm
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../main/src/Lib/Printpreview.pm
|
1
copri4/shareeapp-operator/src/Mod
Symbolic link
1
copri4/shareeapp-operator/src/Mod
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/Mod
|
165
copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm
Normal file
165
copri4/shareeapp-operator/src/Tpl/AccountSubmenu.pm
Normal file
|
@ -0,0 +1,165 @@
|
|||
package AccountSubmenu;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $self = shift;
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $but = new Buttons;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
|
||||
my $lang = "de";
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
|
||||
my $session="";
|
||||
if($R::sessionid && length($R::sessionid) > 20){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
}
|
||||
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
|
||||
#my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid || "";
|
||||
my $coo = $R::authcookie || $R::sessionid || "";
|
||||
#my $merchant_id = "";
|
||||
#$merchant_id = $coo if($coo && length($coo) <= 10);
|
||||
#$merchant_id = $1 if($coo =~ /_(\w+)$/);
|
||||
|
||||
my $bgcolor1 = "009899";#sharee
|
||||
#my $bgcolor1 = "e2001a";
|
||||
|
||||
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1});
|
||||
|
||||
#$bgcolor1 = $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1} if($merchant_id && $dbt->{merchant_ids}->{$merchant_id}->{bgcolor1});
|
||||
$bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1});
|
||||
|
||||
#payable check
|
||||
my $payable_check=0;
|
||||
if(($users_sharee->{int03} == 1 && $users_sharee->{ct_name} =~ /\w{2}-\d+/) || ($users_sharee->{int03} == 2 && length($users_sharee->{ct_name}) >= 19)){
|
||||
$payable_check=1;
|
||||
}
|
||||
my $node1 = $db->collect_node($node_meta->{parent_id},$lang,"1");
|
||||
|
||||
#if(!$R::confirm_success){
|
||||
if(1==1){
|
||||
|
||||
#subMenue--------
|
||||
print "<style>
|
||||
ul#AccNavi {
|
||||
position:relative;
|
||||
display:flex;
|
||||
margin-left: -40px;
|
||||
}
|
||||
ul#AccNavi li {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
margin-right:20px;
|
||||
}
|
||||
ul#AccNavi li a {
|
||||
display:flex;
|
||||
text-align:center;
|
||||
align-itmes;center;
|
||||
justify-content:center;
|
||||
transition: all 0.3s ease;
|
||||
margin: 0;
|
||||
padding: 1em;
|
||||
height: 50px;
|
||||
background-color: #$bgcolor1;
|
||||
font-family:Arial,sans-serif;
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: white;
|
||||
}
|
||||
ul#AccNavi a:hover {
|
||||
color: black;
|
||||
background-color: white;
|
||||
}
|
||||
ul#AccNavi a:active {
|
||||
color: white;
|
||||
background-color: gray;
|
||||
}
|
||||
</style>\n";
|
||||
|
||||
#print "<div style='margin-top:40px;'>\n";
|
||||
print "<ul id='AccNavi'>\n";
|
||||
foreach my $id1 (sort {$node1->{$a}->{n_sort} <=> $node1->{$b}->{n_sort}} keys (%$node1)){
|
||||
#Creditcard test switch for payone (tinkwwp)
|
||||
if($users_sharee->{c_id} && ($path =~ /$varenv->{mandant}\/$varenv->{profile}/ || $path =~ /$varenv->{mandant}\/Account/)){
|
||||
my $mstyle_1="";
|
||||
my $mstyle_1_5="";
|
||||
my $mstyle_2="";
|
||||
my $mstyle_3="";
|
||||
|
||||
if($node_meta->{main_id} == $node1->{$id1}->{main_id}){
|
||||
$mstyle_1 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1}");
|
||||
$mstyle_1_5 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_1_5}");
|
||||
$mstyle_2 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_2}");
|
||||
$mstyle_3 .= "background-color: silver;" if("$node1->{$id1}->{node_name}" eq "$varenv->{accounting_3}");
|
||||
|
||||
#Konrad & TINK & sharee AGB
|
||||
if(!$users_sharee->{int14} && !$users_sharee->{int15} && !$users_sharee->{txt30}){
|
||||
print $q->li($q->a({-style=>"$mstyle_1",-title=>"$node1->{$id1}->{node_name}", -href=>"/$viewsel[0]/Account/$node1->{$id1}->{node_name}$session"}, "$node1->{$id1}->{node_name}")),"\n";
|
||||
}
|
||||
elsif(!$users_sharee->{int03}){
|
||||
print $q->li($q->a({-style=>"$mstyle_1",-title=>"$varenv->{accounting_1}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-265-vcard.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_1_5",-title=>"$varenv->{accounting_1_5}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1_5}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-268-credit-card.png"}))),"\n";
|
||||
}
|
||||
#elsif($payable_check && $users_sharee->{int04}){
|
||||
elsif($payable_check){
|
||||
print $q->li($q->a({-style=>"$mstyle_1",-title=>"$varenv->{accounting_1}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-265-vcard.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_1_5",-title=>"$varenv->{accounting_1_5}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1_5}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-268-credit-card.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_2",-title=>"$varenv->{accounting_2}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_2}$session"},$q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-326-wallet.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_3",-title=>"$varenv->{accounting_3}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_3}$session"},$q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-530-list-alt.png"}))),"\n";
|
||||
}
|
||||
else{
|
||||
print $q->li($q->a({-style=>"$mstyle_1",-title=>"$varenv->{accounting_1}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-265-vcard.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_1_5",-title=>"$varenv->{accounting_1_5}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_1_5}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-268-credit-card.png"}))),"\n";
|
||||
print $q->li($q->a({-style=>"$mstyle_2",-title=>"$varenv->{accounting_2}", -href=>"/$viewsel[0]/Account/$varenv->{accounting_2}$session"}, $q->img({-src=>"$varenv->{metahost}/glyphicons/glyphicons-326-wallet.png"}))),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
print "</ul>\n";
|
||||
#print "</div>\n";
|
||||
#-----------------
|
||||
}
|
||||
print $q->div({-style=>'position:fixed;bottom:4%;right:2%;z-index:10;font-size:13px;'},"--> $varenv->{syshost} | $varenv->{merchant_id} | $bgcolor1 | template -> $node_meta->{tpl_name} | $users_sharee->{c_id}"),"\n" if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test");
|
||||
}
|
||||
1;
|
164
copri4/shareeapp-operator/src/Tpl/Anmelden.pm
Normal file
164
copri4/shareeapp-operator/src/Tpl/Anmelden.pm
Normal file
|
@ -0,0 +1,164 @@
|
|||
package Anmelden;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
use Mod::Pricing;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
my $but = new Buttons;
|
||||
my $pri = new Pricing;
|
||||
|
||||
my $script = $q->script_name();
|
||||
my $user_agent = $q->user_agent();
|
||||
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
my $clientIP = $q->remote_addr();
|
||||
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my %ib = $but->ibuttons_arch();
|
||||
my $tpl = $db->get_tpl($node_meta->{tpl_id});
|
||||
my @tpl_order = split /,/,$tpl->{tpl_order};
|
||||
my $coo = $q->cookie(-name=>'domcookie') || "";
|
||||
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
my $bgcolor1 = "009899";#sharee
|
||||
#my $bgcolor1 = "e2001a";
|
||||
|
||||
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1});
|
||||
$bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1});
|
||||
|
||||
print "<div id='ContentLogin'>\n";
|
||||
|
||||
if($viewsel[1] eq "Account"){
|
||||
if($R::sharee_edit =~ /delete_account/){
|
||||
my $dummy;
|
||||
}elsif($R::sharee_edit =~ /password_forgotten/){
|
||||
print $q->div({-class=>'content2'}, "Es wurde eine Nachricht mit zurueckgesetzten Passwort an <b>$R::email</b> gesendet. Ersetzen Sie bitte das gesendete Passwort durch ein individuelles. Das neue Passwort muss min. 8 Zeichen mit 2 Zeichen ausserhalb des Alphabets beinhalten."),"\n";
|
||||
}
|
||||
}
|
||||
|
||||
print $q->start_multipart_form(-id=>'authform', -name=>'loginscreen'),"\n";
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid") if($R::sessionid);
|
||||
print $q->hidden(-name=>"clientIP",-override=>1,-value=>"$clientIP");
|
||||
|
||||
print "<div class='form-group'>\n";
|
||||
|
||||
if($users_sharee->{c_id} && !$users_sharee->{int04} && $R::sharee_edit !~ /delete_account/){
|
||||
print $q->div({-class=>'content1',-style=>'padding-top:1em;'}, "E-Mail Bestätigung"),"\n";
|
||||
print $q->div({-class=>'content2'}, "Wir haben eine Nachricht an Ihre angegebene E-Mail Adresse versandt. Nach erfolgreicher Bestätigung können Sie unser Mietradsystem nutzen."),"\n";
|
||||
print $q->div({-class=>'content2'},$q->a({-href=>"$varenv->{wwwhost}?sharee_edit=send_email"},"Senden wiederholen")),"\n";
|
||||
|
||||
#Account löschen
|
||||
}elsif($viewsel[1] eq "Account" && $R::sharee_edit =~ /delete_account/){
|
||||
if($R::sharee_edit eq "delete_account1" && $users_sharee->{c_id}){
|
||||
#
|
||||
my ($ctpos,$operator_hash) = $apif->user_rentals_history($q,$users_sharee);
|
||||
my $ctpos_count = 0;
|
||||
my $sum = 0;
|
||||
foreach my $id (keys(%$ctpos)){
|
||||
$ctpos_count++;
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
($gesamt,$rabatt) = $pri->price2calc($ctpos->{$id});
|
||||
$sum += $gesamt;
|
||||
}
|
||||
$sum = $lb->round($sum);
|
||||
if($ctpos_count > 0 && $sum > 0){
|
||||
print $q->div({-class=>'content2'}, "Ihr Konto ist nicht ausgeglichen ($sum). Bitte kontaktieren Sie uns damit wir Ihre Rechnungstellung beschleunigen. Anschließend können Sie Ihren Account löschen. Danke für Ihr Verständnis"),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;'},$q->a({-class=>"btn btn-primary btn-lg btn-block",-href=>'javascript:history.back()'}, "zurück")),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2'}, "Wollen Sie wirklich Ihre Daten löschen?"),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='sharee_edit' value='delete_account2' class='btn btn-primary btn-lg btn-block'>Ja</button>"),"\n";
|
||||
}
|
||||
}elsif($R::sharee_edit eq "delete_account2" && $users_sharee->{c_id}){
|
||||
my $rows = 0;
|
||||
$rows = $dbt->update_operatorsloop($varenv->{dbname},$users_sharee->{c_id},"delete");#only operator
|
||||
$rows += $dbt->delete_content("","contentadr",$users_sharee->{c_id});#final delete on primary
|
||||
if($rows >= 1){
|
||||
print $q->div({-class=>'content2'}, "Ihr Zugang wurde gelöscht.<br />Auf Wiedersehen."),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2'}, "Anscheinend ist hier etwas schief gelaufen.<br />Bitte kontaktieren Sie uns damit wir das Problem lösen können."),"\n";
|
||||
}
|
||||
}
|
||||
#Passwort senden
|
||||
}elsif($viewsel[1] eq "Account" && !$R::password_forgotten){
|
||||
print $q->div({-class=>'content2'}, "Wir benötigen dazu Ihre registrierte E-Mail Adresse."),"\n";
|
||||
print $q->label({-for=>'Email'},""),"\n";
|
||||
print $q->textfield(-class=>'form-control', -name=>'email', -value=>'', -override=>1, -type=>'email',-class=>'form-control', -id=>'Email', -placeholder=>'E-Mail Adresse', -required=>1, -autofocus=>1),"\n";
|
||||
|
||||
print $q->hidden(-name=>'password_forgotten',-value=>"1");
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='sharee_edit' value='password_forgotten' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>Passwort E-Mail senden</button>"),"\n";
|
||||
|
||||
#Login
|
||||
}elsif(!$R::password_forgotten){
|
||||
if($R::conflict_failure){
|
||||
print $q->div({-class=>'content2',-style=>'color:#c83434'},"Registrierungsfehler!"),"\n";
|
||||
print $q->div({-class=>'content2'}, "Die Registrierung wurde abgebrochen weil bereits ein Account mit Ihrer e-Mail oder Telefonnr. existiert. Bitte kontaktieren Sie uns falls hier ein Missbrauch vorliegt. Falls Sie ein neues Passwort benötigen drücken Sie bitte:"),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;'},$q->a({-class=>"", -style=>"color:#$bgcolor1;font-size:1.1em;text-decoration:underline;", -role=>"button", -href=>"$varenv->{wwwhost}/$varenv->{mandant}/Account"}, "Passwort vergessen?")),"\n";
|
||||
}
|
||||
print $q->div({-class=>'content2'}, "Dein Zugang zum Lastenradmietsystem"),"\n";
|
||||
print $q->div({-style=>'color:#c83434'},"Login verweigert. ",$q->a({-class=>"", -style=>"color:gray;", -role=>"button", -href=>"$varenv->{wwwhost}/$varenv->{mandant}/Account"}, "Passwort vergessen?")),"\n" if($R::failure);
|
||||
print $q->div({-style=>'color:#c83434'},"Login verweigert. "),"\n" if($R::basicauthfailure);
|
||||
print $q->label({-for=>'Email'},""),"\n";
|
||||
print $q->textfield(-class=>'form-control', -name=>'user_id', -value=>'', -override=>1, -type=>'email',-class=>'form-control', -id=>'Email', -placeholder=>'E-Mail Adresse', -required=>1, -autofocus=>1),"\n";
|
||||
|
||||
print $q->label({-for=>'PW'},""),"\n";
|
||||
print $q->password_field(-class=>'form-control', -name=>'user_pw', -value=>'', -override=>1, -type=>'password',-class=>'form-control', -id=>'txt04', -placeholder=>'Passwort', -required=>1),"\n";
|
||||
print $q->div({-style=>'text-align:left;color:grey;'}, "<input type='checkbox' onclick='show_passwd()'>", "Passwort anzeigen"),"\n";
|
||||
|
||||
|
||||
#js auth
|
||||
# print $q->div({-style=>'margin-top:1em;'},"<div type='text' onClick='javascript:request_apiauth(\"$varenv->{wwwhost}\",\"/$varenv->{mandant}/$varenv->{profile}\")' name='login_sharee' value='Login' class='btn btn-primary btn-lg btn-block'>Anmelden</div>"),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='login_sharee' value='Login' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>Anmelden</button>"),"\n";
|
||||
|
||||
print $q->div({-style=>'margin-top:1em;'},$q->a({-class=>"btn btn-default btn-lg btn-block", -style=>"color:#$bgcolor1;", -role=>"button", -href=>"$varenv->{wwwhost}/$varenv->{mandant}/Account/$varenv->{accounting_1}"}, "Registrieren")),"\n";
|
||||
print $q->div({-class=>'content2'}, "Zur Information! Falls Sie bereits einen \"konrad\" oder \"TINK\" Account besitzen, können Sie mit Ihren bestehendem Account die Nutzung beider Mietradsysteme einstellen! Einfach dazu die entsprechende AGB bestätigen."),"\n" if($varenv->{wwwhost} =~ /tink|konrad/);
|
||||
|
||||
print $q->div({-style=>'margin-top:1em;'},$q->a({-class=>"", -style=>"color:#$bgcolor1;font-size:1.1em;text-decoration:underline;", -role=>"button", -href=>"$varenv->{wwwhost}/$varenv->{mandant}/Account"}, "Passwort vergessen?")),"\n";
|
||||
|
||||
}
|
||||
print "</div>\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 | $node_meta->{tpl_name} | $users_sharee->{c_id}"),"\n" if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test");
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
1;
|
123
copri4/shareeapp-operator/src/Tpl/Contact.pm
Normal file
123
copri4/shareeapp-operator/src/Tpl/Contact.pm
Normal file
|
@ -0,0 +1,123 @@
|
|||
package Contact;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Encode;
|
||||
use Data::Dumper;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $but = new Buttons;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
|
||||
my $lang = "de";
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if($varenv->{metahost}){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $user_agent = $q->user_agent();
|
||||
my %ib = $but->ibuttons_arch();
|
||||
my @tpl_order = split /,/,$node_meta->{tpl_order};
|
||||
my $main_ids = $node_meta->{main_id};
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
|
||||
my $session="";
|
||||
my $session_and="";
|
||||
if(length($R::sessionid) > 20){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
$session_and = "&sessionid=$R::sessionid";
|
||||
}
|
||||
|
||||
my $project = "all";
|
||||
$project = "Bayern" if($varenv->{syshost} eq "shareeweb-bayern");
|
||||
$project = "Konstanz" if($varenv->{syshost} eq "shareeweb-konstanz");
|
||||
|
||||
my $sort_updown = "up";
|
||||
my $content2 = "content2_contact";
|
||||
my $content_img = "pic-contact";
|
||||
my $record_cc = { c_id => 0 };
|
||||
my $pref_cc = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
template_id => "197",
|
||||
c_id => 1,
|
||||
};
|
||||
|
||||
|
||||
print "<div id='Contentapp'>\n";
|
||||
print $q->div({-class=>"$content2"},"Bei Fragen und Problemen bitte den örtlichen Betreiber kontaktieren"),"\n";
|
||||
|
||||
#BIG LOOP content table
|
||||
#while (my ($mandant_conf, $value) = each %{ $dbt->{operator} }) {
|
||||
foreach my $m_id (sort { $dbt->{operator}->{$b}->{oprefix} cmp $dbt->{operator}->{$a}->{oprefix} } keys(%{ $dbt->{operator} })) {
|
||||
if($dbt->{operator}->{$m_id}->{project} eq $project || $project eq "all"){
|
||||
print $q->div({-class=>"$content2"}," "),"\n";
|
||||
|
||||
my $sharee_operator = $dbt->{operator}->{$m_id}->{database}->{dbname};
|
||||
my $dbh_operator = $dbt->dbconnect_extern($sharee_operator);
|
||||
$record_cc = $dbt->fetch_record($dbh_operator,$pref_cc);
|
||||
#print Dumper($node_meta->{tpl_order}) . "<br />\n";
|
||||
|
||||
foreach (@tpl_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
$record_cc->{$key} = $q->unescapeHTML("$record_cc->{$key}");
|
||||
$record_cc->{$key} = $lb->newline($record_cc->{$key},"","");
|
||||
|
||||
if($key =~ /ct_name/){
|
||||
print $q->div({-id=>"$record_cc->{c_id}",-class=>'content_title2'},"• $record_cc->{$key}"),"\n";
|
||||
}elsif($key =~ /txt|int/ && $record_cc->{$key} && $key !~ /txt85/){
|
||||
#phone tag
|
||||
if($record_cc->{$key} =~ /\d+$/ && $des =~ /hotline|Telefon|phone/i){
|
||||
$record_cc->{$key} =~ s/([\s0-9-\/]+)/\<a href=\'tel:00$1\'\>$1\<\/a\>/;
|
||||
}
|
||||
#email tag with little coding against grabber
|
||||
if($record_cc->{$key} =~ /(\w+\@[\w-]+\.\w+)/){
|
||||
$record_cc->{$key} =~ s/(\w+\@[\w-]+\.\w+)/\<a href=\'mailto:$1\'\>$1\<\/a\>/;
|
||||
$record_cc->{$key} =~ s/\@/\&\#64\;/g;
|
||||
}
|
||||
$record_cc->{$key} =~ s/\\//g;
|
||||
if($des =~ /hotline|e-Mail|zeiten/i){
|
||||
print $q->div({-class=>"$content2"}, "$des: $record_cc->{$key}"),"\n";
|
||||
print $q->div({-class=>"$content2"}," "),"\n" if($des =~ /e-Mail/i);
|
||||
}else{
|
||||
print $q->div({-class=>"$content2"}, "$record_cc->{$key}"),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}#end if
|
||||
}
|
||||
print "</div>\n";
|
||||
}
|
||||
1;
|
633
copri4/shareeapp-operator/src/Tpl/FormEdit.pm
Normal file
633
copri4/shareeapp-operator/src/Tpl/FormEdit.pm
Normal file
|
@ -0,0 +1,633 @@
|
|||
package FormEdit;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI ':standard';
|
||||
use DateTime;
|
||||
use DateTime::Format::Pg;
|
||||
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
use Mod::Pricing;
|
||||
use Tpl::AccountSubmenu;
|
||||
use Data::Dumper;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
my $pri = new Pricing;
|
||||
my $but = new Buttons;
|
||||
my $submenu = new AccountSubmenu;
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $dbh = "";#$dbt->dbconnect();
|
||||
my $user_agent = $q->user_agent();
|
||||
my %ib = $but->ibuttons_arch();
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
my $red = "red";
|
||||
|
||||
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
|
||||
my $session="";
|
||||
my $session_and="";
|
||||
if($R::sessionid && length($R::sessionid) > 20 && !$q->cookie(-name=>'domcookie')){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
$session_and = "&sessionid=$R::sessionid";
|
||||
}
|
||||
|
||||
my $bgcolor1 = "009899";#sharee
|
||||
#my $bgcolor1 = "e2001a";
|
||||
|
||||
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1});
|
||||
$bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1});
|
||||
|
||||
|
||||
my $ctrel = {};
|
||||
$ctrel = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
|
||||
#
|
||||
#collect rentals on operators and get operator hash with dbname->uri_operator
|
||||
#$q->param(-name=>'month',-value=>"18");#disabled because changing to not invoiced positions
|
||||
my ($ctpos,$operator_hash) = $apif->user_rentals_history($q,$ctrel);
|
||||
#print Dumper($ctpos);
|
||||
|
||||
my $ctpos_count=0;
|
||||
foreach my $id (keys(%$ctpos)){
|
||||
$ctpos_count++;
|
||||
}
|
||||
|
||||
my $ctt_all = {};
|
||||
#$ctt = $db->collect_content2("contenttrans","int10",$ctrel->{c_id}) if($ctrel->{c_id});
|
||||
#
|
||||
#loop operator hash to get invoices for each operator
|
||||
foreach my $sharee_operator (keys (%$operator_hash)){
|
||||
my $dbh_operator = $dbt->dbconnect_extern("$sharee_operator");
|
||||
my $pref = {
|
||||
table => "contenttrans",
|
||||
fetch => "all",
|
||||
int10 => "$ctrel->{c_id}",
|
||||
keyfield => "c_id",
|
||||
};
|
||||
|
||||
if($ctrel->{c_id}){
|
||||
my $ctt = $dbt->fetch_tablerecord($dbh_operator,$pref);
|
||||
foreach my $id (keys(%$ctt)){
|
||||
$ctt->{$id}->{wwwhost} = "$operator_hash->{$sharee_operator}";
|
||||
$ctt->{$id}->{praefix} = "$sharee_operator";
|
||||
#print "$ctt->{$id}->{praefix}|";
|
||||
}
|
||||
$ctt_all = { %$ctt_all, %$ctt };
|
||||
}
|
||||
}
|
||||
|
||||
my $tpl_id = $node_meta->{tpl_id};
|
||||
#$tpl_id = "302004" if($viewsel[1] =~ /Mieten/ && $ctrel->{c_id});
|
||||
my $tpl = $db->get_tpl($tpl_id);
|
||||
my $tpl01 = $tpl;#If nothing else, because of tpl_name Title in split_lates
|
||||
my $tpl02 = "";
|
||||
my @split_lates = ("$tpl->{tpl_order}");
|
||||
my $template01 = "$tpl_id" . "001";
|
||||
my $template02 = "$tpl_id" . "002";
|
||||
if($tpl_id < 999){
|
||||
$tpl01 = $db->get_tpl($template01);
|
||||
$tpl02 = $db->get_tpl($template02);
|
||||
@split_lates = ("$tpl01->{tpl_order}","$tpl02->{tpl_order}");
|
||||
}
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;
|
||||
my $start_date = strftime "%d.%m.%Y %H:%M", localtime;
|
||||
|
||||
my ($end_date,$end_time) = split(/ /,$now_dt);
|
||||
my ($e_yy,$e_mo,$e_dd) = split(/-/,$end_date);
|
||||
my ($e_hh,$e_mi) = split(/\:/,$end_time);
|
||||
|
||||
my $radID = $R::radID || "";
|
||||
|
||||
my $tink_agb_text;
|
||||
$tink_agb_text = $db->get_content("2351","");
|
||||
$tink_agb_text->{txt01} = $q->unescapeHTML($tink_agb_text->{txt01});
|
||||
$tink_agb_text->{txt01} = $lb->newline($tink_agb_text->{txt01},"","0");
|
||||
|
||||
my $konrad_agb_text;
|
||||
$konrad_agb_text = $db->get_content("3446","");
|
||||
$konrad_agb_text->{txt01} = $q->unescapeHTML($konrad_agb_text->{txt01});
|
||||
$konrad_agb_text->{txt01} = $lb->newline($konrad_agb_text->{txt01},"","0");
|
||||
|
||||
#TODO get and edit sharee AGB from Tarif content
|
||||
my $sharee_agb_text;
|
||||
$sharee_agb_text->{ct_name} = "AGB";
|
||||
$sharee_agb_text->{txt01} = "<iframe src='$varenv->{wwwhost}/site/agb.html' style='width:100%;height:10000px;border:none;' scrolling='auto'></iframe>";
|
||||
|
||||
|
||||
print "<div id='Contentapp'>\n";
|
||||
|
||||
print <<EOF
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="sharee_agb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="text-default"><h4>$sharee_agb_text->{ct_name}</h4>$sharee_agb_text->{txt01}</div>
|
||||
</div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="text-decoration:underline;">AGB schließen</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
EOF
|
||||
;
|
||||
|
||||
my $debug=0;
|
||||
$debug=1 if($users_sharee->{c_id} eq $dbt->{copri_conf}->{superu_id} || $dbt->{copri_conf}->{stage} eq "test");
|
||||
my $debug_message = "";
|
||||
|
||||
my $payable_check=0;
|
||||
if(($ctrel->{int03} == 1 && $ctrel->{ct_name} =~ /\w{2}-\d+/) || ($ctrel->{int03} == 2 && length($ctrel->{ct_name}) >= 19)){
|
||||
$payable_check=1;
|
||||
}
|
||||
|
||||
#subMenue--------
|
||||
$submenu->tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
#-----------------
|
||||
|
||||
my $catch_failure=0;
|
||||
if(($R::failure && $R::failure =~ /\w+/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /\w/)){
|
||||
$debug_message = "($R::failure || $ctrel->{txt31})" if($debug);
|
||||
$catch_failure=1;
|
||||
print $q->div({-class=>'content2', -style=>"clear:both;color:$red"}, "* Es liegt noch mindestens ein Fehler vor. $debug_message"),"\n";
|
||||
}
|
||||
|
||||
#confirm code manage
|
||||
if($catch_failure && (!$ctrel->{int04} && !$ctrel->{int13}) && ($tpl_id =~ /^2$|302004/) && ($path =~ /$varenv->{accounting_3}/)){
|
||||
$debug_message = "$catch_failure && (!$ctrel->{int04} || !$ctrel->{int13}) && $tpl_id" if($debug);
|
||||
print $q->div({-class=>'content2'}, "Erst nachdem Ihre Profildaten vollständig sind erhalten Sie die Bestätigung. $debug_message"),"\n";
|
||||
}elsif((!$ctrel->{int04} || !$ctrel->{int13}) && ($tpl_id =~ /^2$|302004/) && ($path =~ /$varenv->{accounting_3}/)){
|
||||
if(1==1){
|
||||
$debug_message = "(!$ctrel->{int04} || !$ctrel->{int13}) && $tpl_id" if($debug);
|
||||
print $q->div({-class=>'content_title3',-style=>'clear:both;'}, "Fasst geschafft $debug_message"),"\n";
|
||||
print $q->div({-class=>'content2'}, "Es wurden Bestätigungs-Codes an Ihre e-Mail Adresse und per SMS an Ihre Telefonnr. versandt. Nach erfolgreicher Bestätigung können Sie unsere Mieträder nutzen. Bitte beachten Sie die Anweisungen."),"\n";
|
||||
#}else{
|
||||
#print $q->div({-class=>'content1',-style=>'padding-top:1em;clear:both;'}, "E-Mail Bestätigung"),"\n";
|
||||
#print $q->div({-class=>'content2'}, "Wir haben einen Bestätigungscode an Ihre angegebene e-Mail Adresse versandt. Nach erfolgreicher Bestätigung können Sie sich einloggen und ein Leihrad mieten. Bitte beachten Sie die Anweisungen."),"\n";
|
||||
}
|
||||
print $q->start_form(-name=>'accountscreen', -action=>"/$varenv->{mandant}/Account/$varenv->{accounting_3}$session"),"\n";
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
|
||||
my $required = "";
|
||||
if(!$ctrel->{int04}){
|
||||
my $des = "E-Mail Bestätigungscode";
|
||||
my $key = "confirm_code";
|
||||
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 $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";
|
||||
}
|
||||
if(!$ctrel->{int13}){
|
||||
my $des = "SMS Bestätigungscode";
|
||||
my $key = "confirm_smscode";
|
||||
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 $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";
|
||||
}
|
||||
|
||||
my $button_name = "Weiter";
|
||||
print $q->div({-style=>'margin-top:2em;'},"<button type='submit' name='confirm_userid' value='$ctrel->{c_id}' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>$button_name</button>"),"\n";
|
||||
print $q->end_form,"\n";
|
||||
|
||||
}else{
|
||||
|
||||
my $postaction = "/$varenv->{mandant}/Account/$varenv->{accounting_2}";
|
||||
if($ctrel->{c_id} && $path =~ /$varenv->{accounting_2}|$varenv->{accounting_3}|$varenv->{profile}/){
|
||||
$postaction = "/$varenv->{mandant}/Account/$varenv->{accounting_3}";
|
||||
}elsif($path =~ /$varenv->{accounting_1}/){
|
||||
$postaction = "/$varenv->{mandant}/Account/$varenv->{accounting_1_5}";
|
||||
}elsif($ctrel->{c_id} && $path =~ /$varenv->{accounting_1}/){
|
||||
$postaction = "/$varenv->{mandant}/Account/$varenv->{accounting_2}";
|
||||
}
|
||||
|
||||
print $q->start_form(-name=>'accountscreen', -action=>"$postaction$session"),"\n";
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid") if($R::sessionid);
|
||||
|
||||
|
||||
print "<div class='form-group' style='clear:both;'>\n";
|
||||
|
||||
my $i=0;
|
||||
my @tpl_order;
|
||||
foreach(@split_lates){
|
||||
$i++;
|
||||
if($i==1){
|
||||
if($R::confirm_success){
|
||||
print $q->div({-class=>'content_title3'},"Anmeldung bestätigt"),"\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content_title3'},"$tpl01->{tpl_name}"),"\n";
|
||||
}
|
||||
|
||||
if($path =~ /$varenv->{accounting_1}/){
|
||||
print $q->div({-class=>'content2'}, "Damit Sie jederzeit und einfach ein Leihrad mieten können benötigen wir Anschrift und Zahlungsdaten."),"\n";
|
||||
}
|
||||
if($path =~ /$varenv->{accounting_2}/){
|
||||
if($tpl_id == 302008){
|
||||
print $q->div({-class=>'content2'}, "Wähle die Zahlungsart."),"\n";
|
||||
}else{#old SEPA only style
|
||||
print $q->div({-class=>'content2'}, "Durch das SEPA Mandat können wir die Leihrad Buchungen bequem einziehen."),"\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($i==2){
|
||||
print $q->div({-class=>'content_title3'},"$tpl02->{tpl_name}"),"\n";
|
||||
print $q->div({-class=>'content2'}, "Das Login besteht aus Ihrer e-Mail Adresse und einem mindestens 8 stelligen Passwort."),"\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");
|
||||
|
||||
#radID & timeCode from contenttranspos----------------
|
||||
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;'}, "Herzlich Willkommen. Wir mussten Ihren Zugang zu den Mieträdern sperren weil ein Problem mit Ihren Zahlungsdaten vorliegt. Bitte aktualisieren Sie Ihre Zahlungsdaten und kontaktieren Sie uns damit wir den Vorfall klären können."),"\n";
|
||||
}else{
|
||||
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'}, "Aktuell liegen keine Buchungen vor."),"\n" if(!$ctpos_count);
|
||||
|
||||
}elsif($key =~ /barcode/ && $ctpos_count){
|
||||
|
||||
#print $q->div({-style=>'padding-top:1.5em;font-weight:bold;'},"Ihre Buchungsdaten der letzten 1 ½ Jahre im Überblick"),"\n";
|
||||
print $q->div({-style=>'padding-top:1.5em;font-weight:bold;'},"Folgende Positionen liegen zur nächsten Abbuchung vor"),"\n";
|
||||
|
||||
my @tpl_posorder = ("txt01=Beschreibung","int04=Station","ct_name=(Rad) Nummer","int26=CO2","int02=Betrag");
|
||||
|
||||
my $j=0;
|
||||
my $nx=0;
|
||||
my $sum = 0;
|
||||
print "<div style='clear:both;'>\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($ctpos->{$b}->{$scol}) cmp lc($ctpos->{$a}->{$scol}) } keys(%$ctpos)){
|
||||
$j++;
|
||||
$nx++;
|
||||
|
||||
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($ctpos->{$id}->{txt10} =~ /occupied|requested/);
|
||||
$occupied_style = "color:#ff1493;" if($ctpos->{$id}->{int10} == 2 || $ctpos->{$id}->{int10} == 3);
|
||||
|
||||
if($key eq "txt01"){
|
||||
#print $q->td({-class=>'tdtxt', -style=>"$occupied_style"},"$ctpos->{$id}->{$key}");
|
||||
print "<td class='tdtxt' style='$occupied_style'>\n";
|
||||
if($ctpos->{$id}->{txt01}){
|
||||
$ctpos->{$id}->{$key} =~ s/\<br \/\>/; /g;
|
||||
print "$ctpos->{$id}->{$key}<br />\n";
|
||||
}
|
||||
if($ctpos->{$id}->{start_time}){
|
||||
$ctpos->{$id}->{start_time} = $lb->time4de($ctpos->{$id}->{start_time},"1");
|
||||
$ctpos->{$id}->{end_time} = $lb->time4de($ctpos->{$id}->{end_time},"1");
|
||||
print $q->span("→ $ctpos->{$id}->{start_time}<br />← $ctpos->{$id}->{end_time}");
|
||||
}
|
||||
print "</td>\n";
|
||||
}elsif($key =~ /int04/){
|
||||
if($ctpos->{$id}->{int09}){#if Tarifnr then bike
|
||||
#print $q->td({-class=>'tdint', -style=>"$occupied_style"},"Station $ctpos->{$id}->{$key}");
|
||||
print "<td class='tdtxt' style='$occupied_style'>\n";
|
||||
print $q->span("Station<br />→ $ctpos->{$id}->{txt12}$ctpos->{$id}->{int06}<br />← $ctpos->{$id}->{txt13}$ctpos->{$id}->{int04}");
|
||||
print "</td>\n";
|
||||
}else{
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"$ctpos->{$id}->{$key}");
|
||||
}
|
||||
}elsif($key =~ /ct_name/){
|
||||
if($ctpos->{$id}->{int09}){#if Tarifnr then bike
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"Rad<br />$ctpos->{$id}->{$key}");
|
||||
}else{
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style"},"$ctpos->{$id}->{$key}");
|
||||
}
|
||||
}elsif($key eq "int26"){
|
||||
my $co2saving = "";
|
||||
if($ctpos->{$id}->{int26}){
|
||||
$co2saving = "Einsparung</br>";
|
||||
my $co2diff = $pri->co2calc($ctpos->{$id});
|
||||
my $sprit_price = $pri->sprit2calc($ctpos->{$id});
|
||||
$co2saving .= "$co2diff kg CO²<br />";
|
||||
$co2saving .= "$sprit_price EUR<br />";
|
||||
$ctpos->{$id}->{int26} =~ s/\./,/;
|
||||
$co2saving .= "bei $ctpos->{$id}->{int26} KM";
|
||||
}
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$co2saving");
|
||||
}elsif($key eq "int02"){
|
||||
my $gesamt = 0;
|
||||
my $rabatt = "";
|
||||
($gesamt,$rabatt) = $pri->price2calc($ctpos->{$id});
|
||||
$sum += $gesamt;
|
||||
$gesamt = $lb->round($gesamt);
|
||||
$gesamt = $lb->cashme($gesamt,",");
|
||||
print $q->td({-class=>'tdint', -style=>"$occupied_style", -nowrap=>1},"$rabatt $gesamt €");
|
||||
}
|
||||
}
|
||||
}
|
||||
if($j==0){
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdint'},"Keine Daten vorhanden");
|
||||
}else{
|
||||
$sum = $lb->round($sum);
|
||||
$sum = $lb->cashme($sum,",");
|
||||
print $q->Tr(),"\n";
|
||||
print $q->td({-class=>'tdint', -colspan=>3},"");
|
||||
print $q->td({-class=>'tdint'},"Gesamt");
|
||||
print $q->td({-class=>'tdint'},$q->b("$sum €"));
|
||||
}
|
||||
print $q->end_table;
|
||||
print "</div>\n";
|
||||
|
||||
my $i=0;
|
||||
my $dtext = "";
|
||||
print "<div style='clear:both;'>\n";
|
||||
foreach my $id (sort { $ctt_all->{$b}->{ct_name} cmp $ctt_all->{$a}->{ct_name} } keys(%$ctt_all)){
|
||||
|
||||
if($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->{praefix} only defined in sharee
|
||||
my $webtarget = "_blank";
|
||||
my $dtext = "";
|
||||
if($varenv->{syshost} =~ /app/){
|
||||
$webtarget = "_self";
|
||||
$dtext = "(Der PDF download öffnet je nach System/Konfiguartion einen externen PDF-Viewer oder Webbrowser)";
|
||||
}
|
||||
|
||||
if($i==1){
|
||||
print $q->div({-id=>'Rechnungen',-style=>'font-weight:bold;'},"Ihre Rechnungen"),"\n";
|
||||
print $q->div({-style=>'padding:0.5em;'},"$dtext"),"\n";
|
||||
}
|
||||
print $q->div({-style=>'font-size:1em;padding:0.5em;border:0px solid #cccccc;'},$q->a({-href=>"$ctt_all->{$id}->{wwwhost}/FileOut?file=Rechnung-$ctt_all->{$id}->{praefix}-$ctt_all->{$id}->{ct_name}.pdf&sessionid=$coo", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "Rechnung $ctt_all->{$id}->{ct_name}.pdf"), " ($invoice_time)"),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
print "</div>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
#------------------------------------------------------
|
||||
|
||||
my $label_des="* $des";
|
||||
my $autofocus="";
|
||||
if($key =~ /txt15|txt19/){
|
||||
$label_des="$des";
|
||||
}
|
||||
|
||||
#sharee Tarife
|
||||
if(1==2 && $key =~ /txt30/){
|
||||
#FIXME
|
||||
print $q->div({-style=>'padding-top:10px;'}, "aktivierte Tarife: $ctrel->{$key}"),"\n" if($users_sharee->{txt08} =~ /gnu-systems|tux-edv/);
|
||||
if(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" bestätigen</span>";
|
||||
}
|
||||
|
||||
my ($bike_group,$user_group,$tariff_all,$user_tour) = $apif->fetch_tariff($users_sharee,"");
|
||||
my $required="";
|
||||
my @tariff = ("$ctrel->{$key}");
|
||||
@tariff = split(/\s/,$ctrel->{$key}) if($ctrel->{$key} =~ /\s/);
|
||||
my $record_bonus = {c_id => 0};
|
||||
foreach my $rid (sort { $tariff_all->{$a}->{barcode} <=> $tariff_all->{$b}->{barcode} } keys (%$tariff_all)){
|
||||
print "xxxxxxxxxxxxx $tariff_all->{$rid}->{barcode} | $tariff_all->{$rid}->{int18}\n";
|
||||
}#end foreach tariff_all
|
||||
|
||||
}elsif($key =~ /txt/ && $size eq "select" && $des eq "Land"){
|
||||
my $country = $lb->country_code();
|
||||
$ctrel->{$key} = "DE" if(!$ctrel->{$key});
|
||||
my @_valxx;
|
||||
foreach (sort { $country->{$a} cmp $country->{$b} } keys (%$country)){
|
||||
push @_valxx, "$_:$country->{$_}";
|
||||
}
|
||||
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){
|
||||
my $required="required";
|
||||
|
||||
#Gutschein
|
||||
if($key =~ /txt16/ && $ctrel->{c_id}){
|
||||
$required="";
|
||||
$label_des = "<span style='font-weight:normal;'>$des</span>";
|
||||
}
|
||||
if($key eq "txt07" && $R::failure && $R::failure =~ /conflict_txt07/){
|
||||
$autofocus = "autofocus";
|
||||
my ($failkey,$failval) = split(/=/,$R::failure);
|
||||
$label_des = "<span style=color:$red>Achtung, es existiert bereits ein Account mit der Telefon Nr.: $failval</span>";
|
||||
$ctrel->{$key} = $R::conflict_txt07;
|
||||
}
|
||||
elsif($key eq "txt08" && $R::failure && $R::failure =~ /conflict_txt08/){
|
||||
$autofocus = "autofocus";
|
||||
my ($failkey,$failval) = split(/=/,$R::failure);
|
||||
$label_des = "<span style=color:$red>Achtung, es existiert bereits ein Account mit der e-Mail Adresse: $failval</span>";
|
||||
$ctrel->{$key} = $R::conflict_txt08;
|
||||
}
|
||||
#elsif($key eq "txt04" && $R::failure && $R::failure =~ /pwlazy_txt04/){
|
||||
# $autofocus = "autofocus";
|
||||
# $label_des = "<span style=color:$red>Das Passwort ist zu kurz.</span>";
|
||||
#}
|
||||
|
||||
elsif($key eq "txt15" && ($R::failure && $R::failure =~ /conflict_txt15/)){
|
||||
$autofocus = "autofocus";
|
||||
$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>";
|
||||
}
|
||||
elsif($key eq "txt04" && $R::failure && $R::failure =~ /confirm_txt04/){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Die Passwort Wiederholung ist fehlerhaft. Bitte korrigieren Sie Ihre Eingabe.</span>";
|
||||
}
|
||||
elsif(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){
|
||||
$autofocus = "autofocus";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" Angabe korrigieren</span>";
|
||||
$label_des = "<span style=color:$red>Für das \"$des\" liegt ein Fehler vor.</span>" if($key eq "txt04");
|
||||
$label_des = "<span style=color:$red>Bitte SMS Telefon Nr. mit Ländercode, Beispiel: +49 170 12345678</span>" if($key eq "txt07");
|
||||
$label_des = "<span style=color:$red>Die Bonusnummer ist leider nicht vorhanden. Bei nicht vorhandener Nummer das Feld bitte leer lassen.</span>" if($key =~ /txt15/);
|
||||
}
|
||||
#if($R::success eq $key){
|
||||
# $label_des = "<span>Das hat geklappt. Der \"$des\" wurde erfolgreich hinzugefügt, s.u..</span>";
|
||||
#}
|
||||
|
||||
|
||||
if($key eq "txt04"){
|
||||
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 $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 $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
|
||||
$required = "";# if($key =~ /txt09|txt16/);
|
||||
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";
|
||||
}
|
||||
|
||||
#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";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" bestätigen</span>";
|
||||
}
|
||||
my $required="";
|
||||
|
||||
#sharee AGB global new
|
||||
if($key eq "int14" && $size eq "checkbox"){
|
||||
$required="";
|
||||
my $sharee_agb = "<button type='button' class='btn btn-primary ' style='padding:1px 40px;border:1px solid #$bgcolor1;background-color:#$bgcolor1;' data-toggle='modal' data-target='#sharee_agb'>$des</button>\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"), " $sharee_agb"),"\n";
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"null");
|
||||
}
|
||||
|
||||
#look also Shareework.pm save_account ret value
|
||||
elsif(1==2 && $key =~ /int15/){#Konrad AGB
|
||||
$required=1 if($varenv->{wwwhost} =~ /konrad/);
|
||||
my $konrad_agb = "<button type='button' class='btn btn-primary ' style='padding:1px 20px;' data-toggle='modal' data-target='#konrad_agb'>$des</button>\n";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:20px;'},"$label_des"),"\n";
|
||||
print $q->div({-id=>"$key"},$but->checkbox("3429","$key","$ctrel->{$key}","","$required"), " $konrad_agb"),"\n";
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"0");
|
||||
}elsif(1==2 && $key =~ /int14/){#TINK AGB
|
||||
$required=1 if($varenv->{wwwhost} !~ /konrad/);
|
||||
my $tink_agb = "<button type='button' class='btn btn-primary ' style='padding:1px 20px;background-color:#0061a1;border:1px solid #0061a1;' data-toggle='modal' data-target='#tink_agb'>$des</button>\n";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:20px;'},"$label_des"),"\n";
|
||||
print $q->div({-id=>"$key"},$but->checkbox("3428","$key","$ctrel->{$key}","","$required"), " $tink_agb"),"\n";
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"0");
|
||||
}elsif(1==2 && $key =~ /int02/){#newsletter
|
||||
if($varenv->{wwwhost} !~ /konrad/){
|
||||
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";
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" bestätigen</span>";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:10px;'},"$label_des"),"\n";
|
||||
}
|
||||
|
||||
if($key =~ /int03/){
|
||||
|
||||
print $q->div({-class=>'content2'}, "
|
||||
Es werden die Kreditkartendaten von VISA und MasterCard akzeptiert.<br/>
|
||||
Die Beträge für die Leihvorgänge werden gesammelt und i.d.R. wöchentlich eingezogen. D.h. der Belastungszeitpunkt bei Bankeinzeig oder via Karte findet in den darauffolgenden Tagen statt.<br/>
|
||||
Gutschriften werden verrechnet und Ihrem Konto gutgeschrieben.<br/>
|
||||
Die Datenübetragung findet per SSL-Verschlüsselung statt.<br/>
|
||||
Nach erfolgreicher Anmeldung können Sie unter Ihren Verleihdaten die Leihrad Buchungen und Rechnungen jederzeit einsehen.
|
||||
|
||||
"),"\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;',-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;', -src=>"$varenv->{metahost}/img/payment-creditcard2.png"}))),"\n";
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"null");
|
||||
}
|
||||
}
|
||||
|
||||
if($key eq "txt16" && $ctrel->{c_id} && !$R::confirm_success){
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='sharee_edit' value='save_transact' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>Speichern</button>"),"\n";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(($R::failure && $R::failure =~ /\w+/ && $R::failure !~ /txt15|txt16/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /\w/)){
|
||||
print $q->div({-class=>'content2', -style=>"color:$red"}, "* Eingabefehler.<br />Bitte überprüfen Sie Ihre Profildaten damit wir das Fahrradmietsystem freischalten können. Es liegt ein Eingabefehler vor."),"\n";
|
||||
}
|
||||
|
||||
if($path !~ /$varenv->{accounting_3}|$varenv->{profile}/){
|
||||
if($ctrel->{c_id}){
|
||||
my $button_name = "Speichern";
|
||||
$button_name = "Weiter" 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;'},"<button type='submit' name='sharee_edit' value='save_account' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>$button_name</button>"),"\n";
|
||||
if($path =~ /$varenv->{accounting_1}/){
|
||||
print $q->div({-style=>'margin-top:2em;text-align:center;'},$q->a({-style=>"color:#$bgcolor1;font-size:1.2em;", -role=>"button", -href=>"/$viewsel[0]/Account?sharee_edit=delete_account1$session_and"}, "Daten löschen?")),"\n";# if($ctrel->{txt08});
|
||||
}
|
||||
}else{
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='sharee_edit' value='create_account' class='btn btn-primary btn-lg btn-block' style='border:1px solid #$bgcolor1;background-color:#$bgcolor1;'>Weiter</button>"),"\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}#ende e-Mail iif
|
||||
print "</div>\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 "</div>";
|
||||
}
|
||||
1;
|
100
copri4/shareeapp-operator/src/Tpl/Karte.pm
Normal file
100
copri4/shareeapp-operator/src/Tpl/Karte.pm
Normal file
|
@ -0,0 +1,100 @@
|
|||
package Karte;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || { c_id => 0 };
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
|
||||
my $api_file = "/var/www/copri4/shareeconf/apikeys.cfg";
|
||||
my $aconf = Config::General->new($api_file);
|
||||
my %apikeyconf = $aconf->getall;
|
||||
#print $apikeyconf{googlemap}->{google_key};
|
||||
|
||||
my $initMap = $dbt->{website}->{$varenv->{syshost}}->{initMap};
|
||||
$initMap =~ s/\s//g;
|
||||
my ($lat,$lng) = split(/,/,$initMap);
|
||||
|
||||
my $api_return = { authcookie => '' };
|
||||
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
|
||||
($api_return,$users_sharee) = $apif->auth_verify($q,$coo,"");
|
||||
|
||||
require "Mod/KMLout.pm";
|
||||
my $kmlfile = Mod::KMLout::kmlGenerator($api_return,$varenv,$users_sharee);
|
||||
|
||||
print "<div style='background-color:#cccccc;width:100%;margin-top:40px;'>\n";
|
||||
|
||||
print "<div id='map' style='height:600px;'></div>\n";
|
||||
|
||||
print<<EOF
|
||||
<script>
|
||||
|
||||
function initMap() {
|
||||
var map = new google.maps.Map(document.getElementById('map'), {
|
||||
scrollwheel: false,
|
||||
draggable: !("ontouchend" in document),
|
||||
center: {lat: $lat, lng: $lng},
|
||||
zoom: 8
|
||||
});
|
||||
|
||||
var ctaLayer = new google.maps.KmlLayer({
|
||||
position: map.getCenter(),
|
||||
//preserveViewport: true,
|
||||
//url: '$dbt->{primary}->{sharee_primary}->{primaryApp}/KMLout?kml=' + (new Date()).getTime() + '$users_sharee->{c_id}',
|
||||
//url: '$varenv->{metahost}/xml/KMLout-3',
|
||||
//url: '$varenv->{wwwhost}/?kml=' + (new Date()).getTime(),
|
||||
url: '$varenv->{metahost}/xml/$kmlfile',
|
||||
map: map
|
||||
});
|
||||
console.log('$varenv->{metahost}/xml/$kmlfile');
|
||||
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
<script async defer
|
||||
src="https://maps.googleapis.com/maps/api/js?key=$apikeyconf{googlemap}->{google_key}&callback=initMap">
|
||||
</script>
|
||||
EOF
|
||||
;
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
print $q->div({-class=>"content2_legende", -style=>'font-weight:bold;'}, "• Ist ein Lastenrad an einer Mietradstation verfügbar?"),"\n";
|
||||
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Green.png"}), "Lastenrad verfügbar"),"\n";
|
||||
print $q->div({-class=>"content2_legende"}, $q->img({-style=>'height:30px;', -src=>"$varenv->{metahost}/img/Open_Red.png"}), "Lastenrad nicht verfügbar"),"\n";
|
||||
|
||||
#if($R::ask_radID && $R::ask_radID =~ /^\d+$/){
|
||||
# require "Tpl/ModalboxDialog.pm";
|
||||
# &ModalboxDialog::mobox2($tpl_name,$tpl_id,$parent_id,$main_id,$u_id,$u_group,$lang,$users_sharee,$bg_color1,$bg_color2,$R::ask_radID);
|
||||
# }
|
||||
#
|
||||
|
||||
}
|
||||
1;
|
||||
|
179
copri4/shareeapp-operator/src/Tpl/Listing.pm
Normal file
179
copri4/shareeapp-operator/src/Tpl/Listing.pm
Normal file
|
@ -0,0 +1,179 @@
|
|||
package Listing;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use Encode;
|
||||
use Data::Dumper;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $but = new Buttons;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
|
||||
my $lang = "de";
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $user_agent = $q->user_agent();
|
||||
my %ib = $but->ibuttons_arch();
|
||||
my @tpl_order = split /,/,$node_meta->{tpl_order};
|
||||
my $main_ids = $node_meta->{main_id};
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
|
||||
my $session="";
|
||||
my $session_and="";
|
||||
if(length($R::sessionid) > 20){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
$session_and = "&sessionid=$R::sessionid";
|
||||
}
|
||||
|
||||
my $ct4rel = {};
|
||||
my $scol = "sort";
|
||||
my $sort_updown = "up";
|
||||
if($path =~ /NEWS/){
|
||||
$scol = "date_time01";
|
||||
$sort_updown = "down";
|
||||
#$scol = "date_time01";
|
||||
}
|
||||
|
||||
my $content2 = "content2";
|
||||
my $content_img = "pic-float";
|
||||
$ct4rel = $db->collect_ct4rel2("content",$main_ids,$lang,"","","","","",$users_dms->{u_id});
|
||||
|
||||
print "<div id='Contentapp'>\n";
|
||||
|
||||
#Content sequential
|
||||
#BIG LOOP content table
|
||||
foreach my $id (sort {
|
||||
if($sort_updown eq "down"){
|
||||
if ($scol =~ /barcode|int|sort/) {
|
||||
$ct4rel->{$b}->{$scol} <=> $ct4rel->{$a}->{$scol}
|
||||
}else{
|
||||
lc($ct4rel->{$b}->{$scol}) cmp lc($ct4rel->{$a}->{$scol})
|
||||
}
|
||||
}else{
|
||||
if ($scol =~ /barcode|int|sort/) {
|
||||
$ct4rel->{$a}->{$scol} <=> $ct4rel->{$b}->{$scol}
|
||||
}else{
|
||||
lc($ct4rel->{$a}->{$scol}) cmp lc($ct4rel->{$b}->{$scol})
|
||||
}
|
||||
}
|
||||
} keys(%$ct4rel)){
|
||||
|
||||
my $j=0;
|
||||
my $date_time;
|
||||
my $uritxt_key;
|
||||
|
||||
foreach (@tpl_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
$ct4rel->{$id}->{$key} = $q->unescapeHTML("$ct4rel->{$id}->{$key}");
|
||||
$ct4rel->{$id}->{$key} = $lb->newline($ct4rel->{$id}->{$key},"","");
|
||||
|
||||
my $datamain_id = $ct4rel->{$id}->{main_id};
|
||||
my $dir_main = "$varenv->{data}/$datamain_id/$ct4rel->{$id}->{c_id}";
|
||||
my $dir_thumb = "$varenv->{data}/$datamain_id-thumb/$ct4rel->{$id}->{c_id}";
|
||||
my $dir_resize = "$varenv->{data}/$datamain_id-resize/$ct4rel->{$id}->{c_id}";
|
||||
|
||||
|
||||
if($key =~ /img/ && $ct4rel->{$id}->{rel_id}){
|
||||
#print "<div class=''>\n";
|
||||
if( -d "$dir_resize"){
|
||||
my @pics = $lb->read_dirfiles($dir_resize,"\.JPG|\.JPEG|\.PNG","file");
|
||||
foreach(@pics){
|
||||
print $q->img({-id=>"$content_img" ,-src=>"$varenv->{metahost}/data/$datamain_id-resize/$ct4rel->{$id}->{c_id}/$_"}),"\n" if($_ =~ /\w/);
|
||||
}
|
||||
}
|
||||
#print "</div>\n";
|
||||
print $q->div({-style=>'clear:both;'},""),"\n";
|
||||
}elsif($key =~ /pdf/){
|
||||
if( -d "$dir_main"){
|
||||
my @pdfs = $lb->read_dirfiles($dir_main,"\.JPG|\.JPEG|\.PNG","file","not");
|
||||
foreach(@pdfs){
|
||||
#print $q->div({-class=>"$content2"}, $q->a({-href=>"$varenv->{metahost}/data/$datamain_id/$ct4rel->{$id}->{c_id}/$_", -target=>'_blank',-title=>'Download',-type=>'application/octet-stream'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:50px;'}), "$_")),"\n";
|
||||
print $q->div($q->a({-href=>"$varenv->{wwwhost}/FileOut?file=$datamain_id/$ct4rel->{$id}->{c_id}/$_$session_and", -target=>'_default', -title=>'Download',-type=>'application/octet-stream'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:50px;'}), "$_")),"\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}elsif($key =~ /date_time/ && $ct4rel->{$id}->{$key} =~ /\d{4}-\d{2}-\d{2}/){
|
||||
$date_time = $lb->time4de("$ct4rel->{$id}->{$key}","","Date_to_Text_Long");
|
||||
$date_time =~ s/^\w+,\s\w+//;
|
||||
}elsif($key =~ /node_name/){
|
||||
my $ct_users;
|
||||
$ct_users = $db->get_owner($ct4rel->{$id}->{owner}) if($ct4rel->{$id}->{owner});
|
||||
$ct4rel->{$id}->{mtime} = $lb->time4de($ct4rel->{$id}->{mtime},"1") if($ct4rel->{$id}->{mtime});
|
||||
print $q->div({-class=>'content2_group'},"Absender: $ct_users->{u_name} | $ct4rel->{$id}->{mtime}"),"\n";
|
||||
}elsif($key =~ /ct_name/){
|
||||
my $debug;
|
||||
if($users_dms->{u_id}){
|
||||
print $q->div({-class=>'content_title2',-style=>"background-color:silver;padding:0.2em;"},$q->a({-class=>'editnav',-href=>"$path/manager?node2edit=edit_content\&rel_id=$ct4rel->{$id}->{rel_id}", -title=>"edit content"}, "$ct4rel->{$id}->{$key}"),$debug),"\n";
|
||||
print $q->div({-class=>'content_title2'},"$date_time"),"\n" if($date_time);
|
||||
}elsif(!$R::sharee_edit){
|
||||
print $q->div({-class=>'content_title2'},"$date_time"),"\n" if($date_time);
|
||||
print $q->div({-id=>"$ct4rel->{$id}->{c_id}",-class=>'content_title2'},"$ct4rel->{$id}->{$key}"),"\n" if($ct4rel->{$id}->{$key} =~ /[A-Za-z]/);
|
||||
print $q->div({-style=>""},"$debug"),"\n";
|
||||
}
|
||||
}elsif($key =~ /uri(\d+)/ && $ct4rel->{$id}->{$key} =~ /http/){
|
||||
$uritxt_key = "txt" . $1;
|
||||
print $q->div({-class=>'content_direct2',-style=>'font-size:14px;'},$q->a({-href=>"$ct4rel->{$id}->{$key}"},"zum Projekt")),"\n";
|
||||
}elsif($key =~ /txt|int/ && $ct4rel->{$id}->{$key} && "$key" ne "$uritxt_key"){
|
||||
if($key =~ /txt/ && $size =~ /area(\d+)/ && $ct4rel->{$id}->{$key}){
|
||||
#phone tag
|
||||
if($ct4rel->{$id}->{$key} =~ /Telefon|Mobile/){
|
||||
$ct4rel->{$id}->{$key} =~ s/([\s0-9-]+)/\<a href=\'tel:00$1\'\>$1\<\/a\>/;
|
||||
}
|
||||
#email tag with little coding against grabber
|
||||
if($ct4rel->{$id}->{$key} =~ /(\w+\@[\w-]+\.de)/){
|
||||
$ct4rel->{$id}->{$key} =~ s/(\w+\@[\w-]+\.de)/\<a href=\'mailto:$1\'\>$1\<\/a\>/;
|
||||
$ct4rel->{$id}->{$key} =~ s/\@/\&\#64\;/g;
|
||||
#$ct4rel->{$id}->{$key} =~ s/\.de/\&\#46\;de/g;
|
||||
}
|
||||
#Development
|
||||
if($ct4rel->{$id}->{$key} =~ /(www\.GNU-Systems\.de)/){
|
||||
$ct4rel->{$id}->{$key} =~ s/(www\.[\w-]+\.de)/\<a href=\'http:\/\/$1\' target=\'_blank\'\>$1\<\/a\>/g;
|
||||
}
|
||||
$ct4rel->{$id}->{$key} =~ s/\\//g;
|
||||
print $q->div({-class=>"$content2"}, "$ct4rel->{$id}->{$key}"),"\n";
|
||||
}elsif($ct4rel->{$id}->{$key} && $size !~ /checkbox/){
|
||||
print $q->div({-class=>"$content2"}, "$ct4rel->{$id}->{$key}"),"\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
print $q->div({-class=>"$content2"}," "),"\n";
|
||||
}#end if
|
||||
print "</div>\n";
|
||||
}
|
||||
1;
|
262
copri4/shareeapp-operator/src/Tpl/ModalboxDialog.pm
Normal file
262
copri4/shareeapp-operator/src/Tpl/ModalboxDialog.pm
Normal file
|
@ -0,0 +1,262 @@
|
|||
package ModalboxDialog;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use CGI::Cookie ();
|
||||
use CGI ':standard';
|
||||
use DateTime;
|
||||
use DateTime::Format::Pg;
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::DBtank;
|
||||
use Mod::APIfunc;
|
||||
use Mod::Libenzdb;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub mobox2(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
my $ask_radID = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $dbt = new DBtank;
|
||||
my $apif = new APIfunc;
|
||||
|
||||
my $db = new Libenzdb;
|
||||
my $but = new Buttons;
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $dbh = "";
|
||||
my $bg_color = "white";
|
||||
my $bg_color2 = $varenv->{brand_color} || "";
|
||||
|
||||
my $session="";
|
||||
my $session_and="";
|
||||
if(length($R::sessionid) > 20){
|
||||
$session = "?sessionid=$R::sessionid";
|
||||
$session_and = "&sessionid=$R::sessionid";
|
||||
}
|
||||
|
||||
my $ctadr = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
|
||||
|
||||
my $main_ids;
|
||||
my ($bike_group,$user_group,$tariff_content,$user_tour) = $apif->fetch_tariff($ctadr,"");
|
||||
$main_ids = join(",",@{$bike_group});
|
||||
$main_ids =~ s/[a-z_]+//ig;
|
||||
|
||||
my $title = "";
|
||||
my $ct = {};
|
||||
if($ask_radID){
|
||||
my $pref_cc = {
|
||||
table => "content",
|
||||
fetch => "one",
|
||||
main_id => "IN::($main_ids)",
|
||||
barcode => $ask_radID,
|
||||
int10 => 1,
|
||||
};
|
||||
|
||||
$ct = $dbt->fetch_record($dbh,$pref_cc) if($ask_radID && $main_ids);
|
||||
$title = "Fahrrad Buchungsbestätigung";
|
||||
}
|
||||
|
||||
my $height = "250";
|
||||
my $width = "400";
|
||||
|
||||
print<<EOF
|
||||
<style>
|
||||
.ui-dialog .ui-dialog-content {
|
||||
background: $bg_color;
|
||||
}
|
||||
.ui-dialog > .ui-widget-header {
|
||||
color:$varenv->{color};
|
||||
font-weight:normal;
|
||||
border:1px solid $bg_color2;
|
||||
background: $bg_color2;
|
||||
}
|
||||
.ui-widget-overlay {
|
||||
background: #666 url("$varenv->{metahost}/jquery-ui/images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;
|
||||
opacity: .5;
|
||||
filter: Alpha(Opacity=50);
|
||||
}
|
||||
</style>
|
||||
EOF
|
||||
;
|
||||
|
||||
#int04 != 1 --> no mailACK
|
||||
#int13 != 1 --> no telACK
|
||||
#int01 != 3 --> no sync
|
||||
#int12 == 1 --> Vde
|
||||
|
||||
my $ctadr_int13 = 1;#default to activ
|
||||
if($varenv->{telAck_startdate} && $ctadr->{mtime}){
|
||||
my ($ty,$tm,$td) = split(/-/,$varenv->{telAck_startdate});
|
||||
my $dt1telAck_start = DateTime->new(year => $ty, month => $tm, day => $td);
|
||||
my $dt2mtime = DateTime::Format::Pg->parse_datetime($ctadr->{mtime});
|
||||
#will be only evaluated if mtime never than global conf
|
||||
if($ctadr->{owner} == 197 && $dt2mtime > $dt1telAck_start){
|
||||
$ctadr_int13 = $ctadr->{int13};
|
||||
}
|
||||
}
|
||||
if($node_meta->{main_id} && $ctadr->{c_id} && ($ctadr->{int04} != 1 || $ctadr_int13 != 1 || $ctadr->{int12} || $ask_radID)){
|
||||
|
||||
|
||||
print<<EOF
|
||||
<script>
|
||||
\$(function() {
|
||||
\$( "#dialog-form2" )
|
||||
.css("background-color","$bg_color")
|
||||
.dialog({
|
||||
height: $height,
|
||||
width: $width,
|
||||
closeOnEscape: false,
|
||||
modal: true
|
||||
});
|
||||
\$('.ui-widget-overlay').click(function() {
|
||||
\$(".ui-dialog-titlebar-close").trigger('click');});
|
||||
|
||||
\$( "#btn_no1" ).click(function() {
|
||||
\$( "#dialog-form2" ).dialog( "close" );
|
||||
});
|
||||
\$( "#btn_no2" ).click(function() {
|
||||
\$( "#dialog-form2" ).dialog( "close" );
|
||||
});
|
||||
|
||||
\$( "#btn_yes" ).click(function() {
|
||||
window.location.href = '$varenv->{wwwhost}?radID=$ask_radID$session_and';
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
EOF
|
||||
;
|
||||
|
||||
print "<div id='dialog-form2' style='text-align:left;margin:auto;max-width:1000px;' title='$title'>";
|
||||
|
||||
|
||||
print $q->start_form(-name=>'modaldialog');
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
|
||||
|
||||
print "<div class='form-group' style='clear:both;'>\n";
|
||||
|
||||
if($ctadr->{int04} != 1 || $ctadr_int13 != 1){
|
||||
my $required = "required";
|
||||
if($ctadr->{int04} != 1){
|
||||
my $des = "E-Mail Bestätigungscode";
|
||||
my $key = "confirm_code";
|
||||
my $label_des="* $des";
|
||||
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 />\n";
|
||||
}else{
|
||||
print $q->div({-class=>'content2', -style=>'color:gray;'}, "* E-Mail Bestätigungscode wurde bereits erfolgreich eingegeben."),"\n";
|
||||
}
|
||||
if($ctadr_int13 != 1 && $varenv->{telAck_startdate}){
|
||||
my $des = "SMS Bestätigungscode";
|
||||
my $key = "confirm_smscode";
|
||||
my $label_des="* $des";
|
||||
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 />\n";
|
||||
}elsif($varenv->{telAck_startdate}){
|
||||
print $q->div({-class=>'content2', -style=>'color:gray;'}, "* SMS Bestätigungscode wurde bereits erfolgreich eingegeben."),"\n";
|
||||
}
|
||||
my $button_name = "Weiter";
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='confirm_email' value='$ctadr->{txt08}' class='btn btn-primary btn-lg btn-block'>$button_name</button>"),"\n";
|
||||
|
||||
}elsif($ctadr->{int04} && $R::confirm_code){
|
||||
|
||||
my $des = "Danke! Die Bestätigung war erfolgreich.";
|
||||
my $key = "nothing";
|
||||
my $label_des="$des";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:2.5em;'},"$label_des"),"\n";
|
||||
print $q->div({-style=>'margin-top:2em;text-align:center;'},"<button type='button' id='btn_no1' class='btn btn-primary'>Schließen</button>"),"\n";
|
||||
|
||||
|
||||
}elsif($ctadr->{int12} || $ctadr->{int01} != 3 || !$ct->{c_id}){
|
||||
my $des = "Leider ist das Fahrradmietsystem für Ihren Account nicht freigeschaltet.<br /><br />Bitte überprüfen Sie Ihre Profildaten auf Vollständigkeit.";
|
||||
$des = "Leider ist das Fahrradmietsystem für Ihren Account nicht freigeschaltet.<br /><br />Bitte kontaktieren Sie uns damit wir das Problem lösen und Ihren Account wieder freischalten können.</a>." if($ctadr->{int12} == 2);
|
||||
my $key = "nothing";
|
||||
my $label_des="$des";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:2.5em;'},"$label_des"),"\n";
|
||||
print $q->div({-style=>'margin-top:2em;text-align:center;'},"<button type='button' id='btn_no1' class='btn btn-primary'>Schließen</button>"),"\n";
|
||||
|
||||
|
||||
|
||||
}elsif($ask_radID){
|
||||
|
||||
my $des = "Fahrrad Nr. $R::ask_radID kostenlos für 15 Min. reservieren?";
|
||||
my $key = "radID";
|
||||
my $label_des="$des";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:2.5em;'},"$label_des"),"\n";
|
||||
#print "<input id='$key' type='text' class='form-control' name='$key' value='' placeholder='$des' $required />\n";
|
||||
#print $q->hidden(-name=>"$key",-override=>1,-value=>"$ask_radID");
|
||||
print $q->div({-style=>'margin-top:2em;text-align:center;'},"<button type='button' id='btn_no2' class='btn btn-primary' style='width:5em;margin:0 2.5em;'>Nein</button>","<button type='button' id='btn_yes' class='btn btn-primary' style='width:5em;;margin:0 2.5em;'>Ja</button>"),"\n";
|
||||
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
print $q->end_form,"\n";
|
||||
print "</div>\n";
|
||||
|
||||
}elsif($ask_radID){
|
||||
#If no Login
|
||||
print<<EOF
|
||||
<script>
|
||||
\$(function() {
|
||||
\$( "#dialog-form2" )
|
||||
.css("background-color","$bg_color")
|
||||
.dialog({
|
||||
height: $height,
|
||||
width: $width,
|
||||
closeOnEscape: false,
|
||||
modal: true
|
||||
});
|
||||
\$('.ui-widget-overlay').click(function() {
|
||||
\$(".ui-dialog-titlebar-close").trigger('click');});
|
||||
|
||||
\$( "#btn_no3" ).click(function() {
|
||||
\$( "#dialog-form2" ).dialog( "close" );
|
||||
});
|
||||
\$( "#btn_anmelden" ).click(function() {
|
||||
window.location.href = '$varenv->{wwwhost}/$varenv->{mandant}/Anmelden';
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
EOF
|
||||
;
|
||||
print "<div id='dialog-form2' style='text-align:left;margin:auto;max-width:1000px;' title='$title'>";
|
||||
print "<div class='form-group' style='clear:both;'>\n";
|
||||
|
||||
my $des = "Bitte erst anmelden.";
|
||||
my $label_des="$des";
|
||||
print $q->label({-for=>"no_access", -style=>'padding-top:2.5em;'},"$label_des"),"\n";
|
||||
print $q->div({-style=>'margin-top:2em;text-align:center;'},"<button type='button' id='btn_no3' class='btn btn-primary' style='margin:0 2em;'>Schließen</button>","<button type='button' id='btn_anmelden' class='btn btn-primary' style='margin:0 2em;'>Anmelden</button>"),"\n";
|
||||
|
||||
|
||||
print "</div>\n";
|
||||
print "</div>\n";
|
||||
|
||||
}
|
||||
}
|
||||
1;
|
266
copri4/shareeapp-operator/src/Tpl/PayoneCCclient.pm
Normal file
266
copri4/shareeapp-operator/src/Tpl/PayoneCCclient.pm
Normal file
|
@ -0,0 +1,266 @@
|
|||
package PayoneCCclient;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use CGI ':standard';
|
||||
use Config::General;
|
||||
use Mod::DBtank;
|
||||
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $self = shift;
|
||||
my $tpl_id = shift;
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $dbt = new DBtank;
|
||||
|
||||
my $globalconf_file = "/var/www/copri4/shareeconf/global.cfg";
|
||||
my $conf = Config::General->new($globalconf_file);
|
||||
my %globalconf = $conf->getall;
|
||||
my $payone_conf = $globalconf{payone_conf};
|
||||
|
||||
my $bgcolor1 = "009899";#sharee
|
||||
#my $bgcolor1 = "e2001a";
|
||||
|
||||
$bgcolor1 = $dbt->{website}->{$varenv->{syshost}}->{bgcolor1} if($dbt->{website}->{$varenv->{syshost}}->{bgcolor1});
|
||||
$bgcolor1 = $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1} if($dbt->{merchant_ids}->{$varenv->{merchant_id}}->{bgcolor1});
|
||||
|
||||
print "<div class='form-group' style='clear:both;'>\n";
|
||||
|
||||
print $q->div({-class=>'content_title3'},"Kreditkartendaten"),"\n";
|
||||
|
||||
print $q->div({-class=>'content2'},"Kreditkartendaten werden von uns nicht gespeichert sondern direkt an unseren Zahlungsdienstleister Payone übermittelt. Deshalb sehen Sie hier nur leere Eingabefelder."),"\n";
|
||||
#print $q->div({-class=>'content2'}, "Zur Validierung Ihrer Zahlungsdaten wird eine 1,- € Testbuchung vorgenommen. Wir werden nach erfolgreicher Abbuchung den Betrag als Mietgutschrift in Ihrem Account hinterlegen."),"\n";
|
||||
if($users_sharee->{int03} && $users_sharee->{int03} == 2 && $users_sharee->{txt28} && $users_sharee->{txt28} =~ /\w/){
|
||||
print $q->div({-class=>'content2', -style=>'color:#c83434;'},"Ihre Zahlungsdaten konnten nicht erfolgreich validiert werden. Bitte überprüfen Sie Ihre Eingaben."),"\n";
|
||||
}
|
||||
|
||||
my $ccerror="";
|
||||
#my $ccerror="Entschuldigung, die Zahlungsart Kreditkarten ist im Augenblick nicht verfügbar.";
|
||||
$ccerror = "Status not APPROVED" if($R::not_approved);
|
||||
print "<style type='text/css'>div#ccerror {color:#c83434;} </style>";
|
||||
print $q->div({-id=>'ccerror'},"$ccerror"),"\n";
|
||||
|
||||
if(1==1){
|
||||
|
||||
print<<EOF
|
||||
<style type="text/css" media="screen, projection">
|
||||
fieldset {
|
||||
padding: 1em;
|
||||
border: 1px solid #$bgcolor1;
|
||||
width: 275px;
|
||||
margin: 10px;
|
||||
}
|
||||
label {
|
||||
margin-right: 10px;
|
||||
float: left;
|
||||
width: 80px;
|
||||
padding-top: 0.3em;
|
||||
text-align: left;
|
||||
}
|
||||
input, select{
|
||||
font-size: 1em;
|
||||
border: 1px solid black;
|
||||
padding: 0.1em;
|
||||
}
|
||||
select {
|
||||
margin-right: 10px;
|
||||
}
|
||||
input, .inputIframe, select {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
input {
|
||||
width: 175px;
|
||||
}
|
||||
#paymentsubmit {
|
||||
width: 100%;
|
||||
font-size:1.2em;
|
||||
padding: 5px;
|
||||
margin-top:20px;
|
||||
color:#FFF;
|
||||
background-color:#$bgcolor1;
|
||||
}
|
||||
#errorOutput {
|
||||
text-align: center;
|
||||
color: #ff0000;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script>
|
||||
EOF
|
||||
;
|
||||
|
||||
print<<EOF
|
||||
<form name="paymentform" action="" method="post">
|
||||
<fieldset>
|
||||
|
||||
<input type="hidden" name="pseudocardpan" id="pseudocardpan">
|
||||
<input type="hidden" name="truncatedcardpan" id="truncatedcardpan">
|
||||
|
||||
<!-- place your input fields -->
|
||||
<label for="cardtypeInput">Kreditkartentyp:</label>
|
||||
<span id="cardtype" class="inputIframe"></span>
|
||||
|
||||
<label for="cardpanInput">Kreditkartennummer:</label>
|
||||
<span id="cardpan" class="inputIframe"></span>
|
||||
|
||||
<label for="cvcInput">CVC:</label>
|
||||
<span id="cardcvc2" class="inputIframe"></span>
|
||||
|
||||
<label for="expireInput">gültig bis:</label>
|
||||
<span id="expireInput" class="inputIframe">
|
||||
<span id="cardexpiremonth"></span>
|
||||
<span id="cardexpireyear"></span>
|
||||
</span>
|
||||
|
||||
<label for="firstnameInput">Vorname:</label>
|
||||
<input id="firstname" type="text" name="firstname" value="">
|
||||
|
||||
<label for="lastnameInput">Name:</label>
|
||||
<input id="lastname" type="text" name="lastname" value="">
|
||||
|
||||
<div id="errorOutput"></div>
|
||||
|
||||
<input id="paymentsubmit" type="button" value="Weiter" onclick="check();">
|
||||
|
||||
</fieldset>
|
||||
<input type="hidden" name="sessionid" value="$R::sessionid">
|
||||
|
||||
</form>
|
||||
|
||||
<div id="paymentform"></div>
|
||||
<script>
|
||||
var request, config;
|
||||
config = {
|
||||
|
||||
fields: {
|
||||
|
||||
cardtype: {
|
||||
selector: "cardtype", // put name of your div-container here
|
||||
cardtypes: ["V", "M"] // define possible cardtypes in PAYONE iFrame
|
||||
},
|
||||
|
||||
cardpan: {
|
||||
selector: "cardpan", // put name of your div-container here
|
||||
type: "text", // text (default), password, tel
|
||||
style: "font-size: 1em; border: 1px solid black;"
|
||||
},
|
||||
|
||||
cardcvc2: {
|
||||
selector: "cardcvc2", // put name of your div-container here
|
||||
type: "password", // select(default), text, password, tel
|
||||
style: "font-size: 1em; border: 1px solid black;",
|
||||
size: "4",
|
||||
maxlength: "4", // set max. length for CVC input; empty values possible
|
||||
length: {
|
||||
"A": 4, "V": 3, "M": 3, "J": 0
|
||||
} // set required CVC length per cardtype
|
||||
// if set exact length required; 0=CVC input disabled
|
||||
},
|
||||
|
||||
cardexpiremonth: {
|
||||
selector: "cardexpiremonth", // put name of your div-container here
|
||||
type: "select", // select(default), text, password, tel
|
||||
size: "2",
|
||||
maxlength: "2",
|
||||
|
||||
iframe: {
|
||||
width: "50px"
|
||||
}
|
||||
},
|
||||
|
||||
cardexpireyear: {
|
||||
selector: "cardexpireyear", // put name of your div-container here
|
||||
type: "select", // select(default), text, password, tel
|
||||
|
||||
iframe: {
|
||||
width: "80px"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
defaultStyle: {
|
||||
input: "font-size: 1em; border: 1px solid black; width: 175px;",
|
||||
select: "font-size: 1em; border: 1px solid black;",
|
||||
iframe: {
|
||||
height: "33px",
|
||||
width: "280px"
|
||||
},
|
||||
error: "errorOutput",
|
||||
language: Payone.ClientApi.Language.de
|
||||
// area to display error-messages (optional)
|
||||
// Language to display error-messages
|
||||
// (default: Payone.ClientApi.Language.en)
|
||||
}};
|
||||
|
||||
request = {
|
||||
aid: '$payone_conf->{aid}', // your AID
|
||||
encoding: '$payone_conf->{encoding}', // desired encoding
|
||||
mid: '$payone_conf->{mid}', // your MID
|
||||
mode: '$payone_conf->{mode}', // desired mode
|
||||
portalid: '$payone_conf->{portalid}', // your PortalId
|
||||
request: 'creditcardcheck', // fixed value
|
||||
responsetype: '$payone_conf->{responsetype}', // fixed value
|
||||
storecarddata: '$payone_conf->{storecarddata}',// fixed value
|
||||
hash: '$payone_conf->{hash}' // hash calculated over your request-parameter-values (alphabetical request-order) plus PMI portal key
|
||||
// see Chapter 3.1.5.3
|
||||
};
|
||||
|
||||
var iframes = new Payone.ClientApi.HostedIFrames(config, request);
|
||||
|
||||
function check() {
|
||||
// Function called by submitting PAY-button
|
||||
|
||||
if (iframes.isComplete()) {
|
||||
iframes.creditCardCheck('checkCallback');
|
||||
// Perform "CreditCardCheck" to create and get a
|
||||
// PseudoCardPan; then call your function
|
||||
"checkCallback"
|
||||
} else {
|
||||
\$('#ccerror').html('Die Kreditkartendaten konnten nicht validiert werden.');
|
||||
console.debug("not complete");
|
||||
}
|
||||
}
|
||||
|
||||
function checkCallback(response) {
|
||||
console.debug(response);
|
||||
|
||||
if (response.status === "VALID") {
|
||||
document.getElementById("pseudocardpan").value = response.pseudocardpan;
|
||||
document.getElementById("truncatedcardpan").value = response.truncatedcardpan;
|
||||
document.paymentform.submit();
|
||||
}else{
|
||||
\$('#ccerror').html('Die Kreditkartendaten konnten nicht validiert werden.');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
EOF
|
||||
;
|
||||
}
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
}
|
||||
1;
|
166
copri4/shareeapp-operator/src/Tpl/PayoneSEPA.pm
Normal file
166
copri4/shareeapp-operator/src/Tpl/PayoneSEPA.pm
Normal file
|
@ -0,0 +1,166 @@
|
|||
package PayoneSEPA;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Shareework;
|
||||
use Mod::DBtank;
|
||||
use Sys::Hostname;
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $self = shift;
|
||||
my $tpl_id = shift;
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $lb = new Libenz;
|
||||
my $tk = new Shareework;
|
||||
my $dbt = new DBtank;
|
||||
my $but = new Buttons;
|
||||
my $hostname = hostname;
|
||||
|
||||
$q->import_names('R');
|
||||
my @keywords = $q->param;
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
|
||||
my $coo = $q->cookie(-name=>'domcookie') || $R::sessionid;
|
||||
my $ctadr = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
|
||||
|
||||
my $tpl = $dbt->get_tpl($tpl_id);
|
||||
my @tpl_order = split /,/,$tpl->{tpl_order};
|
||||
|
||||
print $q->start_form(),"\n";
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
|
||||
print $q->hidden(-name=>"tinkc_id",-override=>1,-value=>"$ctadr->{c_id}");
|
||||
print $q->hidden(-name=>"request",-override=>1,-value=>"managemandate");
|
||||
|
||||
#Standard parameter
|
||||
#foreach (keys (%$base_request)){
|
||||
# print $q->hidden(-name=>"$_",-value=>"$base_request->{$_}"),"\n";
|
||||
#}
|
||||
|
||||
print "<div class='form-group' style='clear:both;'>\n";
|
||||
|
||||
print $q->div({-class=>'content_title3'},"Kontoverbindung"),"\n";
|
||||
print $q->div({-class=>'content2'}, "Durch das SEPA Mandat können wir die Leihrad Buchungen bequem einziehen."),"\n";
|
||||
#print $q->div({-class=>'content2'}, "Zur Validierung Ihrer Zahlungsdaten wird eine 1,- € Testbuchung vorgenommen. Wir werden nach erfolgreicher Abbuchung den Betrag als Mietgutschrift in Ihrem Account hinterlegen."),"\n";
|
||||
|
||||
|
||||
foreach (@tpl_order){
|
||||
my ($key,$des,$size) = split /=/,$_;
|
||||
$ctadr->{$key} = $q->unescapeHTML("$ctadr->{$key}");
|
||||
|
||||
my $label_des="";
|
||||
my $red = "#c83434";
|
||||
my $required="required";
|
||||
if($key eq "txt22"){
|
||||
if($R::IBAN){
|
||||
$label_des = "<span style=color:$red>IBAN Fehler</span>";
|
||||
$ctadr->{$key} = $R::IBAN;
|
||||
}
|
||||
if($R::failure eq $key){
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" Angabe korrigieren</span>";
|
||||
}
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' override=1 value='$ctadr->{$key}' placeholder='$des' $required />\n";
|
||||
|
||||
}elsif($key eq "txt23"){
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n";
|
||||
print "<input id='$key' type='text' class='form-control' name='$key' override=1 value='$ctadr->{$key}' placeholder='$des' $required />\n";
|
||||
|
||||
#------------------------
|
||||
}elsif($key =~ /int03/ && $size eq "checkbox"){
|
||||
|
||||
if($ctadr->{$key} != 1){
|
||||
|
||||
my $int03 = "";
|
||||
$int03 = $ctadr->{$key} if($ctadr->{$key} == 1);
|
||||
print $q->div({-style=>'margin:10px 0;'},"Damit wir die SEPA-Lastschrift von Ihrem Konto einziehen können, benötigen wir von Ihnen ein SEPA-Lastschriftmandat. Das Mandat wird bei uns als PDF zu Ihren Zahldaten hinterlegt. Sie können nach der Anmeldung das Mandat als PDF herunterladen"),"\n";
|
||||
|
||||
if($ctadr->{txt27} !~ /active|pending/ && $R::failure eq $key){
|
||||
$label_des = "<span style=color:$red>Bitte \"$des\" bestätigen</span>";
|
||||
print $q->label({-for=>"$key", -style=>'padding-top:10px;'},"$label_des"),"\n";
|
||||
}
|
||||
|
||||
my $des = "Ich möchte das Mandat erteilen (elektronische Übermittlung)";
|
||||
print $q->div({-id=>"$key"},$but->checkbox("1","$key","$int03","","$required"), " $des"),"\n";
|
||||
#print $q->hidden(-name=>"$key",-override=>1,-value=>"3");
|
||||
|
||||
}else{
|
||||
|
||||
if($ctadr->{txt28} =~ /SEPA-Lastschriftmandat/){
|
||||
print $q->div({-class=>'content2'}, ""),"\n";
|
||||
$ctadr->{txt28} = $q->unescapeHTML("$ctadr->{txt28}");
|
||||
use URI::Encode qw(uri_encode uri_decode);
|
||||
$ctadr->{txt28} = uri_decode($ctadr->{txt28});
|
||||
$ctadr->{txt28} =~ s/\+/ /g;
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;'},$ctadr->{txt28}),"\n";
|
||||
}
|
||||
|
||||
#if payone fails/error
|
||||
if($ctadr->{txt27} =~ /active|pending/){
|
||||
#print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;'}, "Das Mandat ist aktiviert"),"\n";
|
||||
if($ctadr->{ct_name} && ($ctadr->{ct_name} =~ /PO-/ || $ctadr->{ct_name} =~ /TM-/) && $coo){
|
||||
#print $q->div({-style=>'padding:10px;margin:10px 0;'}, "Download:", $q->a({-href=>"/PDFinvoice?session=$coo\&sepa=$ctadr->{ct_name}", -target=>'_blank'}, "SEPA-Lastschriftmandat.pdf")),"\n" if($coo);
|
||||
#$varenv->{praefix} only defined in sharee
|
||||
my $webtarget = "_blank";
|
||||
my $dtext = "";
|
||||
if($varenv->{syshost} =~ /app/){
|
||||
$webtarget = "_self";
|
||||
$dtext = "<br />(Der PDF download öffnet je nach System/Konfiguartion einen externen PDF-Viewer oder Webbrowser)";
|
||||
}
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;'},$q->a({-href=>"$varenv->{wwwhost}/FileOut?file=SEPA-Lastschriftmandat-$varenv->{praefix}-$ctadr->{ct_name}.pdf", -target=>"$webtarget" , -type=>'application/octet-stream', -style=>'text-decoration:underline;font-size:1.1em;'}, $q->img({-src=>"$varenv->{metahost}/glyphicons/file-any.png", -style=>'width:30px;'}), "SEPA-Lastschriftmandat.pdf"),"$dtext"),"\n";
|
||||
}else{
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;color:#c83434;'},"Es gibt ein Problem! Das SEPA Mandat konnte nicht eingeholt werden. Bitte wenden Sie sich bei Bedarf an den unter \"Kontakt\" hinterlegten Support."),"\n";
|
||||
}
|
||||
}elsif($ctadr->{txt22}){ #if IBAN but no mandat_status
|
||||
print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;color:#c83434;'}, "Fehler. Das Mandat ist nicht aktiv. "),"\n";
|
||||
|
||||
$ctadr->{txt28} = $q->unescapeHTML("$ctadr->{txt28}");
|
||||
$ctadr->{txt28} = $lb->newline($ctadr->{txt28},"","0");
|
||||
|
||||
#print $q->div({-style=>'padding:10px;margin:10px 0;border:1px solid silver;color:#c83434;'}, "Fehlermeldung: $ctadr->{txt28}"),"\n" if($ctadr->{txt28} !~ /SEPA-Lastschriftmandat/);
|
||||
}
|
||||
print $q->hidden(-name=>"$key",-override=>1,-value=>"1");
|
||||
}
|
||||
}
|
||||
#--------------------
|
||||
}
|
||||
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='sharee_edit' value='save_account' class='btn btn-primary btn-lg btn-block'>Weiter</button>"),"\n";
|
||||
|
||||
|
||||
print "</div>\n";
|
||||
print $q->end_form,"\n";
|
||||
}
|
||||
1;
|
81
copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm
Normal file
81
copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm
Normal file
|
@ -0,0 +1,81 @@
|
|||
package PayoneSelect;
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX;
|
||||
use CGI ':standard';
|
||||
use Lib::Config;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Tpl::AccountSubmenu;
|
||||
use Tpl::PayoneSEPA;
|
||||
use Tpl::PayoneCCclient;
|
||||
|
||||
|
||||
sub new {
|
||||
my $class = shift;
|
||||
my $self = {};
|
||||
bless($self,$class);
|
||||
return $self;
|
||||
}
|
||||
|
||||
#Template
|
||||
sub tpl(){
|
||||
my $node_meta = shift;
|
||||
my $users_dms = shift || "";
|
||||
my $mode = shift || "";
|
||||
my $varenv = shift;
|
||||
my $users_sharee = shift || "";
|
||||
my $return = shift || "";
|
||||
|
||||
my $q = new CGI;
|
||||
my $cf = new Config;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $but = new Buttons;
|
||||
my $submenu = new AccountSubmenu;
|
||||
my $paySEPA = new PayoneSEPA;
|
||||
my $payCC = new PayoneCCclient;
|
||||
|
||||
$q->import_names('R');
|
||||
my @keywords = $q->param;
|
||||
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
#with meta_host,
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $time = time;
|
||||
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;
|
||||
|
||||
my %ib = $but->ibuttons_arch();
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
|
||||
my $ctrel = $users_sharee if(ref($users_sharee) eq "HASH" && $users_sharee->{c_id});
|
||||
my $ctt = $db->collect_content2("contenttrans","int10",$ctrel->{c_id});
|
||||
my $tpl = $db->get_tpl($node_meta->{tpl_id});
|
||||
|
||||
print "<div id='Contentapp'>\n";
|
||||
|
||||
#subMenue--------
|
||||
$submenu->tpl($node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
#-----------------
|
||||
|
||||
#Selected Payment
|
||||
if($ctrel->{int03} == 1 || $ctrel->{int03} == 3){
|
||||
$paySEPA->tpl("309",$node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
}elsif($ctrel->{int03} == 2){
|
||||
$payCC->tpl("310",$node_meta,$users_dms,$mode,$varenv,$users_sharee,$return);
|
||||
}
|
||||
|
||||
print "</div>\n";
|
||||
|
||||
}
|
||||
1;
|
1
copri4/shareeapp-operator/src/scripts
Symbolic link
1
copri4/shareeapp-operator/src/scripts
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/scripts
|
1
copri4/shareeapp-operator/src/wkhtmltopdf-amd64
Symbolic link
1
copri4/shareeapp-operator/src/wkhtmltopdf-amd64
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/wkhtmltopdf-amd64
|
2
copri4/shareeapp-operator/startup.pl
Executable file
2
copri4/shareeapp-operator/startup.pl
Executable file
|
@ -0,0 +1,2 @@
|
|||
use lib qw(/var/www/copri4/shareeapp-operator/src);
|
||||
1;
|
1
copri4/shareeapp-operator/xml
Symbolic link
1
copri4/shareeapp-operator/xml
Symbolic link
|
@ -0,0 +1 @@
|
|||
../shareedms-operator/xml
|
Loading…
Add table
Add a link
Reference in a new issue