Пример #1
0
def api_handler_resetMoney(request):
    aAdminUser = user.adminUser()
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")
    t = loader.get_template('smoking/index.html')
    c = RequestContext(request, locals())
    return HttpResponse(t.render(c))
def handler_userpenaltymovieadmin(request):
    aAdminUser = user.adminUser()    
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")    
    
    penalty_id = request.REQUEST.get('id')   
    userPenaltyObject = api.getUserPenaltyById(penalty_id)
    
    penalty_para={
        'uuid':util.get_universally_unique_identifiers(),
        'detail': userPenaltyObject.detail,     
        'lang_type': userPenaltyObject.lang_type            
    }
    
    adminPanaltyVO = proxy.px_AdminPenalty().createAdminPenaltyObject(penalty_para)            
    proxy.px_AdminPenalty().insert_model_object(adminPanaltyVO)
    
    api.deleteUserPenalty(userPenaltyObject)
    
    
    return HttpResponseRedirect("/kinggame/userpenaltylist/")    
    
    
    
    
def handler_front(request):        
    aAdminUser = user.adminUser()    
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")     
    
    t = loader.get_template('kinggame/index.html')
    c = RequestContext(request, locals())
    return HttpResponse(t.render(c))
Пример #4
0
def api_handler_signUp(request):
    aAdminUser = user.adminUser()
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")
    aSignUp = ct_smoking.ct_signUp(request)
    results = aSignUp.handleApiRequest()
    templates = aSignUp.get_template()
    c = RequestContext(request, locals())
    return HttpResponse(templates.render(c))
Пример #5
0
def api_handler_saveWallPoster(request):
    aAdminUser = user.adminUser()
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")
    aSaveNumber = ct_pension.ct_saveNumber(request)
    results = aSaveNumber.handleApiRequest()
    templates = aSaveNumber.get_template()
    c = RequestContext(request, locals())
    return HttpResponse(templates.render(c))
Пример #6
0
def handler_Login(request):
    aAdminUser = user.adminUser()        
    if request.method == constants.RequestMethod['POST']:        
        if (constants.Admin_User['UserName'] == request.POST['username'] and constants.Admin_User['UserPass'] == request.POST['userpass']):
            aAdminUser.setAdminUser()
            return HttpResponseRedirect("/")             
    t = loader.get_template('login.html')
    c = RequestContext(request, locals())
    return HttpResponse(t.render(c));
Пример #7
0
def handler_Login(request):
    aAdminUser = user.adminUser()
    if request.method == constants.RequestMethod['POST']:
        if (constants.Admin_User['UserName'] == request.POST['username'] and
                constants.Admin_User['UserPass'] == request.POST['userpass']):
            aAdminUser.setAdminUser()
            return HttpResponseRedirect("/")
    t = loader.get_template('login.html')
    c = RequestContext(request, locals())
    return HttpResponse(t.render(c))
def handler_userpenaltydelete(request):
    aAdminUser = user.adminUser()    
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")    
    
    penalty_id = request.REQUEST.get('id')    
    userPenaltyObject = api.getUserPenaltyById(penalty_id)
    api.deleteUserPenalty(userPenaltyObject)
    
    return HttpResponseRedirect("/kinggame/userpenaltylist/")    
def handler_userpenaltylist(request):
    aAdminUser = user.adminUser()    
    if not aAdminUser.getAdminUser():
        return HttpResponseRedirect("/login/")     
    
    penaltylist_ref = api.getUserPenaltyList()
    
    t = loader.get_template('kinggame/userpanaltylist.html')
    c = RequestContext(request, locals())
    return HttpResponse(t.render(c))