diff --git a/.gitignore b/.gitignore index 1e17e55..99c4468 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,7 @@ cache/ data/ pdf/ cache/ -*.kml *.html -*.sql.gz xml/ csv/ ftp/ diff --git a/copri4/main/robots.txt b/copri4/main/robots.txt deleted file mode 100755 index 1f53798..0000000 --- a/copri4/main/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: / diff --git a/copri4/main/src/Mod/APIshareeio.pm b/copri4/main/src/Mod/APIshareeio.pm old mode 100644 new mode 100755 diff --git a/copri4/main/src/Mod/DBtank.pm b/copri4/main/src/Mod/DBtank.pm index 2330cfc..e138d88 100755 --- a/copri4/main/src/Mod/DBtank.pm +++ b/copri4/main/src/Mod/DBtank.pm @@ -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; diff --git a/copri4/main/src/Mod/Payment.pm b/copri4/main/src/Mod/Payment.pm index e958061..9bf3b2c 100755 --- a/copri4/main/src/Mod/Payment.pm +++ b/copri4/main/src/Mod/Payment.pm @@ -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}; diff --git a/copri4/main/src/Tpl/Address3.pm b/copri4/main/src/Tpl/Address3.pm index 5bfe311..31ab90e 100755 --- a/copri4/main/src/Tpl/Address3.pm +++ b/copri4/main/src/Tpl/Address3.pm @@ -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}); diff --git a/copri4/main/src/Tpl/Liste3.pm b/copri4/main/src/Tpl/Liste3.pm index 37d1ff5..13be538 100755 --- a/copri4/main/src/Tpl/Liste3.pm +++ b/copri4/main/src/Tpl/Liste3.pm @@ -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/){ diff --git a/copri4/main/startup.pl b/copri4/main/startup.pl deleted file mode 100755 index 1a6f9c9..0000000 --- a/copri4/main/startup.pl +++ /dev/null @@ -1,2 +0,0 @@ -use lib qw(/var/www/copri4/main/src); -1; diff --git a/copri4/mkaccess.sh b/copri4/mkaccess.sh index e7fc6ef..12d2a91 100755 --- a/copri4/mkaccess.sh +++ b/copri4/mkaccess.sh @@ -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 - - diff --git a/copri4/shareeapp-operator/src/Tpl/Anmelden.pm b/copri4/shareeapp-operator/src/Tpl/Anmelden.pm index 88a2d0e..98ac3a6 100755 --- a/copri4/shareeapp-operator/src/Tpl/Anmelden.pm +++ b/copri4/shareeapp-operator/src/Tpl/Anmelden.pm @@ -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}); diff --git a/copri4/shareeapp-operator/src/Tpl/Contact.pm b/copri4/shareeapp-operator/src/Tpl/Contact.pm index e08e288..087e628 100755 --- a/copri4/shareeapp-operator/src/Tpl/Contact.pm +++ b/copri4/shareeapp-operator/src/Tpl/Contact.pm @@ -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 =~ /^\/(.*)/); diff --git a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm index 904d4cd..f252956 100755 --- a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm +++ b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm @@ -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; diff --git a/copri4/shareeapp-operator/src/Tpl/Karte.pm b/copri4/shareeapp-operator/src/Tpl/Karte.pm deleted file mode 120000 index 7c3f8ea..0000000 --- a/copri4/shareeapp-operator/src/Tpl/Karte.pm +++ /dev/null @@ -1 +0,0 @@ -../../../main/src/Tpl/Karte.pm \ No newline at end of file diff --git a/copri4/shareeapp-operator/src/Tpl/Listing.pm b/copri4/shareeapp-operator/src/Tpl/Listing.pm index 471bfd8..fab00d0 100755 --- a/copri4/shareeapp-operator/src/Tpl/Listing.pm +++ b/copri4/shareeapp-operator/src/Tpl/Listing.pm @@ -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 =~ /^\/(.*)/); diff --git a/copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm b/copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm index f187b21..1877f57 100755 --- a/copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm +++ b/copri4/shareeapp-operator/src/Tpl/PayoneSelect.pm @@ -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 "
\n"; diff --git a/copri4/shareeconf/examples/global.cfg b/copri4/shareeconf/examples/global.cfg index 18f6515..29413cf 100644 --- a/copri4/shareeconf/examples/global.cfg +++ b/copri4/shareeconf/examples/global.cfg @@ -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" diff --git a/copri4/shareeconf/examples/sharee_operator.sql.gz b/copri4/shareeconf/examples/sharee_operator.sql.gz new file mode 100644 index 0000000..b24abb5 Binary files /dev/null and b/copri4/shareeconf/examples/sharee_operator.sql.gz differ