Example #1
0
function renderInterfaceHTML($pageno, $tabno, $payload)
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><title><?php 
    echo getTitle($pageno);
    ?>
</title>
<?php 
    printPageHeaders();
    ?>
</head>
<body>
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%" class="maintable">
 <tr class="mainheader"><td>
 <?php 
    echo getConfigVar('enterprise');
    ?>
 RackTables <a href="http://racktables.org" title="Visit RackTables site"><?php 
    echo CODE_VERSION;
    ?>
</a><?php 
    renderQuickLinks();
    ?>
 <div style="float: right" class=greeting><a href='index.php?page=myaccount&tab=default'><?php 
    global $remote_displayname;
    echo $remote_displayname;
    ?>
</a> [ <a href='?logout'>logout</a> ]</div>
 </td></tr>
 <tr><td class="menubar">
  <table border="0" width="100%" cellpadding="3" cellspacing="0">
  <tr><?php 
    showPathAndSearch($pageno);
    ?>
</tr>
  </table>
 </td></tr>
 <tr><td><?php 
    showTabs($pageno, $tabno);
    ?>
</td></tr>
 <tr><td><?php 
    showMessageOrError();
    ?>
</td></tr>
 <tr><td><?php 
    echo $payload;
    ?>
</td></tr>
</table>
</body>
</html>
<?php 
}
Example #2
0
 public function dispatch()
 {
     header('Content-Type: text/html; charset=UTF-8');
     echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
     echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">' . "\n";
     echo "<head><title>RackTables: access denied</title>\n";
     printPageHeaders();
     echo "</head><body>";
     global $pageno, $tabno, $user_given_tags, $target_given_tags, $auto_tags, $expl_tags, $impl_tags;
     echo "<table border=1 cellspacing=0 cellpadding=3 width='50%' align=center>\n";
     echo '<tr><th colspan=2><h3>' . getImageHREF('DENIED') . ' access denied ';
     echo getImageHREF('DENIED') . '</h3></th></tr>';
     echo "<tr><th width='50%' class=tagchain>User given tags:</th><td class=tagchain>";
     echo serializeTags($user_given_tags) . "&nbsp;</td></tr>\n";
     echo "<tr><th width='50%' class=tagchain>Target given tags:</th><td class=tagchain>";
     echo serializeTags($target_given_tags) . "&nbsp;</td></tr>\n";
     echo "<tr><th width='50%' class=tagchain>Effective explicit tags:</th><td class=tagchain>";
     echo serializeTags($expl_tags) . "&nbsp;</td></tr>\n";
     echo "<tr><th width='50%' class=tagchain>Effective implicit tags:</th><td class=tagchain>";
     echo serializeTags($impl_tags) . "&nbsp;</td></tr>\n";
     echo "<tr><th width='50%' class=tagchain>Automatic tags:</th><td class=tagchain>";
     echo serializeTags($auto_tags) . "&nbsp;</td></tr>\n";
     echo "<tr><th width='50%' class=tdright>Requested page:</th><td class=tdleft>{$pageno}</td></tr>\n";
     echo "<tr><th width='50%' class=tdright>Requested tab:</th><td class=tdleft>{$tabno}</td></tr>\n";
     echo "<tr><td colspan=2 align=center>Click <a href='index.php?logout'>here</a> to logout.</td></tr>\n";
     echo "</table>\n";
     echo "</body></html>";
 }
Example #3
0
function renderPopupHTML($contents)
{
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" style="height: 100%;">
<head>
<title>RackTables pop-up</title>
<?php 
    printPageHeaders();
    ?>
</head>
<body style="height: 100%;">
<div class="popupbar"><?php 
    echo $contents;
    ?>
</div>
</body>
</html>
<?php 
}
Example #4
0
function renderPopupHTML()
{
    global $pageno, $tabno;
    header('Content-Type: text/html; charset=UTF-8');
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" style="height: 100%;">
<?php 
    assertStringArg('helper');
    $text = '';
    switch ($_REQUEST['helper']) {
        case 'objlist':
            $pageno = 'object';
            $tabno = 'default';
            fixContext();
            assertPermission();
            $text .= getOutputOf('renderPopupObjectSelector');
            break;
        case 'portlist':
            $pageno = 'depot';
            $tabno = 'default';
            fixContext();
            assertPermission();
            $text .= '<div style="background-color: #f0f0f0; border: 1px solid #3c78b5; padding: 10px; height: 100%; text-align: center; margin: 5px;">';
            if (isset($_REQUEST['do_link'])) {
                $text .= getOutputOf('callHook', 'handlePopupPortLink');
            } else {
                $text .= getOutputOf('callHook', 'renderPopupPortSelector');
            }
            $text .= '</div>';
            break;
        case 'inet4list':
            $pageno = 'ipv4space';
            $tabno = 'default';
            fixContext();
            assertPermission();
            $text .= getOutputOf('renderPopupIPv4Selector');
            break;
        default:
            throw new InvalidRequestArgException('helper', $_REQUEST['helper']);
    }
    echo '<head><title>RackTables pop-up</title>';
    printPageHeaders();
    echo '</head>';
    echo '<body style="height: 100%;">' . $text . '</body>';
    ?>
</html>
<?php 
}
function linkmgmt_opPortLinkDialog()
{
    //	portlist::var_dump_html($_REQUEST);
    header('Content-Type: text/html; charset=UTF-8');
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" style="height: 100%;">
<?php 
    $text = '<div style="background-color: #f0f0f0; border: 1px solid #3c78b5; padding: 10px; text-align: center;
 margin: 5px;">';
    if (permitted(NULL, NULL, "set_link")) {
        if (isset($_REQUEST['do_link'])) {
            $text .= getOutputOf('linkmgmt_oplinkPort');
        } else {
            if (isset($_REQUEST['byname'])) {
                $text .= getOutputOf('linkmgmt_renderPopupPortSelectorbyName');
            } else {
                $text .= getOutputOf('linkmgmt_renderPopupPortSelector');
            }
        }
    } else {
        $text .= "Permission denied!";
    }
    $text .= '</div>';
    echo '<head><title>RackTables pop-up</title>';
    printPageHeaders();
    echo '</head>';
    echo '<body style="height: 100%;">' . $text . '</body>';
    ?>
</html>
<?php 
    exit;
}