예제 #1
0
def profile():
  if not user.isUserLogined(sql):
    return redirect(url_for('login'))	
  if request.method == 'GET':
    username = user.getLoginedUserName(sql)
    userInfo = user.getUserInfo(sql)
    return render_template('profile.html', username = username,
        userInfo = userInfo,
        flag = (username != "NULL"))
  else:
    pass
예제 #2
0
def file_manager():
  if not user.isUserLogined(sql):
    return redirect(url_for('login'))	
  filelist = sql.getUserFileNameList()
  shared=sharedFiles(sql)
  sharedFileList=shared.getSharedFileList()  
  yoursharedfiles=shared.getUserSharedFileList(user.getLoginedUserName(sql))
  for file in filelist:
    for shareF in yoursharedfiles:
      if file['fileType']==shareF['fileType'] and file['fileName']==shareF['fileName'] and shareF['name']==user.getLoginedUserName(sql):
        file['shared']=True
  for file in filelist:
  	if not 'shared' in file:
  	  file['shared']=False  
  print sql.getUserPartByLoginuser()
  return render_template('file_manager.html', filelist = filelist,sharedFileList = sharedFileList,userpart=sql.getUserPartByLoginuser())
예제 #3
0
def goToProtocol():
	if user.isUserLogined(sql):
		return render_template('protocol.html')
	else:
		return redirect(url_for('login'))
예제 #4
0
def goToPlasmid():
	if user.isUserLogined(sql):
		return render_template('plasmid.html')
	else:
		return redirect(url_for('login'))
예제 #5
0
def goToGeneCircuit():
	if user.isUserLogined(sql):
		return render_template('genecircuit.html')
	else:
		return redirect(url_for('login'))
예제 #6
0
def createnewpart():
	if user.isUserLogined(sql):
		return render_template('createNewPart.html')
	else:
		return redirect(url_for('login'))	
예제 #7
0
def index():
	if user.isUserLogined(sql):
		return render_template('index.html')
	else:
		return redirect(url_for('login'))
예제 #8
0
def login2():
	if user.isUserLogined(sql):
		user.userLogout(sql)
	return render_template('login.html')
예제 #9
0
def goToSimulation():
	if user.isUserLogined(sql):
		return render_template('simulation.html')
	else:
		return redirect(url_for('login'))