Subversion Repositories computer_asset_manager_v1

Rev

Rev 9 | Rev 21 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 17
Line 1... Line 1...
1
#! /usr/bin/perl -w
1
#! /usr/bin/perl -w
2
 
2
 
-
 
3
#
-
 
4
# v0.8.1 20160218 RWR
-
 
5
# removed print statement to STDOUT (just commented it out)
-
 
6
#
-
 
7
 
3
use DBI;
8
use DBI;
4
use Cwd 'abs_path';
9
use Cwd 'abs_path';
5
#use Data::Dumper;
10
#use Data::Dumper;
6
use File::Basename;
11
use File::Basename;
7
use YAML::XS;
12
use YAML::XS;
8
 
13
 
9
 
14
 
10
my $VERSION = '0.8';
15
my $VERSION = '0.8.1';
11
my $MY_DIRECTORY = abs_path(dirname(__FILE__) );
16
my $MY_DIRECTORY = abs_path(dirname(__FILE__) );
12
my $message; # the message to send
17
my $message; # the message to send
13
my $query = qq/select
18
my $query = qq/select
14
                  sysinfo_report.sysinfo_report_id 'ID', 
19
                  sysinfo_report.sysinfo_report_id 'ID', 
15
                  sysinfo_report.report_date 'Date',
20
                  sysinfo_report.report_date 'Date',
Line 107... Line 112...
107
foreach my $id ( keys %$results ) {
112
foreach my $id ( keys %$results ) {
108
   $message .= $results->{$id}->{Date} . "\t" . $results->{$id}->{Client} . "\t" . $results->{$id}->{Device} . "\n";
113
   $message .= $results->{$id}->{Date} . "\t" . $results->{$id}->{Client} . "\t" . $results->{$id}->{Device} . "\n";
109
   $message .= $results->{$id}->{Notes} . "\n\n";
114
   $message .= $results->{$id}->{Notes} . "\n\n";
110
}
115
}
111
$dbh->disconnect();
116
$dbh->disconnect();
112
print $message;
117
#print $message;
113
&sendReport( $$configuration{'sendReport'}, $message );
118
&sendReport( $$configuration{'sendReport'}, $message );
114
 
119
 
115
1;
120
1;