"; $bartitle="Unverified user: Please login to use Peril$snapversion "; printneedtologinmsg($bartitle); } else{ if ((!isgroupmember ($_SESSION['reg_member_id'], $group)) && (!isgroupmember ($_SESSION['reg_member_id'], $staff))) { $showlogin="yes"; include("$incpath/menu.php"); echo ""; $bartitle="Verified but not InternetPerils Peril$snapversion user: Please login as authorized user "; show_bartitle($bartitle); show_login ($_SERVER['PHP_SELF']); } else { $showlogin="yes"; include("$incpath/menu.php"); $firstname= $_SESSION['reg_firstname']; $reg_member_id = $_SESSION['reg_member_id']; $reg_email = $_SESSION['reg_email']; $bartitle="Peril$snapversion Tools - Welcome $firstname"; $currentIP=$_SERVER['REMOTE_ADDR']; list ($snapmember_id, $snaplocationtype, $snapregisterIP, $reghostname) = mysql_fetch_array(get_snap_locations($reg_member_id,$locationtype)); $registerIP = long2ip($snapregisterIP); $defaultIP = $currentIP; $cur_hostname = gethostbyaddr($currentIP); if ($_SERVER['REQUEST_METHOD']!='POST') { echo ""; show_bartitle($bartitle); ?>

Peril allows you to edit the one IP address you monitor.

"; show_bartitle($bartitle); //echo "

post ip is : " ,$_POST['IP']; $mycurrentIP=htmlentities(trim(stripslashes($_POST['IP']))); $ipaddr = ip2long($mycurrentIP); $s_ipaddr = sprintf("%u",$ipaddr); $myhostip = long2ip($s_ipaddr); $myhostname = gethostbyaddr($myhostip); $imagetype = 'png'; if ($myhostname == "255.255.255.255") { $myhostname=$mycurrentIP; $myhostip=gethostbyname($myhostname); } // echo "

current ip is : " ,$mycurrentIP; // echo "

current myhostname is : " ,$myhostname; // echo "

current myhostip is : " ,$myhostip; if (($mycurrentIP == "") || ($myhostname == $myhostip) ) { $currentIP=$_SERVER['REMOTE_ADDR']; list ($snapmember_id, $snaplocationtype, $snapregisterIP, $reghostname) = mysql_fetch_array(get_snap_locations($reg_member_id,$locationtype)); $registerIP = long2ip($snapregisterIP); $defaultIP = $currentIP; $cur_hostname = gethostbyaddr($currentIP); ?>

You must enter a valid IP address or hostname

Peril allows you to edit the one IP address you monitor.

A PerilSnap request will be submitted on your behalf for address "; echo "" , $myhostip , " [",$myhostname , "].\n"; echo "

You should receive an image which gives information about\n"; echo "your network connectivity as soon as data is available.\n\n"; echo "

Typically data is available to PerilSnap users within an \n"; echo "hour and is delivered in a mime-compliant mail message.\n\n"; echo "The PerilSnap image will be sent to $reg_email ."; echo "


"; flush(); submit_snap($myhostip,$myhostname,$snapversion,$locationtype,$imagetype); snap_plus_table(); } // else entered string is valid } // else post } //else (logged in) } include("$incpath/footer.php"); ?>