Exemple #1
0
def printHeader():
	print '''<img src = "/others/header.jpg" alt ="OnePortal" width = "100%" height ="100">
<body bgcolor="D8FOF8">
'''
	if utility.isLoggedIn()!='1':
		print ''' <a href="join_us.py">Join Now</a>  '''
		print '''| <a href="front_page.py">Home</a></li> '''
	if(utility.isLoggedIn()=='1'):
		print '''<a href="home.py">Home</a>'''
		print '''| <a href="insert_roles.py">Insert Roles</a> | <a href="display_roles.py">Update Roles</a> | <a href="delete_roles.py">Delete Roles</a>'''
		print '''| <a href="logout.py">  LogOut</a> | <a href="load_data.py">Load Data</a>'''
		print '''<br></br>'''
	return ""	
	 
Exemple #2
0
			#	setUserId(row[0])
			success='1'
			
			#print 'Location: 127.0.0.1/cgi-bin/home.py'
			#home.generate_homepage("","","","")
			#home.main()
	#print '''<script language=javascript>document.cookie = "isloggedin=1"</script>'''
	
	key = "isloggedin"
	
	#utility.setCookie(key,success)
	return success

print '''<script language=javascript>
		function check(){'''
if utility.isLoggedIn()=='1':
	
	print '''
	window.location="http://localhost/video/Final_Project/home.py";
	'''
if check_login()=='1':
	print '''
	document.cookie = "isloggedin=1";
	'''

	print "document.cookie='user_id=%s';" %(getUserId())
	
	
	#username,password,local = getdata.getGmailAcct()
	
	#wordlist,local = con_str.con_str()