Files
scripts/Perl CGI C2/admin/save_todo.pl
2024-10-14 00:08:40 +02:00

29 lines
782 B
Perl

#!/bin/perl
use Mysql;
use strict;
use CGI qw(:standard);
my $host = param('host');
my $service = param('service');
my $alert = param('alert');
my $check = param('check');
my $descr = param('descr');
my $active = param('active');
my $dbh = DBI->connect("DBI:mysql:database=c2;host=localhost",'root','', {RaiseError => 1});
my ($sth,$ref);
print header();
print "<html>\n";
print "<head>\n";
print "<style type='text/css'>\n";
print "select { font-size:8pt }\n";
#print "td { font-size:10pt }\n";
print "</style>\n";
print "</head>\n";
print "<body>\n";
$dbh->do("insert into todos (t_host,t_service,t_check,t_alert,t_active,t_description) values ('$host','$service','$check','$alert','$active','$descr')");
print "</body>\n</html>\n";