from flask import session , g , render_template
from models . iccardext import OperatorModel
from vwAppConfigParam import vwAppConfigParam
__all__ = [
 "wgcomm_before_request" ,
 "wgcomm_404_error" ,
 "wgcomm_401_error" ,
 "wgcomm_500_error" ,
 ]
if 82 - 82: Iii1i
def wgcomm_before_request ( ) :
 if "user_id" in session :
  Ii = session . get ( 'user_id' )
  try :
   i11i1 = OperatorModel . query . get ( Ii )
   if "extfunc5678_queryswipe_byusername_name" in session :
   # user.f_OperatorName = session.get('extfunc5678_queryswipe_byusername_name') #
    i11i1 = None
    vwAppConfigParam . extfunc5678_queryswipe_byusername_name = session . get ( 'extfunc5678_queryswipe_byusername_name' )
   else :
    vwAppConfigParam . extfunc5678_queryswipe_byusername_name = None
    if 26 - 26: o0Ooo0OOO * IiI / OOo0O0oOo0O . ooo0oOoooOOO0 * Ii1I111 + i1iiIII111
   setattr ( g , "user" , i11i1 )
   setattr ( g , "extfunc5678_timeprofile" , vwAppConfigParam . extfunc5678_timeprofile > 0 )
   setattr ( g , "extfunc5678_photo" , vwAppConfigParam . extfunc5678_photo > 0 )
   setattr ( g , "extfunc5678_RealtimeGetSwipe" , vwAppConfigParam . extfunc5678_RealtimeGetSwipe > 0 )
   setattr ( g , "extfunc5678_face" , vwAppConfigParam . extfunc5678_face > 0 )
   setattr ( g , "extfunc5678_Meal" , vwAppConfigParam . extfunc5678_Meal > 0 )
   setattr ( g , "extfunc5678_multi_card" , vwAppConfigParam . extfunc5678_multi_card > 0 )
   setattr ( g , "extfunc5678_fire_warn" , vwAppConfigParam . extfunc5678_fire_warn > 0 )
   setattr ( g , "extfunc5678_inter_lock" , vwAppConfigParam . extfunc5678_inter_lock > 0 )
   setattr ( g , "extfunc5678_anti_back" , vwAppConfigParam . extfunc5678_anti_back > 0 )
   setattr ( g , "extfunc5678_queryswipe_byusername_name" , vwAppConfigParam . extfunc5678_queryswipe_byusername_name )
   setattr ( g , "extfunc5678_tasklist" , vwAppConfigParam . extfunc5678_tasklist > 0 )
   setattr ( g , "extfunc5678_elevator" , vwAppConfigParam . extfunc5678_elevator > 0 )
   setattr ( g , "extfunc5678_console_displayMoreLog" , vwAppConfigParam . extfunc5678_console_displayMoreLog > 0 )
   setattr ( g , "extfunc5678_console_location_query" , vwAppConfigParam . extfunc5678_console_location_query > 0 )
   setattr ( g , "extfunc5678_develop_mode" , vwAppConfigParam . extfunc5678_develop_mode > 0 )
   if 29 - 29: iI + o00Oo - OOoOoo000O00 * Oo0Oo - ii1I1iII1I1I . i1I1IiIIiIi1
  except Exception :
   pass
 if "server1001_ip" in session :
  if 93 - 93: iI111iiIi11i % Oo % Ooo0o
  try :
   setattr ( g , "server1001_ip" , session . get ( 'server1001_ip' ) )
   setattr ( g , "wgwsserver1001" , session . get ( 'wgwsserver1001' ) )
  except Exception :
   pass
   if 11 - 11: i1I1 - O000o / O0OO0OooooOo * ii % o0Ooo0OOO * iI
def wgcomm_404_error ( error ) :
 return render_template ( "errors/404.html" ) , 404
 if 9 - 9: Oo0Oo
 if 10 - 10: o00Oo / Ooo0o * O000o / O0OO0OooooOo / O0OO0OooooOo
def wgcomm_401_error ( error ) :
 return render_template ( "errors/401.html" ) , 401
 if 61 - 61: iI111iiIi11i - i1iiIII111
 if 13 - 13: iI111iiIi11i
def wgcomm_500_error ( error ) :
 return render_template ( "errors/500.html" ) , 500
 if 46 - 46: Oo - o0Ooo0OOO * OOo0O0oOo0O * o0Ooo0OOO
# dd678faae9ac167bc83abf78e5cb2f3f0688d3a3
