-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpredict.cgi
More file actions
66 lines (65 loc) · 1.93 KB
/
predict.cgi
File metadata and controls
66 lines (65 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/perl
print "Content-type: text/plain", "\n\n";
print '<meta http-equiv="pragma" content="no-cache">';
#print '<meta http-equiv="Refresh" content="15">';
print '<Title> Predict Returned Volumes </title>';
print '<BODY bgcolor="#fbe995">';
print '<br>';
print '</font>';
print '<table>';
print '<tr>';
print '<td width="12%">';
print ' ';
print '</td>';
print '<td>';
print '<h2><font color="navy">';
print 'Predict returned volumes';
print '</font>';
print '</h2>';
print '<a href="http://atlas.dbs.co.il/predict.html" alt="Back to predict menu" target="_top">';
print 'Back to predict menu';
print '</a>';
print '<HR>';
print '<table align="center" border="1" cellpadding="6" cellspacing="2" bgcolor="#fef7d4">';
print '<tr>';
print '<th>';
print "No.";
print '</th>';
print '<th>';
print "Volume <BR> Retention";
print '</th>';
print '<th>';
print "Pool";
print '</th>';
print '<th>';
print "Volume";
print '</th>';
print '<th>';
print "Location";
print '</th>';
print '</tr>';
$query_string = $ENV{'QUERY_STRING'};
($field_name, $command) = split (/=/, $query_string);
if ($command eq "0"||"1"||"2"||"3"||"4"||"5"||"6"||"7") {
$no = 1;
open(MM, "/usr/opt/networker/bin/mminfo -q 'volretent < \"+$command days\"' -o t -r volretent,space,pool,space,volume,space,location| /bin/sort|");
while (<MM>) {
next if /\bmanual\b/;
next if /\bvolume\b/;
#/([0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]|\bexpired\b|\bundef\b)\s*(\w+\s*\w*\s*\w*)\s*([UN][XT]\d{6})\s*(\bjbux\b|s*)/;
/([0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]|\bexpired\b|\bundef\b)\s*(\w+\s*\w*\s*\w*)\s*([UW]\d{5}[L][2]|[UN][XT]\d{6})\s*(\bjbux\b|s*)/;
$volretent = $1;
$barcode = $3;
$pool = $2;
$location= $4;
print "<tr><td> $no </td><td> $volretent </td><td> $pool </td><td> $barcode </td><td> $location </td> </tr>";
++$no;
}
}
print '</table>';
print '<td width="12%">';
print ' ';
print '</td>';
print '</tr>';
print '</table>';
print '</body>';