From: Metabox Date: Tue, 13 Aug 2019 21:03:14 +0000 (+1000) Subject: Implemented config rec. deletion, db fix. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=d88c863cd62d655d0330e2bcf84b911fe7db3a85;p=LifeLog.git Implemented config rec. deletion, db fix. --- diff --git a/htdocs/cgi-bin/config.cgi b/htdocs/cgi-bin/config.cgi index ac40062..d304e81 100755 --- a/htdocs/cgi-bin/config.cgi +++ b/htdocs/cgi-bin/config.cgi @@ -16,6 +16,7 @@ use DBI; use DateTime; use DateTime::Format::SQLite; use DateTime::Duration; +use Date::Language; use Text::CSV; #DEFAULT SETTINGS HERE! @@ -65,6 +66,7 @@ my $db = DBI->connect($dsn, $userid, $password, { RaiseError => 1 }) or die "

my $rv; my $dbs; my $today = DateTime->now; +my $lang = Date::Language->new($LANGUAGE); my $tz = $cgi->param('tz'); my $csvp = $cgi->param('csv'); @@ -89,50 +91,17 @@ $today->set_time_zone( $TIME_ZONE ); my $stmtCat = 'SELECT * FROM CAT ORDER BY ID;'; my $status = "Ready for change!"; - - +my $cats; +my %hshCats = {}; +&cats; ############### &processSubmit; ############### - - &getTheme; - $session->param("theme",$TH_CSS); $session->param("bgcolor",$BGCOL); +&getHeader; -print $cgi->header(-expires=>"+6s", -charset=>"UTF-8"); -print $cgi->start_html(-title => "Personal Log", -BGCOLOR=>"$BGCOL", - -onload => "loadedBody(false);", - -style => [ - { -type => 'text/css', -src => "wsrc/$TH_CSS" }, - { -type => 'text/css', -src => 'wsrc/jquery-ui.css' }, - { -type => 'text/css', -src => 'wsrc/jquery-ui.theme.css' }, - { - -type => 'text/css', - -src => 'wsrc/jquery-ui-timepicker-addon.css' - }, - { -type => 'text/css', -src => 'wsrc/tip-skyblue/tip-skyblue.css' }, - { - -type => 'text/css', - -src => 'wsrc/tip-yellowsimple/tip-yellowsimple.css' - }, - ], - -script => [ - { -type => 'text/javascript', -src => 'wsrc/main.js' }, - { -type => 'text/javascript', -src => 'wsrc/jquery.js' }, - { -type => 'text/javascript', -src => 'wsrc/jquery-ui.js' }, - { - -type => 'text/javascript', - -src => 'wsrc/jquery-ui-timepicker-addon.js' - }, - { - -type => 'text/javascript', - -src => 'wsrc/jquery-ui-sliderAccess.js' - }, - { -type => 'text/javascript', -src => 'wsrc/jquery.poshytip.js' } - ], - ); if ($ERROR){&error;}else{ print qq(