operator standalone fix and adding example db.sql

This commit is contained in:
ragu 2022-11-17 20:36:53 +01:00
parent 5b32d2b7f5
commit 941f8a04aa
17 changed files with 44 additions and 96 deletions

2
.gitignore vendored
View file

@ -2,9 +2,7 @@ cache/
data/
pdf/
cache/
*.kml
*.html
*.sql.gz
xml/
csv/
ftp/

View file

@ -1,2 +0,0 @@
User-agent: *
Disallow: /

0
copri4/main/src/Mod/APIshareeio.pm Normal file → Executable file
View file

View file

@ -123,11 +123,10 @@ sub update_operatorsloop {
c_id => "$adrc_id",
};
my $dbh_primary = $self->dbconnect_extern($self->{primary}->{sharee_primary}->{database}->{dbname});
my $source_primary = $dbh_primary->get_info( $GetInfoType{SQL_DATABASE_NAME} );
my $record_primary = { c_id => 0 };
$record_primary = $self->fetch_record($dbh_primary,$authref) if($adrc_id && $adrc_id > 0);
$bw->log("update_operatorsloop by copri_instance-dbname: $dbname | owner: $record_primary->{owner} | get_info-dbname: $source_primary","","");
$bw->log("update_operatorsloop by copri_instance-dbname: $dbname | owner: $record_primary->{owner}","","");
my $rows = 0;
if($record_primary->{c_id}){
@ -165,7 +164,7 @@ sub update_operatorsloop {
%$record_primary,
table => "contentadr",
};
$bw->log("--> save_account update_operatorsloop $sharee_operator by $source_primary",$update->{c_id},"");
$bw->log("--> save_account update_operatorsloop $sharee_operator",$update->{c_id},"");
$bw->log("UPDATE adr from record_primary to operator on loop $sharee_operator",$record_primary->{c_id},"");
$rows = $self->update_record($dbh_operator,$update,$record_primary);
@ -385,12 +384,24 @@ sub collect_node {
return ($nodes,$rows);
}
#
#only used by dead_relation
sub collect_relation {
my $self = shift;
my $dbh = shift || $dbh_intern;
my $main_id = shift || "";
my $sth = $dbh->prepare("SELECT * FROM relation");
my $where = shift || "1=1";
my $sth = $dbh->prepare("SELECT * FROM relation where $where");
my $rc = $sth->execute();
my $rel = $sth->fetchall_hashref("rel_id");
return $rel;
}
#not used
sub collect_relct {
my $self = shift;
my $dbh = shift || $dbh_intern;
my $ref = shift;
my $sth = $dbh->prepare("SELECT * FROM relation rel, $ref->{table} c where rel.content_id > 0 and rel.template_id=224 and rel.content_id=c.c_id order by rel.content_id");
my $rc = $sth->execute();
my $rel = $sth->fetchall_hashref("rel_id");
return $rel;

View file

@ -56,7 +56,7 @@ sub managemandate_main {
my $ctt = shift || "";
my $owner = shift || 0;
my $payoneret = "";
my $payone_conf = $dbt->{operator}->{$varenv->{dbname}}->{payone_conf} || $dbt->{payone_conf};
my $payone_conf = $dbt->{operator}->{$varenv->{dbname}}->{payone_conf} || {};
if($ctadr->{c_id}){
my $lastname = $ctadr->{txt01};

View file

@ -377,10 +377,10 @@ EOF
}
$ctt->{txt23} = $q->unescapeHTML("$ctt->{txt23}") if($ctt->{txt23});
print $q->Tr(),"\n";
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>8, -columns=>90)),"\n";
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt23', -default=>"$ctt->{txt23}", -rows=>8, -columns=>65)),"\n";
$ctt->{txt12} = $q->unescapeHTML($ctt->{txt12}) || "";
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>8, -columns=>70)),"\n";
print $q->td({-class=>'tdval5',-colspan=>'2'},$q->textarea(-class=>'etxt',-name=>'txt12', -default=>"$ctt->{txt12}", -rows=>8, -columns=>65)),"\n";
print $q->Tr(),"\n"; $line_count1++;
my @line_txt12 = split(/\n/,$ctt->{txt12});

View file

@ -239,6 +239,18 @@ sub tpl(){
@tpl_order = split /,/,$tpl->{tpl_order};
}
elsif($node_meta->{node_name} =~ /Mahnung/){
$R::detail_search="search";
$searchref->{txt19} = "%Mahnung";
$R::todo="Filter";
$message .= "";
$offset=0;
$limit=1000;
$tplids = "209,218";
my $tpl = $dbt->get_tpl($dbh,209);
@tpl_order = split /,/,$tpl->{tpl_order};
}
elsif(!$R::detail_search && -f $hashfile && $node_meta->{node_name} =~ /letzte Suche/){
$R::todo="Filter";
$message .= ">>> es wurden die letzten Suchparameter oder Filter geladen <<<";
@ -545,7 +557,7 @@ sub tpl(){
foreach(@tpl_order){
$h++;
my ($key,$val,$size) = split /=/,$_;
if($size ne "select"){
if($size !~ /select/){
if($size =~ /area/){
$size = "5em";
}elsif($key =~ /int0|c_id|ct_name/){

View file

@ -1,2 +0,0 @@
use lib qw(/var/www/copri4/main/src);
1;

View file

@ -33,54 +33,3 @@ for i in $(find . -type d -and -name cronjobs); do chmod -R o+r $i/*;done
for i in $(find . -type d -and -name cronjobs); do chown -R root:root $i/*;done
live_sharee="ginger"
echo "You are on Server with hostname: $(hostname)";
echo "on main gitlab sourcen there is no live config";
#sharee
echo "KEEP in mind, SHAREE autoLinking is only done if $(hostname) == ${live_sharee}";
if [[ $(hostname) == ${live_sharee} ]]
then
#shareedms-operator
echo "";
for i in $(find . -type l -and -name shareedms-operator.conf); do rm $i;done
for i in $(find . -type f -and -name shareedms-operator_live.conf)
do (
echo $(dirname $(realpath $i));
cd $(dirname $(realpath $i));
ln -s $(basename $i) shareedms-operator.conf;
ls -al
)
done
#shareeapp-operator
echo "";
for i in $(find . -type l -and -name shareeapp-operator.conf); do rm $i;done
for i in $(find . -type f -and -name shareeapp-operator_live.conf)
do (
echo $(dirname $(realpath $i));
cd $(dirname $(realpath $i));
ln -s $(basename $i) shareeapp-operator.conf;
ls -al
)
done
#shareeweb-project
echo "";
for i in $(find . -type l -and -name shareeweb-project.conf); do rm $i;done
for i in $(find . -type f -and -name shareeweb-project_live.conf)
do (
echo $(dirname $(realpath $i));
cd $(dirname $(realpath $i));
ln -s $(basename $i) shareeweb-project.conf;
ls -al
)
done
fi

View file

@ -9,7 +9,6 @@ use CGI ':standard';
use Lib::Config;
use Mod::Buttons;
use Mod::Libenz;
use Mod::Libenzdb;
use Mod::DBtank;
use Mod::APIfunc;
use Mod::Pricing;
@ -33,12 +32,11 @@ sub tpl(){
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 $dbh = "";
my $script = $q->script_name();
my $user_agent = $q->user_agent();
@ -51,14 +49,12 @@ sub tpl(){
$path = "$script" . "$path_info";
$script="";
}
my %ib = $but->ibuttons_arch();
my $tpl = $db->get_tpl($node_meta->{tpl_id});
my $tpl = $dbt->get_tpl($dbh,$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});

View file

@ -9,7 +9,6 @@ use CGI ':standard';
use Lib::Config;
use Mod::Buttons;
use Mod::Libenz;
use Mod::Libenzdb;
use Mod::DBtank;
use Encode;
use Data::Dumper;
@ -34,7 +33,6 @@ sub tpl(){
my $cf = new Config;
my $but = new Buttons;
my $lb = new Libenz;
my $db = new Libenzdb;
my $dbt = new DBtank;
my $lang = "de";
@ -47,7 +45,6 @@ sub tpl(){
$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 =~ /^\/(.*)/);

View file

@ -13,7 +13,6 @@ 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;
@ -39,7 +38,6 @@ sub tpl(){
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;
@ -55,7 +53,6 @@ sub tpl(){
}
my $dbh = "";#$dbt->dbconnect();
my $user_agent = $q->user_agent();
my %ib = $but->ibuttons_arch();
my @viewsel = split /\//,$1 if($path =~ /^\/(.*)/);
my $red = "red";
@ -109,8 +106,6 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
$cttpos_count++;
}
#$ctt = $db->collect_content2("contenttrans","int10",$ctrel->{c_id}) if($ctrel->{c_id});
#
#loop operator hash to get invoices for each operator
my $ctt_all = {};
my $ctadrcoupon = {};
@ -147,15 +142,15 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit
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 $tpl = $dbt->get_tpl($dbh,$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);
$tpl01 = $dbt->get_tpl($dbh,$template01);
$tpl02 = $dbt->get_tpl($dbh,$template02);
@split_lates = ("$tpl01->{tpl_order}","$tpl02->{tpl_order}");
}
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;

View file

@ -1 +0,0 @@
../../../main/src/Tpl/Karte.pm

View file

@ -47,7 +47,6 @@ sub tpl(){
$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 =~ /^\/(.*)/);

View file

@ -8,9 +8,7 @@ use warnings;
use POSIX;
use CGI ':standard';
use Lib::Config;
use Mod::Buttons;
use Mod::Libenz;
use Mod::Libenzdb;
use Mod::DBtank;
use Tpl::AccountSubmenu;
use Tpl::PayoneSEPA;
use Tpl::PayoneCCclient;
@ -34,16 +32,14 @@ sub tpl(){
my $q = new CGI;
my $cf = new Config;
my $lb = new Libenz;
my $db = new Libenzdb;
my $but = new Buttons;
my $dbt = new DBtank;
my $submenu = new AccountSubmenu;
my $paySEPA = new PayoneSEPA;
my $payCC = new PayoneCCclient;
$q->import_names('R');
my @keywords = $q->param;
my $dbh = "";
my $script = $q->script_name();
my $path_info = $q->path_info();
my $path = $path_info;
@ -54,12 +50,10 @@ sub tpl(){
}
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 $tpl = $db->get_tpl($node_meta->{tpl_id});
my $tpl = $dbt->get_tpl($dbh,$node_meta->{tpl_id});
print "<div id='Contentapp'>\n";

View file

@ -244,6 +244,7 @@
waren = "200013"
kunden = "200011"
faktura = "200007"
invoice = "300008"
invoicejournal = "300011"
mietjournal = "200012"
alarmjournal = "200022"
@ -252,6 +253,7 @@
payment_state = "SEPA-Lastschrift (payone)|Kreditkarte (payone)|Überweisung|Gutschrift"
order_state = "|angerufen|eMail gesendet|in Arbeit|cronjob fail"
warning_state = "|1. Mahnung|2. Mahnung|3. Mahnung|4. Mahnung|5. Mahnung"
term_active_color = "f7ae37"
local_style = "css/local_style20221106.css"

Binary file not shown.