コード例 #1
0
def admin_checkuserLeaving1(xm):
    adminname = request.cookies.get("adminname")
    Leavingschool = magen.checkUserLeavingschool(xm)
    for result in Leavingschool:
        xm = magen.checkTeacher1(result.tid).xm
        result.tname = xm
    return render_template("admin_userLeavingschoollist.html",
                           Leavingschool=Leavingschool,
                           name=adminname)
コード例 #2
0
def user_leavingschool():
    username = request.cookies.get("username")
    userid = request.cookies.get("userid")
    userid = int(userid)
    Leavingschool = magen.checkLeavingschool1(userid)
    for result in Leavingschool:
        xm = magen.checkTeacher1(result.tid).xm
        result.tname = xm
    return render_template("user_leavingschool.html",
                           Leavingschool=Leavingschool,
                           uname=username)
コード例 #3
0
def teacher_personal():
    teachername = request.cookies.get("teachername")
    id = request.cookies.get("teacherid")
    if request.method == "GET":
        result = magen.checkTeacher1(id)
        return render_template("teacher_personal.html",
                               result=result,
                               tname=teachername)
    elif request.method == "POST":
        xm = request.form["xm"]
        gender = request.form['gender']
        qq = request.form['qq']
        email = request.form['email']
        address = request.form['address']
        phone = request.form['phone']
        magen.updateTeacher1(id, xm, gender, qq, email, address, phone)
        return make_response(redirect('/teacher_personal'))
コード例 #4
0
def admin_updateTeacher(id):
    if request.method == "GET":
        result = magen.checkTeacher1(id)
        adminname = request.cookies.get("adminname")
        return render_template('admin_updateTeacher.html',
                               result=result,
                               name=adminname)
    elif request.method == "POST":
        username = request.form["username"]
        password = request.form["password"]
        xm = request.form['xm']
        gender = request.form['gender']
        qq = request.form['qq']
        email = request.form['email']
        address = request.form['address']
        phone = request.form['phone']
        magen.updateTeacher(id, username, password, xm, gender, qq, email,
                            address, phone)
        return make_response(redirect('/admin_TeacherFinancelist'))