"; $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']; $defaultIP = $currentIP; $cur_hostname = gethostbyaddr($currentIP); if ($_SERVER['REQUEST_METHOD']!='POST') { echo ""; show_bartitle($bartitle); echo "Peril$snapversion allows you to label and edit the IP addresses you monitor.

"; snap_deluxe_table (); } else { echo ""; show_bartitle($bartitle); //echo "

post ip is : " ,$_POST['IP']; $mycurrentIP=htmlentities(trim(stripslashes($_POST['IP']))); $locationtype=htmlentities(trim(stripslashes($_POST['locationtype']))); $imagetype=htmlentities(trim(stripslashes($_POST['image']))); $ipaddr = ip2long($mycurrentIP); //echo "

current ip is : " ,$currentIP; $s_ipaddr = sprintf("%u",$ipaddr); $myhostip = long2ip($s_ipaddr); $myhostname = gethostbyaddr($myhostip); //echo "

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

You must enter a valid IP address or hostname

A Peril",$snapversion, " 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_deluxe_table (); } // else post } //else (logged in) } } include("$incpath/footer.php"); ?>