init III
This commit is contained in:
29
Perl CGI C2/admin/save_todo.pl
Normal file
29
Perl CGI C2/admin/save_todo.pl
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/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";
|
||||
Reference in New Issue
Block a user