-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_index_page.pl.bu
63 lines (56 loc) · 2.79 KB
/
create_index_page.pl.bu
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
#!/usr/bin/perl
#Creating html page
use warnings;
use strict;
use Data::Dumper;
use warnings;
#use main::opon;
my @frequensy_array = ("1Mhz_Power", "2Mhz_Power", "3Mhz_Power", "4Mhz_Power", "5Mhz_Power", "5Mhz_Power", "6Mhz_Power", "7Mhz_Power","8Mhz_Power","9Mhz_Power","10Mhz_Power","11Mhz_Power","12Mhz_Power","13Mhz_Power","14Mhz_Power","15Mhz_Power","16Mhz_Power","17Mhz_Power","18Mhz_Power","19Mhz_Power","20Mhz_Power","21Mhz_Power","22Mhz_Power","23Mhz_Power","24Mhz_Power","25Mhz_Power","26Mhz_Power","27Mhz_Power","28Mhz_Power","29Mhz_Power");
#my @graphimage = ("'Daily' Graph (5 Minute Average) 1Mhz bandwith","`Weekly' Graph (30 Minute Average)","`Monthly' Graph (2 Hour Average)","`Yearly' Graph (1 Day Average)");
#my @description = ("1Mhz to 2Mhz","2Mhz to 3Mhz","3Mhz to 4Mhz","4Mhz to 5Mhz","5Mhz to 6Mhz","6Mhz to 7Mhz","7Mhz to 8Mhz","8Mhz to 9Mhz","9Mhz to 10Mhz","10Mhz to 11Mhz","11Mhz to 12Mhz","12Mhz to 13Mhz","13Mhz to 14Mhz","14Mhz to 15Mhz","15Mhz to 16Mhz","16Mhz to 17Mhz","17Mhz to 18Mhz","18Mhz to 19Mhz","19Mhz to 20Mhz","20Mhz to 21Mhz","21Mhz to 22Mhz","22Mhz to 23Mhz","23Mhz to 24Mhz","24Mhz to 25Mhz","25Mhz to 26Mhz","26Mhz to 27Mhz","27Mhz to 28Mhz","28Mhz to 29Mhz","29Mhz to 30Mhz");
#my $file="MySpace.php";
my $path_extention =".php";
my $cmdString = "/tmp/";
#chdir($cmdString)|| die "Error: could not '$cmdString'";
#if (-e $file) #if the file exists
#{
#$cmdString="rm $file";
#system($cmdString)eq0 or die "Error: could not '$cmdString'";
#}
my $i = 0;
foreach my $loop_variable (@frequensy_array) {
#
print "$loop_variable $i\n";
my $file="$loop_variable$path_extention";
print "$loop_variable\n";
print "$file\n";
open(my $FILE, ">$file") or die "Cannot open $file: $!";
## >> means +append to the end of file.
print $FILE "<html>\n";
print $FILE "<head>\n";
print $FILE "<?php include 'header.php';?>\n";
print $FILE "</head>\n";
print $FILE "<body>\n";
print $FILE "<div class=\"menu\">\n";
print $FILE "<?php include 'menu.php';?>\n";
print $FILE "</div>\n";
print $FILE "<h2>ZR6AIC HF Noise Montoring</h2>\n";
print $FILE "<h2>1Mhz to 2Mhz 'Daily' Graph (5 Minute Average) 1Mhz bandwith</h2>\n";
print $FILE "<img src=\"1Mhz_Power_2_day_db.png\">\n";
print $FILE "<p>\n";
print $FILE "<h2>1Mhs to 2Mhz `Weekly' Graph (30 Minute Average)</h2>\n";
print $FILE "<img src=\"1Mhz_Power_2_week_db.png\">\n";
print $FILE "<p>\n";
print $FILE "<h2>1Mhs to 2Mhz `Monthly' Graph (2 Hour Average)</h2>\n";
print $FILE "<img src=\"1Mhz_Power_2_moths_db.png\">\n";
print $FILE "<p>\n";
print $FILE "<h2>1Mhz to 2Mhz `Yearly' Graph (1 Day Average)</h2>\n";
print $FILE "<img src=\"1Mhz_Power_2_years_db.png\">\n";
print $FILE "<p>\n";
print $FILE "<?php include 'footer.php';?>\n";
print $FILE "</body>\n";
print $FILE "</html>\n";
close($FILE);
$i++;
}
print "Your html has been created";