29 lines
782 B
Perl
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"; |