Beispiel #1
0
def action():
  key = form['key'].value
  if key == 'login':
    login()
    return
  if gen.login_check() == False:
    gen.login_redirect()

  else:
    gen.print_header()
    if key == 'wifi':
      wifi()
    if key == 'privacy':
      privacy()
    if key == 'passwd':
      passwd()
    gen.print_footer()
    print '\
Beispiel #2
0
def action():
    key = form['key'].value
    if key == 'login':
        login()
        return
    if gen.login_check() == False:
        gen.login_redirect()

    else:
        gen.print_header()
        if key == 'wifi':
            wifi()
        if key == 'privacy':
            privacy()
        if key == 'passwd':
            passwd()
        gen.print_footer()
        print '\
Beispiel #3
0
  gen.print_header(': Private Browsing')
  priv = gen.currval('PRIVACY_MODE')
  priv = priv.replace('"','')
  priv = priv.replace('\n','')
  if priv.upper() != 'ON':
    print '\
    <p>No privacy options available\
    '
    return
  print '\
  <form action="done.py" method="post">\
  <input type = hidden name="key" value = "privacy" />\
  \
  How long do you want private browsing enabled?\
  <input type=radio name="dur" value="5">5 minutes\
  <input type=radio name="dur" value="15">15 minutes\
  <input type=radio name="dur" value="30">30 minutes\
   \
  <p><input type="submit" value="Submit" id="submit"/>\
  </form>\
  '
  gen.print_footer()
  print '\
  </html>\
  '

if gen.login_check() == False:
  gen.login_redirect()
else:
  priv_options()
Beispiel #4
0
#!/usr/bin/env python
import os
import cgi
import cgitb
import gen

cgitb.enable()

if gen.login_check() == False:
    gen.login_redirect()

else:
    gen.login_refresh()
    gen.print_header()
    print '\
  <p><a href=wifi.py>Change Wireless Settings</a>\
  <p><a href=privacy.py>Change Privacy Settings</a>\
  <p><a href=passwd.py>Change Web Password</a>\
  <p><a href=logout.py>Logout</a>\
  <p> IP %s\
  </html>\
  ' % (os.environ['REMOTE_ADDR'])