<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Caffeine Monkey</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="./caffeine_monkey.css" rel="stylesheet" type="text/css" title="Caffeine Monkey">
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0066FF" vlink="#3399FF" alink="#99CC99">
<?php
/* Copyright 2002-2003 Phillip Stansell & Damien Heiser
*
* This file is part of Caffeine Monkey.
*
* Caffeine Monkey is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Caffeine Monkey is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Caffeine Monkey; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
?>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellpadding="10" cellspacing="0" bgcolor="#999999">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#FFFFFF"><div align="center">
<p><img src="./images/cm.png" alt="Cute Monkey!" width="100" height="100"><img src="./images/cmtext.png" alt="Caffeine Monkey" width="500" height="100"></p>
<table width="50%" border="0" cellspacing="0" cellpadding="0">
<tr class="content">
<td align="left" valign="top" class="content"> <span class="label">Ping:</span><br>
<!-- Begin ping form. -->
<?php
require_once "HTML/IT.php";
$settings = parse_ini_file( './includes/bsd.conf.ini', TRUE );
$tpl = new IntegratedTemplate( "./includes" );
$tpl->loadTemplatefile( "ping.inc", true, true );
$ping_form = $settings['PING_FORM'];
foreach ( explode( ',', $ping_form['form_options'] ) as $value ) {
if ( strcasecmp( $value, 'count' ) == 0 ) {
foreach ( explode( ',', $ping_form['count_options'] ) as $key => $value ) {
$tpl->setCurrentBlock( "coptions" );
if ( strcasecmp( $key, 'SELECTED' ) == 0 ) {
$tpl->setVariable( 'SELECTED', $key );
} else {
$tpl->setVariable( 'SELECTED', '' );
}
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( "coptions" );
}
} elseif ( strcasecmp( $value, 'size' ) == 0 ) {
foreach ( explode( ',', $ping_form['size_options'] ) as $key => $value ) {
$tpl->setCurrentBlock( 'soptions' );
if ( strcasecmp( $key, 'SELECTED' ) == 0 ) {
$tpl->setVariable( 'SELECTED', $key );
} else {
$tpl->setVariable( 'SELECTED', '' );
}
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( 'soptions' );
}
$tpl->setCurrentBlock( 'size' );
$tpl->setVariable( 'SIZE_UNITS', $ping_form['size_units'] );
$tpl->parseCurrentBlock( 'size' );
} elseif ( strcasecmp( $value, 'timeout' ) == 0 ) {
foreach ( explode( ',', $ping_form['timeout_options'] ) as $key => $value ) {
$tpl->setCurrentBlock( "toptions" );
if ( strcasecmp( $key, 'SELECTED' ) == 0 ) {
$tpl->setVariable( 'SELECTED', $key );
} else {
$tpl->setVariable( 'SELECTED', '' );
}
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( "toptions" );
}
$tpl->setCurrentBlock( 'timeout' );
$tpl->setVariable( 'TIMEOUT_UNITS', $ping_form['timeout_units'] );
$tpl->parseCurrentBlock( 'timeout' );
} elseif ( strcasecmp( $value, '\n' ) == 0 ) {
$tpl->setCurrentBlock( 'line_break' );
$tpl->setVariable( 'BR', '<br>' );
$tpl->parseCurrentBlock( 'line_break' );
}
}
$tpl->setCurrentBlock();
$tpl->setVariable( 'ACTION', $ping_form['action'] );
$tpl->setVariable( 'ENCODING', $ping_form['encoding'] );
$tpl->setVariable( 'TARGET', $ping_form['target'] );
$tpl->parseCurrentBlock();
// print the output
echo $tpl->get();
?>
<!-- End ping form. -->
<div class="line"></div></td>
</tr>
<tr class="content">
<td align="left" valign="top" class="content"> <span class="label"><br>
Traceroute:</span><br>
<!-- Begin traceroute form. -->
<?php
$tpl->loadTemplatefile( "trace.inc", true, true );
$trace_form = $settings['TRACE_FORM'];
foreach ( explode( ',', $trace_form['form_options'] ) as $value ) {
if ( strcasecmp( $value, 'hops' ) == 0 ) {
foreach ( explode( ',', $trace_form['hops_options'] ) as $value ) {
$tpl->setCurrentBlock( "hoptions" );
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( "hoptions" );
}
} elseif ( strcasecmp( $value, 'size' ) == 0 ) {
foreach ( explode( ',', $trace_form['size_options'] ) as $value ) {
$tpl->setCurrentBlock( "soptions" );
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( "soptions" );
}
$tpl->setCurrentBlock( 'size' );
$tpl->setVariable( 'SIZE_UNITS', $trace_form['size_units'] );
$tpl->parseCurrentBlock( 'size' );
} elseif ( strcasecmp( $value, 'timeout' ) == 0 ) {
foreach ( explode( ',', $trace_form['timeout_options'] ) as $value ) {
$tpl->setCurrentBlock( "toptions" );
$tpl->setVariable( 'VALUE', $value );
$tpl->parseCurrentBlock( "toptions" );
}
$tpl->setCurrentBlock( 'timeout' );
$tpl->setVariable( 'TIMEOUT_UNITS', $trace_form['timeout_units'] );
$tpl->parseCurrentBlock( 'timeout' );
} elseif ( strcasecmp( $value, 'dodns' ) == 0 ) {
$tpl->setCurrentBlock( "dodns" );
$tpl->setVariable( 'CHECKED', $trace_form['dodns'] );
$tpl->parseCurrentBlock( "dodns" );
}
}
$tpl->setCurrentBlock();
$tpl->setVariable( 'ACTION', $trace_form['action'] );
$tpl->setVariable( 'ENCODING', $trace_form['encoding'] );
$tpl->setVariable( 'TARGET', $trace_form['target'] );
$tpl->parseCurrentBlock();
// print the output
echo $tpl->get();
?>
<!-- End traceroute form. -->
<div class="line"></div></td>
</tr>
<tr class="content">
<td align="left" valign="top" class="content"><span class="label"><br>
NSLookup:</span><br>
<!-- Begin nslookup form. -->
<?php
$data = array (
"0" => array( "CHECKED" => "checked", "ID" => "query_default", "LABEL" => "default (a) ", "VALUE" => "a" ),
"1" => array( "CHECKED" => "", "ID" => "query_mx", "LABEL" => "mail exchangers (mx) ", "VALUE" => "mx" ),
"2" => array( "CHECKED" => "", "ID" => "query_ns", "LABEL" => "name servers (ns) ", "VALUE" => "ns" )
);
$tpl->loadTemplatefile( "nslookup.inc", true, true );
foreach ( $data as $rinput ) {
$tpl->setCurrentBlock( "radio-input" );
$tpl->setVariable( $rinput );
$tpl->parseCurrentBlock( "radio-input" );
}
$tpl->setCurrentBlock();
$tpl->setVariable( "ACTION", "nslookup.html" );
$tpl->setVariable( "ENCODING", "application/x-www-form-urlencoded" );
$tpl->setVariable( "TARGET", "_blank" );
$tpl->parseCurrentBlock();
// print the output
echo $tpl->get();
?>
<!-- End nslookup form. -->
<div class="line"></div></td>
</tr>
<p align="left" class="content"> </p>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<br>
<div align="center">
<table width="50%" border="0" align="center" cellpadding="10" cellspacing="0">
<tr>
<td bgcolor="#000000"><table width="100%" border="0" cellpadding="10" cellspacing="0" bgcolor="#999999">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#FFFFFF" class="content"><div align="center">
<p> [ Download <a href="../caffeine_monkey-0.7/caffeine_monkey-0.6.tar.gz" >source</a>
]<br>
[ Caffeine Monkey 0.6 ]<br>
Copyright 2003 Phillip Stansell & Damien Heiser<br>
[ Modified: Tue Feb 11 01:48:00 MST 2003 ]</p>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>