Beispiel #1
0
    while i < len(users):
        if users[i][0] == user:
            num = i
        i = i + 1

    propic = users[num][3]
    desc = users[num][4].replace('!n', '<br>').replace('!col', ':')
    print '''
<html>
<head>
<title>''' + user + '''</title>
<link rel="stylesheet" type="text/css" href="profile.css">
<LINK REL="SHORTCUT ICON" HREF="favicon.png">
</head>
<body>
''' + mod.nav() + '''
<table class="hometable" width="100%">
<tr>
<td valign="top" align="left" width="40%">
<img src="../pics/propics/''' + propic + '''.jpg" width="230px">
<br><b>''' + user + '''</b><br>
<br><br><a href="viewlist.py?username=''' + username + '&id=' + magic + '&user='******'"> Click here to see ' + user + ''''s anime list</a><br><br>
''' + add + '''
<br><br>
''' + desc + '''
</td>
<td width="60%" valign="top">
''' + maketb(myp) + '''
</td>
</tr>
</table>
Beispiel #2
0
print

import mod,cgitb,cgi
cgitb.enable()

def l(DATA):
	return '<li>'+DATA+'</li>'
if mod.checklog():
	mod.swagin()
	user = mod.par('user')
	magic = mod.par('id')
	listfile = open('lists/'+user,'r')
	thelist = listfile.read()
	listfile.close()
	mod.style('profile.css',user+"'s List")
	print mod.nav()
	print '<h2>'+user+"'s anime list</h2>"
	if thelist != '':
		print '<ul>'
  	        thelist = thelist.split('\n<li>')
		for x in thelist:
			stuff = x.split('status:')
			listing = stuff[0]
			listing += '<br>Status: '+stuff[1]
			if stuff[1] == 'Watching':
				listing += '<br>Seen '+stuff[2]+' episodes'
			print l(listing)
	else:
		print '<h3>'+user+' has not added any shows to their watch list yet</h3>'	
	print '</body></html>'
Beispiel #3
0
print

import mod,cgitb
cgitb.enable()
if mod.checklog():
	mod.swagin()
	username = mod.par('username')
	magic = mod.par('id')
	print '''
<html>
<head>
<title>Home</title>
<link rel="stylesheet" type="text/css" href="profile.css">
<LINK REL="SHORTCUT ICON" HREF="favicon.png">
</head>
<body>
'''+mod.nav()+'''
<center>
<form action="addfunc.py" method="get">
Name of Show:<input type="text" name="showname"><br><br>
Synopsis (optional):<br>
<textarea name="synopsis" cols="50" rows="5"></textarea>
<input type="hidden" name="username" value="'''+username+'''">
<input type="hidden" name="id" value="'''+magic+'''"><br>
<table class="hometable"><col width="400"><tr><td><font size="1">
* Please be respectful and add shows that exist. Try to use the original Japanese name and capitalize the first letter of each word. Any griefers will be banished for eternity
</font></td></td></table>
<input type="submit" value="Make Post" class="post">
</form>
</center></body></html>'''
Beispiel #4
0
        mod.style('profile.css','My List')
        f=open("users.txt",'r')
        s=f.readlines()
        f.close()
        users=[]
        for i in s:
                users.append(i.strip('\n').strip().split(':'))
        i=0
        while i<len(users):
                if users[i][0]==username:
                    num=i
                i=i+1
        
        propic=users[num][3]
        desc=users[num][4].replace('!n','<br>').replace('!col',':')
        print mod.nav()
        print '''
<table class="hometable" width="100%">
<tr>
<td valign="top" width="40%">
<img src="../pics/propics/'''+propic+'''.jpg" width="230px">
<br><b>'''+username+'''</b>
<br><br>
'''+desc+'''
</td>
<td width="60%">
<center>
<h2> Your anime list</h2>'''
        if thelist != '':
#                print '<ol>'
                thelist = thelist.split('\n<li>')