<?php
    global $CTABNAME;
    
    print("<div class=\"topcap\">");
    print("<p class=\"caption\">Milter-callback control panel</p>");
    print("</div>");
    print("<div class=\"topmenu\">");
    if (isset($CTABNAME)) {
	if ($CTABNAME == "sum") {
	    print("<a class=\"menurefselected\" href=\"summary.php\">summary</a>\n");
	    print("<a class=\"menuref\" href=\"history.php\">history</a>\n");
	    print("<a class=\"menuref\" href=\"whitelist.php\">whitelist</a>\n");
	    print("<a class=\"menuref\" href=\"blacklist.php\">blacklist</a>\n");
	    print("<a class=\"menuref\" href=\"search.php\">search</a>\n");
	} elseif ($CTABNAME == "hist") {
	    print("<a class=\"menuref\" href=\"summary.php\">summary</a>\n");
	    print("<a class=\"menurefselected\" href=\"history.php\">history</a>\n");
	    print("<a class=\"menuref\" href=\"whitelist.php\">whitelist</a>\n");
	    print("<a class=\"menuref\" href=\"blacklist.php\">blacklist</a>\n");
	    print("<a class=\"menuref\" href=\"search.php\">search</a>\n");
	} elseif ($CTABNAME == "white") {
	    print("<a class=\"menuref\" href=\"summary.php\">summary</a>\n");
	    print("<a class=\"menuref\" href=\"history.php\">history</a>\n");
	    print("<a class=\"menurefselected\" href=\"whitelist.php\">whitelist</a>\n");
	    print("<a class=\"menuref\" href=\"blacklist.php\">blacklist</a>\n");
	    print("<a class=\"menuref\" href=\"search.php\">search</a>\n");
	} elseif ($CTABNAME == "black") {
	    print("<a class=\"menuref\" href=\"summary.php\">summary</a>\n");
	    print("<a class=\"menuref\" href=\"history.php\">history</a>\n");
	    print("<a class=\"menuref\" href=\"whitelist.php\">whitelist</a>\n");
	    print("<a class=\"menurefselected\" href=\"blacklist.php\">blacklist</a>\n");
	    print("<a class=\"menuref\" href=\"search.php\">search</a>\n");
	} else {
	    print("<a class=\"menuref\" href=\"summary.php\">summary</a>\n");
	    print("<a class=\"menuref\" href=\"history.php\">history</a>\n");
	    print("<a class=\"menuref\" href=\"whitelist.php\">whitelist</a>\n");
	    print("<a class=\"menuref\" href=\"blacklist.php\">blacklist</a>\n");
	    print("<a class=\"menurefselected\" href=\"search.php\">search</a>\n");
	}
    } else {
	print("<a class=\"menurefselected\" href=\"summary.php\">summary</a>\n");
	print("<a class=\"menuref\" href=\"history.php\">history</a>\n");
	print("<a class=\"menuref\" href=\"whitelist.php\">whitelist</a>\n");
	print("<a class=\"menuref\" href=\"blacklist.php\">blacklist</a>\n");
	print("<a class=\"menuref\" href=\"search.php\">search</a>\n");
	$CTABNAME = "sum";
    };
    print("</div>");
?>
