Example #1
0
def _TryLogin():
    
    form = cgi.FieldStorage()
    
    widId = WN.getWidgetIdLogin()
    wns = WN.getWNLogin()
    
    pid = form.getvalue(wns.getAltId('PROFID'))
    pwd = form.getvalue(wns.getAltId('PASSWORD'))
    
    
    if pid == None or pwd == None:
        return UTIL.getStatusInfoDiv([UTIL.getText('NOUSER_ERROR')], widId, NCONST.ERROR)
    
    ret = _LoginAndGetSession(pid, pwd)
        
    if ret == False:
        return UTIL.getStatusInfoDiv([UTIL.getText('NOUSER_ERROR')], widId, NCONST.ERROR)
    sessinfo = _getSessInfo()
    statusVal = '%s %s'%(sessinfo[0], sessinfo[1])
    return UTIL.getStatusInfoDiv(['Success'], widId, NCONST.SUCCESS, statusVal)
Example #2
0
 def __init__(self):
     WW.InputFrame.__init__(self,WN.getWidgetIdLogin(),
                               UTIL.getURL('checklogin'),
                               UTIL.getURL('inbox'), 
                               'loginPostProcess')
     self._addComponents()