#!/usr/bin/python
import cgi, string, sys, rnd5crypt, time 
import numpy as np
def self(reaction, mine):

class GpsData(object):


   def connection(self,locationdata):
	  if self.locationdata():

   
   def locationdata(gps_X,gps_Y):
	  print (gps_X)
	  print (gps_Y)
	  if (self.gps_X ) and (self.gps_Y):
		 for self.gps_X in range(0,connection):
			total_gps_X=self.gps_X - gps_X):
			   print (gps_X)
			   print (self.gps_X)
			   print (total_gps_X)
		 for self.gps_Y in range(0,connection):
			total_gps_Y=(self.gps_Y-gps_Y)
			print (self.gps_Y)
			print (gps_Y)
			print (total_gps_Y)
		 else:
		 
	  distance= math.sqrt(math.pow(total_gps_X,2) + math.pow(total_gps_Y,2)) 
   #### global-scoped vars #### 
def generate_form():
   sender =  None
   reciever = None
   senderID = locationdata
   recieverID = locationdata
   




class LinkedList(object):
   def __init__(self, data=None, next_node=None):
	  self.head = head	 
	  self.data = data
	  self.next_node = next_node
		 ## this is used to create 
		 def get_data(self):
			 return self.next_node
		 def get_next(self): 
			return self.next_node
		 def set_next(self, new_next):
			self.next_nodt = new_next
#define funtions
def test(id,passwd)
   passwd_file= open('.password', 'r')
   line = passwd_file.readline()
   passwd_file.close()
   combo= stringsplit(line,":")
   encrpyted_pw = rnd5crypt.unix_rn4_crypt(passwd,'admin')
   if (id == combo[0]) and (encrypted_pw[0:20] == comb[1][0:20])):
	  return "passed"
   else:
	  return "failed"

def main():
   form = cgi.FieldStorage()
   if (from.has_key("action) and from has_key("username")\
		 and form.has_key("password")):
		 if (form["action"].value == "display"):
			result = test(form[username"].value.form["password"].value)
		 display_page(result)
	  else:
		 genrate_form();

main()

