def survey_render(): flag_ses, user_id = getSession() if not flag_ses: return redirect("login.html") user_id = str(escape(session["user_id"])) list = MyDaoSurvey().myselect(user_id) return render_template('survey.html', list=list)
def survey_del_ajax(): survey_id = request.form["survey_id"] cnt = MyDaoSurvey().mydelete(survey_id) msg = "" if cnt == 1: msg = "ok" else: msg = "ng" return jsonify(msg = msg)
def survey_upd_ajax(): survey_id = request.form["survey_id"] title = request.form["title"] content = request.form["content"] interview_cnt = request.form["interview_cnt"] deadline = request.form["deadline"] in_date = request.form["in_date"] in_user_id = str(escape(session["user_id"])) up_date = request.form["up_date"] up_user_id = str(escape(session["user_id"])) cnt = MyDaoSurvey().myupdate(survey_id, title, content, interview_cnt, deadline, in_date, in_user_id, up_date, up_user_id) msg = "" if cnt == 1: msg = "ok" else: msg = "ng" return jsonify(msg = msg)