#!/usr/local/bin/python
# -*- coding: UTF-8 -*-

import Cookie
import cgi
import cgitb; cgitb.enable()  # for troubleshooting
import Player
import os

print "Content-type: text/html"
print

print """
<html>

<head><link rel="stylesheet" type="text/css" href="battle.css" media="screen" />
<title>Sample CGI Script</title></head>

<body>

  <h1> <b>WELCOME TO BADDASSLESHIP! </b></h1>
  
  <br/>
  <h3>Please enter your login name</h3>
  
"""
thecookie = os.environ.get('HTTP_COOKIE')
#print thecookie
print "<p />"
#print thecookie.split(";")[0].split("=")[1]
#print thecookie.split(";")[2].split("=")[1]
#print thecookie.split(";")[3].split("=")[1]

print """

  <p>

  <form method="post" action="cookie.cgi">
    <p>Username <input type="text" name="user" /></p>

	<input type="submit" value = "Look for an Opponent!"/>
  </form>

</body>

</html>

""" 



		