Exemplo n.º 1
0
=======
>>>>>>> origin/master
import cgi
import SkyRealmDatabaseAPI
arguments = cgi.FieldStorage()
username = arguments.getvalue("username")
password = arguments.getvalue("password")
email = arguments.getvalue("email")

if username == None or password == None or email == None:
    print "Missing parameters"
else:
<<<<<<< HEAD


    if SkyRealmDatabaseAPI.profanity_filter(username.lower()) == "Profanity!":
        print "Invalid username, username may not contain vulgar language!"



    if len(password) < 4:
        print "Password must exceed 4 characters!"
    elif len(password) > 16:
        print "Password must be less than 16 characters!"
    if password == username:
        print "password cannot be the same as your username!"
    else:
        SkyRealmDatabaseAPI.create_account(username, password, email)
        print "Success"
=======
    if SkyRealmDatabaseAPI.profanity_filter(username.lower()) == "Profanity!":
Exemplo n.º 2
0
#! /usr/bin/python
print "Context-type: text/html\n\n"

import SkyRealmDatabaseAPI
import cgi
cgi.FieldStorage()
arguments = cgi.FieldStorage()
UserSending = arguments.getvalue("UserSending")
UserReceiving = arguments.getvalue("UserReceiving")

if UserSending == None or UserReceiving == None:
    print "parameter missing!"
else:
    SkyRealmDatabaseAPI.accept_friend_request(UserSending, UserReceiving)
Exemplo n.º 3
0
#! /usr/bin/python
print "Context-type: text/html\n\n"

import SkyRealmDatabaseAPI
import cgi
cgi.FieldStorage()
arguments = cgi.FieldStorage()
username = arguments.getvalue("username")
password = arguments.getvalue("password")
email = arguments.getvalue("email")

if username == None and email == None or password == None:
    print "parameter missing!"
else:
    SkyRealmDatabaseAPI.login_script(username, password)
Exemplo n.º 4
0
#! /usr/bin/python
print "Context-type: text/html\n\n"

import SkyRealmDatabaseAPI
import cgi
cgi.FieldStorage()
arguments = cgi.FieldStorage()
UserSending = arguments.getvalue("UserSending")
UserReceiving = arguments.getvalue("UserReceiving")

if UserSending == None or UserReceiving == None:
    print "parameter missing!"
else:
    SkyRealmDatabaseAPI.delete_friend(UserSending, UserReceiving)
Exemplo n.º 5
0
#! /usr/bin/python
print "Context-type: text/html\n\n"
import SkyRealmDatabaseAPI
import cgi
import json

cgi.FieldStorage()
arguments = cgi.FieldStorage()
username = arguments.getvalue("username")


if username == None:
    print "parameter missing!"
else:
    print json.dumps(SkyRealmDatabaseAPI.list_pending_friends(username))