Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- | Field | Type | Null | | Default |
- _________________________________________________________
- | email | varchar(50) | YES | | NULL |
- | username | varchar(50) | YES | | NULL |
- | password | varchar(50) | YES | | NULL |
- $def with (todos)
- $for todo in todos:
- <title>Red.Koala</title>
- <body id="background">
- <div id="header">
- -> Red.Koala <-
- </div>
- <div id="sign">
- <form action="LANForum" method="post">
- <table id="tr">
- <tr>
- Sign In:<br>
- </tr>
- </table>
- Email:<br>
- <input id="signbox" type="text" name="email" placeholder="Ex: JoeSmith@example.com" required><br>
- Username:<br>
- <input id="signbox" type="text" name="username" placeholder="Username..."required><br>
- Password:<br>
- <input id="signbox" height="30" type="text" name="password" placeholder="Password..." required><br>
- <input value="Submit" type="submit" id="signbox" style="margin-top: 20px; right: 5px; width: 50%;">
- </div>
- </form>
- </div>
- <div id="copyright">
- @HaydnFleming
- </div>
- <style>
- #background {
- background: #ff3333;
- margin-left: auto;
- margin-right: auto;
- width: 960px;
- }
- #header {
- border: solid #cc0000;
- border-width: 15px;
- font-size: 65px;
- text-align: center;
- }
- #sign{
- border: solid #cc0000;
- border-width: 15px;
- font-size: 30px;
- text-align: center;
- width: 30%;
- height: 40%;
- margin:auto;
- margin-top: 40px ;
- margin-bottom: 20%;
- }
- #signbox {
- width: 60%;
- height: 10%;
- margin-top: 10px;
- }
- #copyright{
- bottom: 2%;
- text-align: center;
- position: absolute;
- width:100%;
- }
- #tr {
- border: solid #cc0000;
- position: relative;
- width: 100%;
- border-bottom: transparent;
- border-left: transparent;
- border-right: transparent;
- }
- .dscrptn{
- text-align: center;
- width: 100%;
- position: relative;
- z-index: 5;
- }
- .dscrptn_p{
- width: 60%;
- text-align: center;
- margin: auto;
- margin-top: 4%;
- position: relative;
- border: solid #cc0000;
- border-width: 0px;
- }
- </style>
- </body>
- import web
- render = web.template.render('templates/')
- urls = (
- '/', 'index', '/add', 'add', '/LANForum', 'LANForum'
- )
- db = web.database(dbn = 'mysql', user = 'testuser', pw = 'MServer', db = 'testdb')
- class index:
- def GET(self):
- todos = db.select('todo')
- return render.index(todos)
- class add:
- def POST(self):
- i = web.input()
- n = db.insert('todo', email=i.email, username=i.username, password=i.password)
- raise web.seeother('LANForum')
- if __name__ == "__main__":
- app = web.application(urls, globals())
- app.run()
- <link type="text/css" rel="stylesheet" href="LANForum.css">
- <title>Red.Koala</title>
- <body id="background"> <!-- Only used to set up the main background colors/any images.-->
- <div id="title">
- <!-- I decided to use the title as a nest
- for all the other divs to rest in that way
- they could all run off of the same measurements,
- and they could line up easily using similar
- percentages and pixel distances-->
- <down>Red.Koala</down>
- <!--"down" is just a random word I used as a tag so that I could
- separate the text form the divs. also the "+ [Current Forum Title]"
- part means that when the website is actually running you will be able
- to see the website name and then the forum title. example: Red.Koala/Funny -->
- <div id="user">[This is where the current users information will go]</div><!-- User information in the top right-->
- <div id="list">[This is where a list of pop. forum topics will go.]</div>
- <!-- List of popular forums located on the middle right of the page.-->
- <div id="mforum">[This is where your main forum will go.]
- <!-- Forum that you are currently on displayed in the big box in the middle of the screen.-->
- <div id="post-bar"><!-- Section of the Forum section where any and all posting/commenting will be done -->
- <form action="" onsubmit=""><!-- Assigned to whatever server space we select -->
- <textarea id="text-box" type="text" placeholder="Post..."></textarea>
- <!-- The box which the user will type in to post or comment things -->
- <input id="post-button" type="submit" value="Post" required>
- </form>
- </div>
- </div>
- </div>
- <div id="buttons"><!-- page numbers on display for the user to switch between pages.--> <!--currently not working as buttons-->
- <table>
- <tr>
- <td>1</td>
- <td>2</td>
- <td>3</td>
- <td>4</td> <!-- Each cell contains a different page number-->
- <td>5</td>
- <td>6</td>
- <td>7</td>
- <td>8</td>
- <td>9</td>
- <td>10</td>
- <td>...</td>
- </tr>
- </table>
- </div>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement