~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/webNLT.pl

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use DBI;
 
4
use CGI;
 
5
 
 
6
$q = new CGI;
 
7
print $q->header();
 
8
print $q->start_html(-title=>"Nightly Tester DB");
 
9
 
 
10
unless($q->param('pwd'))
 
11
  {
 
12
    print $q->startform();
 
13
    print $q->password_field(-name=>"pwd", -size=>20, -maxlength=>20);
 
14
    print $q->submit();
 
15
    print $q->endform();
 
16
  }
 
17
else
 
18
  {
 
19
    # database information
 
20
    $db="llvmalpha";
 
21
    $host="localhost";
 
22
    $userid="llvmdbuser";
 
23
    $passwd=$q->param('pwd');
 
24
    $connectionInfo="dbi:mysql:$db;$host";
 
25
    
 
26
    # make connection to database
 
27
    $dbh = DBI->connect($connectionInfo,$userid,$passwd) or die DBI->errstr;
 
28
    $query = "Select DISTINCT(NAME) from Tests";
 
29
    my $sth = $dbh->prepare($query) || die "Can't prepare statement: $DBI::errstr";
 
30
    my $rc = $sth->execute or die DBI->errstr;
 
31
    while (($n) = $sth->fetchrow_array)
 
32
      {
 
33
        push @names, ($n);
 
34
#        print "$n<P>";
 
35
      }
 
36
    $query = "Select DISTINCT(TEST) from Tests";
 
37
    my $sth = $dbh->prepare($query) || die "Can't prepare statement: $DBI::errstr";
 
38
    my $rc = $sth->execute or die DBI->errstr;
 
39
    while (($n) = $sth->fetchrow_array)
 
40
      {
 
41
        push @tests, ($n);
 
42
#        print "$n\n";
 
43
      }
 
44
 
 
45
#    print join "<BR>", @names;
 
46
 
 
47
    print $q->startform();
 
48
    print $q->scrolling_list(-name=>"test", -values=>\@tests, -multiple=>'true');
 
49
    print "<P>";
 
50
    print $q->scrolling_list(-name=>"name", -values=>\@names, -multiple=>'true');
 
51
    print "<P>";
 
52
    print $q->submit();
 
53
    print $q->hidden("pwd", $q->param('pwd'));
 
54
    print $q->endform();
 
55
 
 
56
    # disconnect from database
 
57
    $dbh->disconnect;
 
58
 
 
59
    #now generate the urls to the chart
 
60
    if ($q->param('test') && $q->param('name'))
 
61
      {
 
62
        my @names = $q->param('name');
 
63
        my @tests = $q->param('test');
 
64
        print "<P>";
 
65
        print join "<BR>", @names;
 
66
        print "<P>";
 
67
        print join "<BR>", @tests;
 
68
        print "<P>";
 
69
        $str = "pwd=" . $q->param('pwd');
 
70
        $count = 0;
 
71
        foreach $n (@names)
 
72
          {
 
73
            foreach $t (@tests)
 
74
              {
 
75
                $str = "$str&t$count=$t&n$count=$n";
 
76
                $count++;
 
77
              }
 
78
          }
 
79
        print "<img src=\"cgiplotNLT.pl?$str\">";
 
80
      }
 
81
  }
 
82
 
 
83
print $q->end_html();