mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-11 06:17:27 +02:00
Initial commit
This commit is contained in:
parent
b686656e88
commit
5e91fe947d
177 changed files with 41037 additions and 0 deletions
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
|
Loading…
Add table
Add a link
Reference in a new issue