def viewUserFeedback(): if session['loginRole']!= 'user': return redirect(url_for('login')) feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackVO.feedbackFrom_LoginId = session['loginId'] feedbackDict = feedbackDAO.searchFeedbackById(feedbackVO) return render_template('user/viewFeedback.html',feedbackDict=feedbackDict)
def viewFeedback(): try: if session['loginRole'] == 'admin': feedbackDAO = FeedbackDAO() feedbackDict = feedbackDAO.searchFeedback() return render_template('admin/viewFeedback.html', feedbackDict=feedbackDict) else: feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackVO.feedbackFrom_LoginId = session['loginId'] feedbackDict = feedbackDAO.searchFeedbackById(feedbackVO) return render_template('user/viewFeedback.html', feedbackDict=feedbackDict) except: return render_template('admin/login.html')