'False',
'width' => '900',
'height' => '500' );
print "Page rendered at " . date("Y-m-d H:i:s e") . ". Refreshes every 10 minutes.";
$url = "http://" . $_SERVER['SERVER_NAME'] . ":5984/myops/_design/myops/index.html";
print "
Raw MyOps-Query";
$tag = NULL;
$show_all_default = True;
$tagcount = 0;
$tag_matches = False;
$t = "";
if ( isset($_REQUEST['tag']) )
{
$tag = $_REQUEST['tag'];
$show_all_default = False;
}
# there are three cases
# show thumbnails of everything
# show thumbnails of just one tag
# show large version of a thumbnail
foreach ( $f_list as $url )
{
$url = trim($url);
#print_r($show_all_default); print("sad
\n");
#print_r($tag); print(": tag
\n");
#print_r(isset($tag)); print(": tag
\n");
#print_r($tagcount); print(": tagcount
\n");
#print_r($tag_matches); print(": tag_matches
\n");
#print_r(preg_match("/#/", $url) > 0); print(": preg_match(#)
\n");
#print_r(strcmp(substr($url,1), $tag)); print(": strcmp: " . substr($url, 1) . "--" . $tag . "
\n");
if ( $show_all_default || isset($tag) )
{
if ( preg_match("/#/", $url) > 0 )
{
if ( strcmp(substr($url,1), $tag) == 0 )
{
$tag_matches = True;
} else {
$tag_matches = False;
}
if ( $tag_matches || $show_all_default ) {
if ( $tagcount >= 4 && $t != "") {
print "" . ($tagcount-4) ." more graphs...\n";
}
$t = substr($url, 1);
print "
\n";
$tagcount = 0;
}
} else {
if ( ( ( $tagcount < 4 && $show_all_default ) || $tag_matches ) && preg_match("/http/", $url) > 0 ) {
print "\n";
}
$tagcount += 1;
}
}
}
?>