#!/bin/perl use strict; use mysql; use CGI qw(:standard); my $edit = param('edit'); my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1}); my $ci=param('ci'); my $we=param('we'); my $wri=param('wri'); my $url=param('url'); my $urla=param('urla'); my $path=param('path'); my $roi=param('roi'); my $wt=param('wt'); my $starttime=param('starttime'); my $stoptime=param('stoptime'); print header(); print "\n"; print "
\n"; print "\n"; print "\n"; print "\n"; print "Konfig editieren\n"; if ($edit eq "") { my $sth = $dbh->prepare("select check_intervall,web_enable,web_refresh_intervall,web_link,web_template,runs_on_ip,config_url,start_time,stop_time,index_dir from conf"); $sth->execute; print "\n"; } else { if ($edit eq "Speichern") { $dbh->do("update conf set index_dir='$path',check_intervall='$ci',web_enable='$we',web_refresh_intervall='$wri',web_link='$url',web_template='$wt',runs_on_ip='$roi',config_url='$urla',start_time='$starttime',stop_time='$stoptime' where active='1'"); #print "update conf set check_intervall='$ci',web_enable='$we',web_refresh_intervall='$wri',web_link='$url',web_template='$wt',runs_on_ip='$roi',config_url='$urla' where active='1'"; # where active='1' print "