def deleteFeedback(): if session['loginRole'] == 'admin': return redirect(url_for('login')) else: feedbackVO = FeedbackVO() feedbackDAO = FeedbackDAO() feedbackVO.feedbackId = request.args.get('feedbackId') feedbackVO.feedbackActiveStatus = 'deactive' feedbackDAO.deleteFeedback(feedbackVO) return redirect(url_for('viewFeedback'))
def viewFeedback(): if session['loginDictrole'] == 'admin': feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackVO.feedbackActiveStatus = 'activate' feedbackDict = feedbackDAO.searchFeedback(feedbackVO) return render_template('admin/viewfeedback.html', data2=feedbackDict) return render_template('admin/signin.html')
def deleteFeedback(): if session['loginDictrole'] == 'seller': feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackVO.feedbackActiveStatus = 'deactivate' feedbackVO.feedbackId = request.args.get('feedbackId') feedbackDAO.deleteFeedback(feedbackVO) return redirect('/viewuserFeedback') else: return render_template('admin/login.html', loginerrorDict='Please login first')
def insertFeedback(): if session['loginRole'] != 'user': return redirect(url_for('login')) else: feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackVO.feedbackRating = request.form['feedbackRating'] feedbackVO.feedbackMessage = request.form['feedbackMessage'] feedbackVO.feedbackDate, feedbackVO.feedbackTime = str( datetime.now()).split(' ') feedbackVO.feedbackActiveStatus = 'active' feedbackVO.feedbackFrom_LoginId = session['loginId'] feedbackDAO.insertFeedback(feedbackVO) return redirect(url_for('postFeedback'))
def insertFeedback(): try: if session['sessionloginDict']['loginRole'] == 'user': feedbackDAO = FeedbackDAO() feedbackVO = FeedbackVO() feedbackDescription = request.form['feedbackDescription'] feedbackRating = request.form['feedbackRating'] feedbackVO.feedbackDescription = feedbackDescription feedbackVO.feedbackRating = feedbackRating feedbackVO.feedbackActiveStatus = 'active' return render_template('admin/addFeedback.html') else: flash('Plese Login First !', 'danger') return redirect(url_for('loadLogin')) except: flash('Plese Login First !', 'danger') return redirect(url_for('loadLogin'))