Location: PHPKode > projects > LSMS SNMP to MRTG toolset > www/snmpmrtg/phpping/telnet.php
<?php
//    (C)Copyright John Baker 2004/2005/2006 
//
//    This file is part of lsms2mrtg.
//
//    lsms2mrtg 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.
//
//    lsms2mrtg 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 lsms2mrtg; if not, write to the Free Software
//    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
//    For more informationn please visit http://gnulsms2mrtg.sourceforge.net/ 

include '../generic.inc';
include '../jbsnmplib.inc';
include '../BrickSNMPlib.inc';

echo $htmlheader;

$command=$HTTP_GET_VARS["command"];
if ($command =="" ) $command = $HTTP_POST_VARS["command"];
$pinghost=$HTTP_GET_VARS["pinghost"];
if ($pinghost =="" ) $pinghost = $HTTP_POST_VARS["pinghost"];
$pingdesc=$HTTP_GET_VARS["pingdesc"];
if ($pingdesc =="" ) $pingdesc = $HTTP_POST_VARS["pingdesc"];
$pingcount=$HTTP_GET_VARS["pingcount"];
if ($pingcount =="" ) $pingcount = $HTTP_POST_VARS["pingcount"];
$pingvnc=$HTTP_GET_VARS["pingvnc"];
if ($pingvnc =="" ) $pingvnc = $HTTP_POST_VARS["pingvnc"];
$pingwww=$HTTP_GET_VARS["pingwww"];
if ($pingwww =="" ) $pingwww = $HTTP_POST_VARS["pingwww"];

$pingtelnet=$HTTP_GET_VARS["pingtelnet"];
if ($pingtelnet =="" ) $pingtelnet = $HTTP_POST_VARS["pingtelnet"];

$pingline=$HTTP_GET_VARS["pingline"];
if ($pingline =="" ) $pingline = $HTTP_POST_VARS["pingline"];
if ($pingwww=="on") {$pingwww="1";} else {$pingwww="0";}
if ($pingvnc=="on") {$pingvnc="1";} else {$pingvnc="0";}

if ($pingtelnet=="on") {$pingtelnet="1";} else {$pingtelnet="0";}

$redirurl="http://" . $_SERVER['HTTP_HOST']
                      . dirname($_SERVER['PHP_SELF']);

echo "<SCRIPT>function runtelnet()
{
  

win2 = window.open(\"telnet://$pinghost/\", \"Window2\", \"width=300,height=200,scrollbars=yes\"); 
win2.window.close();

self.close();
}</SCRIPT>
";

echo "<BODY onLoad=\"runtelnet();\">";



?> 
Return current item: LSMS SNMP to MRTG toolset