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
113
copri4/shareedms-operator/apache/shareedms-operator.conf
Normal file
113
copri4/shareedms-operator/apache/shareedms-operator.conf
Normal file
|
@ -0,0 +1,113 @@
|
|||
<VirtualHost *:80>
|
||||
ServerName shareedms-operator.copri-bike.de
|
||||
ServerAlias shareedms-operator1.copri-bike.de
|
||||
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareedms-operator
|
||||
|
||||
ErrorLog /var/log/apache2/shareedms-operator-error.log
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareedms-operator-access.log combined
|
||||
ServerSignature Off
|
||||
RewriteEngine on
|
||||
RewriteCond %{SERVER_NAME} =shareedms-operator.copri-bike.de
|
||||
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ServerName shareedms-operator1.copri-bike.de
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareedms-operator
|
||||
AddHandler cgi-script .cgi .sh .pl
|
||||
|
||||
<Directory /var/www/copri4/shareedms-operator>
|
||||
Options -Indexes +FollowSymLinks +ExecCGI
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<FilesMatch ".(eot|ttf|otf|woff|woff2)">
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
</FilesMatch>
|
||||
|
||||
<Directory /var/www/copri4/shareedms-operator/site>
|
||||
Options +Indexes +FollowSymLinks -ExecCGI
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
<Directory /var/www/copri4/shareedms-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/shareedms-operator-error.log
|
||||
#LogLevel debug
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareedms-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 shareedms-operator.copri-bike.de
|
||||
ServerAdmin info@gnu-systems.de
|
||||
DocumentRoot /var/www/copri4/shareedms-operator
|
||||
|
||||
|
||||
PerlOptions +Parent
|
||||
PerlRequire /var/www/copri4/shareedms-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 /ajax_json>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::ajax_json
|
||||
</Location>
|
||||
|
||||
<Location /ajax_post>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::ajax_post
|
||||
</Location>
|
||||
|
||||
<Location /FileOut>
|
||||
SetHandler perl-script
|
||||
PerlInitHandler Apache2::Reload
|
||||
PerlResponseHandler Mod::FileOut
|
||||
</Location>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RedirectMatch ^/$ /DMS/Mietjournal
|
||||
SSLProxyEngine On
|
||||
RewriteCond %{REQUEST_URI} ^/(site|img|data|css|js|jquery)
|
||||
RewriteRule ^(.*)$ https://shareedms-operator1.copri-bike.de/$1 [P,L]
|
||||
</IfModule>
|
||||
|
||||
ErrorLog /var/log/apache2/shareedms-operator-error.log
|
||||
LogLevel info ssl:warn
|
||||
CustomLog /var/log/apache2/shareedms-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/shareedms-operator/css/bootstrap-icons-1.5.0
Symbolic link
1
copri4/shareedms-operator/css/bootstrap-icons-1.5.0
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/css/bootstrap-icons-1.5.0
|
1
copri4/shareedms-operator/css/favicon.ico
Symbolic link
1
copri4/shareedms-operator/css/favicon.ico
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/css/favicon.ico
|
1
copri4/shareedms-operator/css/local_style_2.css
Symbolic link
1
copri4/shareedms-operator/css/local_style_2.css
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/css/local_style_2.css
|
1
copri4/shareedms-operator/glyphicons
Symbolic link
1
copri4/shareedms-operator/glyphicons
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/glyphicons
|
1
copri4/shareedms-operator/img
Symbolic link
1
copri4/shareedms-operator/img
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/img
|
1
copri4/shareedms-operator/js
Symbolic link
1
copri4/shareedms-operator/js
Symbolic link
|
@ -0,0 +1 @@
|
|||
../main/js
|
1
copri4/shareedms-operator/pdfinvoice
Symbolic link
1
copri4/shareedms-operator/pdfinvoice
Symbolic link
|
@ -0,0 +1 @@
|
|||
pdf
|
2
copri4/shareedms-operator/robots.txt
Executable file
2
copri4/shareedms-operator/robots.txt
Executable file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow: /
|
82
copri4/shareedms-operator/src/Lib/Config.pm
Normal file
82
copri4/shareedms-operator/src/Lib/Config.pm
Normal file
|
@ -0,0 +1,82 @@
|
|||
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_dms}";
|
||||
my $metahost = $globalconf{operator}{sharee_operator}->{operatorDMS1};
|
||||
|
||||
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}->{operatorDMS},
|
||||
praefix => $globalconf{operator}{sharee_operator}{database}->{dbname},
|
||||
systype => "sharee",#(azn)
|
||||
mandant => $globalconf{shareedms_conf}->{parent_node},
|
||||
start => $globalconf{shareedms_conf}->{start},
|
||||
profile => $globalconf{shareedms_conf}->{profile},
|
||||
|
||||
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 => "dms",
|
||||
term_active_color => "#$globalconf{shareedms_conf}->{term_active_color}",
|
||||
background_image => "",
|
||||
background_size => "cover",
|
||||
background_color => "#5c5c5c",
|
||||
background_color2 => "#a7a18f",
|
||||
background_align => "center",
|
||||
background_repeat => "no-repeat",
|
||||
font_family => "Arial",
|
||||
font_size => "100.01%",
|
||||
line_height => "1",
|
||||
basedir => "$basedir",
|
||||
csv => "$basedir/csv",
|
||||
pdf => "$basedir/pdf",
|
||||
data => "$basedir/data",
|
||||
xmlfile => "$basedir/xml",
|
||||
ftp_getfile => "ftp/SWK_codes/got_last.csv",
|
||||
ftp_putfile => "ftp/SWK_return/konrad_code_protokoll.csv",
|
||||
map_activ => "",
|
||||
min_width => "1100",
|
||||
head_logo => "$metahost/img/sharee_bike_Logo.jpg",
|
||||
barcode => "",
|
||||
limit => "200",
|
||||
waren_main_id => $globalconf{shareedms_conf}->{waren},
|
||||
Zahlungsweise => "SEPA-Lastschrift (payone)|Kreditkarte (payone)|Zahlungseingang (payone txid)|Abbuchung|Bar|EC-Karte|Überweisung|Zahlungsausfall",
|
||||
order_state => "|angerufen|eMail gesendet|in Arbeit|an FiBu delegiert|txid renewed|cronjob fail|payone Mahnung|COPRI Mahnung",
|
||||
'Ziel Datei' => "privacy.html|agb.html|impress.html|tariff_info.html|bike_info.html",
|
||||
printer => "PDF"
|
||||
);
|
||||
return %varenv;
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
371
copri4/shareedms-operator/src/Lib/Mlogic.pm
Normal file
371
copri4/shareedms-operator/src/Lib/Mlogic.pm
Normal file
|
@ -0,0 +1,371 @@
|
|||
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 Config::General;
|
||||
use Mod::Buttons;
|
||||
use Mod::Libenz;
|
||||
use Mod::Libenzdb;
|
||||
use Mod::DBtank;
|
||||
use POSIX;
|
||||
use Data::Dumper;
|
||||
|
||||
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 $q = new CGI;
|
||||
my $lb = new Libenz;
|
||||
my $db = new Libenzdb;
|
||||
my $dbt = new DBtank;
|
||||
my $but = new Buttons;
|
||||
my %ib = $but->ibuttons();
|
||||
my $script = $q->script_name();
|
||||
my $path_info = $q->path_info();
|
||||
my $path = $path_info;
|
||||
if("$varenv->{metahost}"){
|
||||
$path = "$script" . "$path_info";
|
||||
$script="";
|
||||
}
|
||||
my $coo = $q->cookie(-name=>'domcookie');
|
||||
my $debug = "";
|
||||
my $lang = "de";
|
||||
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
|
||||
my $view_root = $viewsel[0] || "";
|
||||
my $mandant = $db->get_node("$view_root","$lang");
|
||||
my $parent_id = $node_meta->{parent_id};
|
||||
my $main_id = $node_meta->{main_id};
|
||||
|
||||
my $title = "";
|
||||
$title .= $dbt->{primary}->{$varenv->{dbname}}->{pprefix} if($dbt->{primary}->{$varenv->{dbname}}->{pprefix});
|
||||
$title .= $dbt->{operator}->{$varenv->{dbname}}->{project} if($dbt->{operator}->{$varenv->{dbname}}->{project});
|
||||
$title .= " " . $dbt->{operator}->{$varenv->{dbname}}->{oprefix} if($dbt->{operator}->{$varenv->{dbname}}->{oprefix});
|
||||
$title .= $dbt->{website}->{$varenv->{syshost}}->{project} if($dbt->{website}->{$varenv->{syshost}}->{project});
|
||||
$title .= " DEVEL $varenv->{dbname}" if($dbt->{copri_conf}->{stage} eq "test");
|
||||
|
||||
|
||||
###User Panel
|
||||
if($users_dms->{u_id}){
|
||||
|
||||
###header start
|
||||
print "<div style='position:fixed;z-index:10;left:0px;width:100%;height:24px;background-color:$varenv->{background_color};'>\n";
|
||||
print "<div style='position:fixed;z-index:10;right:0px;'>\n";
|
||||
|
||||
#cleanup
|
||||
if(!$mandant->{node_name} || "$mandant->{node_name}" ne "$users_dms->{fullurl}"){
|
||||
$db->cleanup_users($users_dms->{owner}) if($users_dms->{owner});
|
||||
}
|
||||
|
||||
if($users_dms->{c_id4trans} && $users_dms->{tpl_id4trans} && $users_dms->{kind_of_trans}){
|
||||
my $table = "contenttrans";
|
||||
if($users_dms->{kind_of_trans} =~ /Veranstaltung|Proje/){
|
||||
$table = "contenttver";
|
||||
}
|
||||
|
||||
my $limit = $R::limit || $varenv->{limit};
|
||||
my $offset = $R::offset || "0";
|
||||
if($R::go && $R::go eq "backward_list"){
|
||||
$offset -= $limit if($offset >= $limit);
|
||||
}elsif($R::go && $R::go eq "forward_list"){
|
||||
$offset += $limit;
|
||||
}
|
||||
my $ctrel = $db->get_ctrel($table,"",$lang,"",$users_dms->{c_id4trans},$users_dms->{tpl_id4trans});
|
||||
my $uri = "/$users_dms->{fullurl}/$users_dms->{kind_of_trans}";
|
||||
print $q->div({-id=>'Headerlogin',-style=>"background-color:$varenv->{term_active_color};"},$q->a({-class=>'elinkbutton1',-title=>"$users_dms->{kind_of_trans} Terminal öffnen",-href=>"$uri?ct_trans=open\&c_id4trans=$users_dms->{c_id4trans}\&tpl_id4trans=$users_dms->{tpl_id4trans}\&kind_of_trans=$users_dms->{kind_of_trans}\&owner=$users_dms->{owner}\&offset=$offset\&limit=$limit\&relids=$R::relids\&no_redirect=1"}," $users_dms->{kind_of_trans} \#$ctrel->{ct_name} $ctrel->{txt01}", $q->span({-id=>"c_id4trans", -style=>"color:$varenv->{term_active_color}"}, "$users_dms->{c_id4trans}"))) if($ctrel->{ct_name});
|
||||
}
|
||||
|
||||
print $q->div({-id=>'Headerlogin'},"$users_sharee->{txt08} ", $q->span({-id=>"owner", -style=>"color:silver"}, "($users_dms->{u_id})")),"\n";
|
||||
print $q->div({-id=>'Headerlogin'},$q->a({-href=>"logout"},$q->img({-style=>'padding:0px 10px;',-src=>"$varenv->{metahost}/img/logout.svg"}))),"\n";
|
||||
print "</div>";
|
||||
print "</div>";
|
||||
}
|
||||
#end user panel
|
||||
###header end
|
||||
|
||||
|
||||
#Mainlogin
|
||||
if(!$users_dms->{u_id}){
|
||||
|
||||
print "<div id='ContentLogin'>\n";
|
||||
|
||||
print $q->start_multipart_form(-id=>'authform', -name=>'loginscreen'),"\n";
|
||||
print $q->hidden(-name=>"sessionid",-override=>1,-value=>"$R::sessionid");
|
||||
|
||||
print "<div class='form-group'>\n";
|
||||
#Login
|
||||
print $q->div({-class=>'content2'}, "Zugang zum $title"),"\n";
|
||||
print $q->div({-style=>'color:#c83434'},"Login failure"),"\n" if("$R::login_dms" eq "Login" && !$users_dms->{u_id});
|
||||
print $q->label({-for=>'Userid'},""),"\n";
|
||||
print $q->textfield(-class=>'form-control', -name=>'user_id', -value=>'', -override=>1, -type=>'email',-class=>'form-control', -id=>'Userid', -placeholder=>'NutzerIn', -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=>'PW', -placeholder=>'Passwort', -required=>1),"\n";
|
||||
print $q->div({-style=>'margin-top:1em;'},"<button type='submit' name='login_dms' value='Login' class='btn btn-primary btn-lg btn-block'>Login</button>"),"\n";
|
||||
|
||||
print "</div>\n";
|
||||
print $q->end_form,"\n";
|
||||
print "</div>";
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if($users_dms->{u_id} && $main_id){
|
||||
$return = $lb->return_feedback($return,$users_dms->{kind_of_trans},$users_dms->{owner}) if($return !~ /shareejson/);
|
||||
|
||||
if($main_id >= "100000"){
|
||||
my $mstyle="";
|
||||
|
||||
###Top Menu
|
||||
#bootstrap menue
|
||||
print "<nav class='navbar navbar-expand-md navbar-dark bg-dark fixed-top' style='top:23px;opacity:0.85;'>\n";
|
||||
print "<div class='container-fluid'>\n";
|
||||
print "<button class='navbar-toggler' type='button' data-bs-toggle='collapse' data-bs-target='#navbarsDefault' aria-controls='navbarsDefault' aria-expanded='false' aria-label='Toggle navigation'>\n";
|
||||
print "<span class='navbar-toggler-icon'></span>\n";
|
||||
print "</button>\n";
|
||||
print $q->div({-id=>'Headerlogo'},$q->a({-class=>'navbar-brand',-style=>"color:black;",-href=>"$varenv->{wwwhost}"}, $q->img({ -style=>"height:25px",-src=>"$varenv->{head_logo}"}), "c o p r i" ,$q->div({-style=>'font-size:0.71em;'}, "$title"))),"\n";
|
||||
my $node = $db->collect_noderel($dbt->{shareedms_conf}->{parent_id},$lang,$users_dms->{u_id});
|
||||
|
||||
print "<div class='collapse navbar-collapse' id='navbarsDefault'>\n";
|
||||
print "<ul class='navbar-nav me-auto mb-2 mb-md-0' style='padding:0 20px;text-align:left;'>\n";
|
||||
#print "<ul class='nav navbar-nav'>\n";
|
||||
|
||||
foreach my $id (sort {$node->{$a}->{n_sort} <=> $node->{$b}->{n_sort}} keys (%$node)){
|
||||
$node->{$id}->{node_path} = $node->{$id}->{node_name} if(!$node->{$id}->{node_path});
|
||||
my $lmenu0 = "";
|
||||
my $url = "";
|
||||
my $mclass = "";
|
||||
my $mstyle = "";
|
||||
if("$node->{$id}->{node_name}" eq "$viewsel[1]"){
|
||||
$mclass = "active";
|
||||
$mstyle = "color:white;";
|
||||
$parent_id = $node->{$id}->{parent_id};
|
||||
$main_id = $node->{$id}->{main_id};
|
||||
}
|
||||
if($node->{$id}->{main_id} && $node->{$id}->{node_name} =~ /$dbt->{shareedms_conf}->{mod_active}/){
|
||||
my $topath = "/$viewsel[0]/$node->{$id}->{node_path}";
|
||||
#
|
||||
#0. menue
|
||||
my $aclass = "dropdown-item";
|
||||
$aclass = "nav-link" if($node->{$id}->{node_name} =~ /Mietjourna|Alarmjournal/);
|
||||
if($users_dms->{u_id} && ($users_dms->{int01} == 2 && $node_meta->{ct_table} =~ /content$/) || ($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id})){
|
||||
my $url = "$topath/maintainer?node2edit=edit_relation\&main_id=$node->{$id}->{main_id}";
|
||||
$lmenu0 = $but->event_button("$topath","$node->{$id}->{node_name}","$node->{$id}->{main_id}","$aclass $mclass","","$users_dms->{u_id}","$url");
|
||||
}else{
|
||||
$lmenu0 = $but->lo_button("$topath","$node->{$id}->{node_name}","$node->{$id}->{main_id}","$aclass $mclass","","$users_dms->{u_id}");
|
||||
}
|
||||
|
||||
#1. submenu
|
||||
my $subs1=0;
|
||||
my $node1 = $db->collect_noderel($node->{$id}->{main_id},$lang,$users_dms->{u_id});
|
||||
foreach my $id1 (sort {$node1->{$a}->{n_sort} <=> $node1->{$b}->{n_sort}} keys (%$node1)){
|
||||
$subs1=1 if($node1->{$id1}->{main_id});
|
||||
}
|
||||
|
||||
#1. submenue
|
||||
#if($subs1 && ($node->{$id}->{node_name} !~ /Einstellung/ || $users_dms->{u_group} =~ /maintainer/)){
|
||||
if($subs1){
|
||||
#if(ref($node1) eq "HASH"){
|
||||
print "<li class='nav-item dropdown'>\n";#with integrated event_button
|
||||
print "<a class='nav-link dropdown-toggle $mclass' href='#' style='' id='navbarDropdown' role='button' data-bs-toggle='dropdown' aria-expanded='false'> $node->{$id}->{node_name} </a>\n";
|
||||
print "<ul class='dropdown-menu' aria-labelledby='navbarDropdown'>\n";
|
||||
print "<li class='nav-item'> $lmenu0 </li><li><hr class='dropdown-divider'></li>\n";
|
||||
my $lmenu1;
|
||||
foreach my $id1 (sort {$node1->{$a}->{n_sort} <=> $node1->{$b}->{n_sort}} keys (%$node1)){
|
||||
if(($node1->{$id1}->{node_name} !~ /Firma|System/) || ($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id})){
|
||||
my $node2 = $db->collect_noderel($node1->{$id1}->{main_id},$lang,$users_dms->{u_id});
|
||||
$mclass = "";
|
||||
$mstyle = "";
|
||||
if("$node1->{$id1}->{node_name}" eq "$viewsel[2]"){
|
||||
$mclass = "active";
|
||||
$mstyle = "color:white;";
|
||||
}
|
||||
if($users_dms->{u_id} && ($users_dms->{int01} == 2 && $node_meta->{ct_table} =~ /content$/) || ($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id})){
|
||||
my $url = "$topath/$node1->{$id1}->{node_path}/maintainer?node2edit=edit_relation\&main_id=$node1->{$id1}->{main_id}";
|
||||
$lmenu1 = $but->event_button("$topath/$node1->{$id1}->{node_path}","$node1->{$id1}->{node_name}","$node1->{$id1}->{main_id}","dropdown-item $mclass","","$users_dms->{u_id}","$url");
|
||||
}else{
|
||||
$lmenu1 = $but->lo_button("$topath/$node1->{$id1}->{node_path}","$node1->{$id1}->{node_name}","$node1->{$id1}->{main_id}","dropdown-item $mclass","","$users_dms->{u_id}");
|
||||
}
|
||||
|
||||
print "<li class='nav-item'> $lmenu1 </li>\n";
|
||||
|
||||
#2. submenu (services content)
|
||||
if(ref($node2) eq "HASH"){
|
||||
my $lmenu2;
|
||||
foreach my $id2 (sort {$node2->{$a}->{n_sort} <=> $node2->{$b}->{n_sort}} keys (%$node2)){
|
||||
my $parent_node4rel = $db->get_node4rel($node2->{$id2}->{parent_id},"","","null");
|
||||
#because of don't view Service Attribut on Einste.
|
||||
if($parent_node4rel->{template_id} =~ /205|225/){
|
||||
#if(1==1){
|
||||
$mclass = "";
|
||||
$mstyle = "";
|
||||
if("$node2->{$id2}->{node_name}" eq "$viewsel[3]"){
|
||||
$mclass = "active";
|
||||
$mstyle = "color:white;";
|
||||
}
|
||||
if($users_dms->{u_id} && ($users_dms->{int01} == 2 && $node_meta->{ct_table} =~ /content$/) || ($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id})){
|
||||
my $url = "$topath/$node1->{$id1}->{node_path}/$node2->{$id2}->{node_path}/maintainer?node2edit=edit_relation\&main_id=$node2->{$id2}->{main_id}";
|
||||
$lmenu2 = $but->event_button("$topath/$node1->{$id1}->{node_path}/$node2->{$id2}->{node_path}","$node2->{$id2}->{node_name}","$node2->{$id2}->{main_id}","dropdown-item $mclass","","$users_dms->{u_id}","$url");
|
||||
}else{
|
||||
$lmenu2 = $but->lo_button("$topath/$node1->{$id1}->{node_path}/$node2->{$id2}->{node_path}","$node2->{$id2}->{node_name}","$node2->{$id2}->{main_id}","dropdown-item $mclass","","$users_dms->{u_id}");
|
||||
}
|
||||
print "<div class='nav-item' style='margin-left:25px;'> $lmenu2 </div>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
print "</ul>\n";
|
||||
print "</li>\n";
|
||||
#end submenu
|
||||
#}elsif($node->{$id}->{node_name} !~ /Einstellung/ || $users_dms->{u_group} =~ /maintainer/){
|
||||
}elsif(1==1){
|
||||
print "<li class='nav-item'> $lmenu0 </li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}#end foreach lmenue0
|
||||
print "</ul>\n";
|
||||
print "</div></div></nav>\n";
|
||||
###end bootstrap menue
|
||||
|
||||
#node_name=DMS
|
||||
if($varenv->{dbname} eq "sharee_primary" && $main_id == "100002"){
|
||||
my $big2menu="";
|
||||
while (my ($key, $value) = each %{ $dbt->{operator} }) {
|
||||
if($value->{operatorApp}){
|
||||
$big2menu .= $but->lia_button("$value->{operatorDMS}","$key","","","","");
|
||||
}
|
||||
}
|
||||
print $q->div({-style=>'width:100%;margin:0;padding-top:90px;color:white;'}, "sharee.bike Operatoren"),"\n";
|
||||
print $q->div({-style=>'width:100%;margin:0;'}, $q->ul({-id=>'BigNavi'},$big2menu)),"\n";
|
||||
}
|
||||
|
||||
print "<div id='Mlogic'>\n";
|
||||
#lefsitemenue disabled 2021-06.03
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
$debug = "(c_id4trans:$users_dms->{c_id4trans} && tpl_id4trans:$users_dms->{tpl_id4trans} && kind_of_trans:$users_dms->{kind_of_trans}) $node_meta->{tpl_name},$node_meta->{tpl_id},$node_meta->{ct_table},$parent_id,$main_id, permissions: ($users_dms->{int01},$users_dms->{int02},$users_dms->{int03},$users_dms->{int07},$users_dms->{int08},$users_dms->{int09})" if($users_dms->{u_id} == $dbt->{copri_conf}->{superu_id});
|
||||
print $q->div({-style=>'position:fixed;bottom:0%;right:1%;z-index:10;padding:2px;font-size:13px;'},"$debug",$q->a({-style=>'color:black;text-decoration: none;',-href=>'https://sharee.bike',-target=>'_blank'},"sharee.bike © TeilRad GmbH 2021")),"\n";
|
||||
|
||||
|
||||
#update c_id4trans on changing browser tab 2019-10-08
|
||||
#FIXME, we need all $R::c_id4trans,$R::tpl_id4trans,$R::kind_of_trans
|
||||
if(1==2 && $mode eq "manager"){
|
||||
print<<EOF
|
||||
<script>
|
||||
|
||||
function postc_id4trans(c_val,o_val) {
|
||||
\$.ajax({
|
||||
url: '$varenv->{wwwhost}/ajax_post',
|
||||
type: 'POST',
|
||||
async: true,
|
||||
cache: false,
|
||||
data: { c_id4trans: c_val, owner: o_val },
|
||||
});
|
||||
}
|
||||
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
if(document.visibilityState != 'hidden') {
|
||||
var c_id4trans = document.getElementById("c_id4trans").innerText;
|
||||
var owner = document.getElementById("owner").innerText;
|
||||
if(c_id4trans){
|
||||
postc_id4trans(c_id4trans,owner);
|
||||
}
|
||||
console.log("postc_id4trans:" + c_id4trans + " " + owner);
|
||||
}
|
||||
}, false);
|
||||
|
||||
</script>
|
||||
|
||||
EOF
|
||||
;
|
||||
}
|
||||
|
||||
$self->tplselect($node_meta,$users_dms,$mode,$varenv,$return);
|
||||
print "</div>\n";
|
||||
}#end logedin environment
|
||||
|
||||
}
|
||||
|
||||
#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 $return = shift || "";
|
||||
|
||||
my $sort = "";
|
||||
my $lang = "de";
|
||||
my $tpl_name = $node_meta->{tpl_name};
|
||||
my $tpl_id = $node_meta->{tpl_id};
|
||||
my $ct_table = $node_meta->{ct_table};
|
||||
my $parent_id = $node_meta->{parent_id};
|
||||
my $main_id = $node_meta->{main_id};
|
||||
my $u_id = $users_dms->{u_id};
|
||||
#print Dumper($node_meta);
|
||||
#exit;
|
||||
|
||||
print <<EOF
|
||||
<script>
|
||||
\$(function(){
|
||||
\$('.autos').autosize({append: '\\n'});
|
||||
});
|
||||
</script>
|
||||
EOF
|
||||
;
|
||||
|
||||
if($mode eq "supervisor" || $node_meta->{tpl_name} eq "AttributMatrix"){
|
||||
$tpl_name = "AttributMatrix";
|
||||
require "Tpl/AttributMatrix.pm";
|
||||
$return = &AttributMatrix::tpl($node_meta,$users_dms,$mode,$return);
|
||||
#}elsif($tpl_id && $tpl_id >= 400 && $tpl_id <= 699){#contentpos or contentadrpos
|
||||
}elsif($node_meta->{ct_table} =~ /contentpos|contentadrpos|users$/){#contentpos or contentadrpos
|
||||
require "Tpl/SubListe.pm";
|
||||
$return = &SubListe::tpl($node_meta,$users_dms,$mode,$return);
|
||||
}elsif($node_meta->{ct_table} =~ /content$|contentadr$|contenttrans$/){
|
||||
require "Tpl/Liste3.pm";
|
||||
$return = &Liste3::tpl($node_meta,$users_dms,$mode,$return);
|
||||
}elsif($node_meta->{ct_table} eq "contentuser"){
|
||||
require "Tpl/MandantConf.pm";
|
||||
$return = &MandantConf::tpl($node_meta,$users_dms,$mode,$return);
|
||||
#}elsif($tpl_name =~ /Statistik/){
|
||||
#require "Tpl/Statistik.pm";
|
||||
#&Statistik::tpl($main_id,$u_id,$lang,"","",$sort);
|
||||
}elsif($node_meta->{ct_table} =~ /contenttranspos|contenttheftpos/){
|
||||
require "Tpl/Calorin.pm";
|
||||
&Calorin::tpl($node_meta,$users_dms,$mode,$return);
|
||||
}
|
||||
##Modalbox things##
|
||||
if($return !~ /failure/){
|
||||
if(($R::ct_trans !~ /close/) && ($ct_table =~ /contenttrans/ || $R::kind_of_trans =~ /Faktur|Verleih/) && ($R::ct_trans || $R::trans2edit || $R::ctpos_activ || $R::select_part || $R::set_main_id)){
|
||||
&Modalbox::mobox($node_meta,$users_dms,$mode,$return);
|
||||
}elsif(($R::ct_trans !~ /close/) && ($ct_table =~ /content$|contentadr|contenttver|contentpos|users$/ && ($R::ct_trans || $R::rel_edit || $R::base_edit)) || ($R::node2edit && $R::node2edit =~ /edit/)){
|
||||
&Modalbox3::mobox3($node_meta,$users_dms,$mode,$return) if($R::rel_edit !~ /delete|save/ && $R::ct_trans !~ /delete/ && $R::base_edit !~ /delete|save/ && !$R::service_id);
|
||||
}
|
||||
}
|
||||
|
||||
if($return =~ /failure/){
|
||||
require "Mod/Failure.pm";
|
||||
&Failure::tpl("",$u_id,"","","","",$return);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
1
copri4/shareedms-operator/src/Lib/PDFGenerator.pm
Symbolic link
1
copri4/shareedms-operator/src/Lib/PDFGenerator.pm
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../main/src/Lib/PDFGenerator.pm
|
1
copri4/shareedms-operator/src/Lib/Printpreview.pm
Symbolic link
1
copri4/shareedms-operator/src/Lib/Printpreview.pm
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../main/src/Lib/Printpreview.pm
|
1
copri4/shareedms-operator/src/Mod
Symbolic link
1
copri4/shareedms-operator/src/Mod
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/Mod
|
1
copri4/shareedms-operator/src/Tpl
Symbolic link
1
copri4/shareedms-operator/src/Tpl
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/Tpl
|
1
copri4/shareedms-operator/src/scripts
Symbolic link
1
copri4/shareedms-operator/src/scripts
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/scripts
|
1
copri4/shareedms-operator/src/wkhtmltopdf-amd64
Symbolic link
1
copri4/shareedms-operator/src/wkhtmltopdf-amd64
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../main/src/wkhtmltopdf-amd64
|
2
copri4/shareedms-operator/startup.pl
Executable file
2
copri4/shareedms-operator/startup.pl
Executable file
|
@ -0,0 +1,2 @@
|
|||
use lib qw(/var/www/copri4/shareedms-operator/src);
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue