def adminunblockUser(): try: loginVO = LoginVO() loginDAO = LoginDAO() loginId = request.args.get('loginId') print('loginId::', loginId) loginVO.loginId = loginId registerDAO = RegisterDAO() loginVO.loginRole = 'user' loginVO.loginStatus = 'active' loginDAO.validateLogin(loginVO) registerDAO.viewRegister() loginDAO.unblockUser(loginVO) return redirect(url_for('adminViewUser')) except Exception as ex: print(ex)
def adminLoadDashboard(): try: if adminLoginSession() == 'admin': complainCount = 0 feedbackCount = 0 userCount = 0 complainDAO = ComplainDAO() complainList = complainDAO.complainCount() print('complainList>>>>>', complainList) complainCount = complainList[0][0] feedbackDAO = FeedbackDAO() feedbackList = feedbackDAO.adminViewFeedback() feedbackCount = len(feedbackList) registerDAO = RegisterDAO() registerList = registerDAO.viewRegister() userCount = len(registerList) return render_template('admin/index.html', complainCount=complainCount, feedbackCount=feedbackCount, userCount=userCount) else: return adminLogoutSession() except Exception as ex: print(ex)
def adminViewUser(): try: if adminLoginSession() == 'admin': registerDAO = RegisterDAO() registerVOList = registerDAO.viewRegister() return render_template('admin/viewUser.html', registerVOList=registerVOList) else: return adminLogoutSession() except Exception as ex: print(ex)
def adminViewRegister(): try: if adminLoginSession() == "admin": registerDAO = RegisterDAO() registerVOList = registerDAO.viewRegister() print("_________", registerVOList) return render_template("admin/viewUser.html", registerVOList=registerVOList) else: return redirect(url_for("adminLogoutSession")) except Exception as ex: print(ex)
def adminLoadDashboard(): try: if adminLoginSession() == 'admin': complainDAO = ComplainDAO() feedbackDAO = FeedbackDAO() registerDAO = RegisterDAO() complainVOList = complainDAO.viewComplain() totalComplainCount = len(complainVOList) feedbackVOList = feedbackDAO.adminViewFeedback() totalFeedbackCount = len(feedbackVOList) registerVOList = registerDAO.viewRegister() totalUserCount = len(registerVOList) return render_template('admin/Index.html', totalUserCount=totalUserCount, totalComplainCount=totalComplainCount, totalFeedbackCount=totalFeedbackCount) else: return adminLogoutSession() except Exception as ex: print(ex)