예제 #1
0
def Privacy_wijzigen():
    if 'E-mail' in session:
        if request.method == 'POST':
                Route_visible = request.form["Route_visible"]
                Pics_visible = request.form["Pics_visible"]
                manager = User_manager()
                manager.change_data(session['E-mail'],'Route_visible',Route_visible)
                manager.change_data(session['E-mail'],'Pics_visible',Pics_visible)
                logo = url_for('static', filename = 'NightBird.png')
                return redirect('/index')
        else:
            manager = User_manager()
            route_visible = manager.get_data(session['E-mail'],'Route_visible')
            pics_visible = manager.get_data(session['E-mail'],'Pics_visible')
            logo = url_for('static', filename = 'NightBird.png')
            return render_template('privacy_wijzigen.html',route_visible=route_visible,pics_visible=pics_visible,logo=logo)
예제 #2
0
def Wachtwoord_wijzigen():

    if 'E-mail' in session:
        if request.method == 'POST':
                OPassword = request.form["OPass"]
                manager = User_manager()
                if manager.Login_user(OPassword,session['E-mail']) == True:
                    Password = request.form["NPass"]
                    manager = User_manager()
                    manager.change_data(session['E-mail'],'Pass',Password)
                    logo = url_for('static', filename = 'NightBird.png')
                    return redirect('/index')
                else:
                                      return "Foutief wachtwoord ingevuld"
                    
        else:
            logo = url_for('static', filename = 'NightBird.png')
            return render_template('Wachtwoord_wijzigen.html', logo = logo)