2 <title>MyOps-View</title>
4 <!-- Every 5 minutes -->
5 <meta http-equiv="refresh" content="600">
7 <body style="width: 1340px;">
10 $f_list = file("urllist.txt");
12 $opts = array( 'hideLegend' => 'False',
16 print "Page rendered at <b>" . date("Y-m-d H:i:s e") . "</b>. Refreshes every 10 minutes.";
17 $url = "http://" . $_SERVER['SERVER_NAME'] . ":5984/myops/_design/myops/index.html";
18 print "<br><a href='$url'>Raw MyOps-Query</a>";
21 $show_all_default = True;
25 if ( isset($_REQUEST['tag']) )
27 $tag = $_REQUEST['tag'];
28 $show_all_default = False;
31 # there are three cases
32 # show thumbnails of everything
33 # show thumbnails of just one tag
34 # show large version of a thumbnail
36 foreach ( $f_list as $url )
39 #print_r($show_all_default); print("sad<br>\n");
40 #print_r($tag); print(": tag<br>\n");
41 #print_r(isset($tag)); print(": tag<br>\n");
42 #print_r($tagcount); print(": tagcount<br>\n");
43 #print_r($tag_matches); print(": tag_matches<br>\n");
44 #print_r(preg_match("/#/", $url) > 0); print(": preg_match(#)<br>\n");
45 #print_r(strcmp(substr($url,1), $tag)); print(": strcmp: " . substr($url, 1) . "--" . $tag . "<BR>\n");
46 if ( $show_all_default || isset($tag) )
48 if ( preg_match("/#/", $url) > 0 )
50 if ( strcmp(substr($url,1), $tag) == 0 )
56 if ( $tag_matches || $show_all_default ) {
57 if ( $tagcount >= 4 && $t != "") {
58 print "<a href='" . $_SERVER['PHP_SELF'] . "?tag=$t'>" . ($tagcount-4) ." more graphs...</a>\n";
61 print "<br><hr><h3><a href='" . $_SERVER['PHP_SELF'] . "?tag=$t'>$t</a></h3>\n";
65 if ( ( ( $tagcount < 4 && $show_all_default ) || $tag_matches ) && preg_match("/http/", $url) > 0 ) {
66 print "<a href='$url&" . http_build_query($opts) . "'><img src='$url' /></a>\n";