chiark / gitweb /
Oops, forgot to commit. Lots of faffing arround with graphs, graphs will be added...
[familyTree.git] / cgiFiles / person.py
1 #!/usr/bin/env python
2 # -*- coding: UTF-8 -*-
3
4 # enable debugging
5 import cgi
6 import cgitb
7 import sys
8 import re
9 sys.path.append('/home/naath/familyTreeProject/familyTree')
10 import askQuestion
11 import everyPage
12
13 cgitb.enable()
14
15 [conn,form]=everyPage.top()
16
17 ID = form.getvalue('ID')
18 if ID == None:
19         ID = 1
20
21 result = re.match('^[0-9]{1,3}$', str(ID))
22
23 if result == None:
24         everyPage.bad()
25 else:   
26
27         printMe  = askQuestion.person_info(ID,'<br>')
28         if len(printMe)<10:
29                 printMe =  'sorry, no data <br>'
30         else:
31                 url = "<a href= "+everyPage.base_url()+"ancestors.py?ID="+str(ID)+">Ancestors</a>"
32                 printMe = printMe + '<br>' + url
33
34         everyPage.good(printMe)
35         
36 everyPage.bottom(conn)