From 3470e2605595bf52b3ba07bf0b3886e5a61d3e06 Mon Sep 17 00:00:00 2001 From: Darkelarious Date: Sun, 5 Sep 2021 20:35:44 +0200 Subject: first version of masterinterface --- s/masterinterface.pl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 s/masterinterface.pl (limited to 's/masterinterface.pl') diff --git a/s/masterinterface.pl b/s/masterinterface.pl new file mode 100755 index 0000000..253ff93 --- /dev/null +++ b/s/masterinterface.pl @@ -0,0 +1,37 @@ +#!/usr/bin/perl +package MasterWebInterface; +use strict; +use warnings; +use Data::Dumper 'Dumper'; +use Cwd 'abs_path'; + +our $ROOT; +BEGIN { ($ROOT = abs_path $0) =~ s{/s/masterinterface.pl$}{}; } +use lib $ROOT.'/lib'; +use TUWF; + +# get settings and add these to the TUWF object +our %S = (root => $ROOT); +require "$ROOT/data/settings.pl"; + + +$TUWF::OBJ->{$_} = $S{$_} for (keys %S); + +# TUWF options +TUWF::set( + logfile => "$ROOT/log/TUWF.log", + mail_from => $S{email}, + db_login => $S{db_login}, + validate_templates => { # input templates + page => { template => 'uint', max => 1000 }, + }, + log_queries => 0, + debug => 1, +); + +#add %S from web-config.pl to OBJ +$TUWF::OBJ->{$_} = $S{$_} for (keys %S); + +TUWF::load_recursive('MasterWebInterface'); +TUWF::run(); + -- cgit v1.2.3