Advertisement
Guest User

Untitled

a guest
May 17th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. | Field | Type | Null | | Default |
  2. _________________________________________________________
  3. | email | varchar(50) | YES | | NULL |
  4. | username | varchar(50) | YES | | NULL |
  5. | password | varchar(50) | YES | | NULL |
  6.  
  7. $def with (todos)
  8.  
  9. $for todo in todos:
  10.  
  11. <title>Red.Koala</title>
  12.  
  13. <body id="background">
  14.  
  15. <div id="header">
  16. -> Red.Koala <-
  17.  
  18. </div>
  19.  
  20. <div id="sign">
  21.  
  22. <form action="LANForum" method="post">
  23.  
  24. <table id="tr">
  25. <tr>
  26. Sign In:<br>
  27. </tr>
  28. </table>
  29.  
  30. Email:<br>
  31. <input id="signbox" type="text" name="email" placeholder="Ex: JoeSmith@example.com" required><br>
  32.  
  33. Username:<br>
  34. <input id="signbox" type="text" name="username" placeholder="Username..."required><br>
  35.  
  36. Password:<br>
  37. <input id="signbox" height="30" type="text" name="password" placeholder="Password..." required><br>
  38.  
  39. <input value="Submit" type="submit" id="signbox" style="margin-top: 20px; right: 5px; width: 50%;">
  40. </div>
  41. </form>
  42.  
  43. </div>
  44.  
  45. <div id="copyright">
  46. @HaydnFleming
  47. </div>
  48. <style>
  49. #background {
  50. background: #ff3333;
  51. margin-left: auto;
  52. margin-right: auto;
  53. width: 960px;
  54. }
  55. #header {
  56. border: solid #cc0000;
  57. border-width: 15px;
  58. font-size: 65px;
  59. text-align: center;
  60. }
  61. #sign{
  62. border: solid #cc0000;
  63. border-width: 15px;
  64. font-size: 30px;
  65. text-align: center;
  66. width: 30%;
  67. height: 40%;
  68. margin:auto;
  69. margin-top: 40px ;
  70. margin-bottom: 20%;
  71. }
  72. #signbox {
  73. width: 60%;
  74. height: 10%;
  75. margin-top: 10px;
  76. }
  77. #copyright{
  78. bottom: 2%;
  79. text-align: center;
  80. position: absolute;
  81. width:100%;
  82. }
  83. #tr {
  84. border: solid #cc0000;
  85. position: relative;
  86. width: 100%;
  87. border-bottom: transparent;
  88. border-left: transparent;
  89. border-right: transparent;
  90. }
  91. .dscrptn{
  92. text-align: center;
  93. width: 100%;
  94. position: relative;
  95. z-index: 5;
  96. }
  97. .dscrptn_p{
  98. width: 60%;
  99. text-align: center;
  100. margin: auto;
  101. margin-top: 4%;
  102. position: relative;
  103. border: solid #cc0000;
  104. border-width: 0px;
  105. }
  106. </style>
  107. </body>
  108.  
  109. import web
  110.  
  111. render = web.template.render('templates/')
  112.  
  113. urls = (
  114. '/', 'index', '/add', 'add', '/LANForum', 'LANForum'
  115. )
  116.  
  117. db = web.database(dbn = 'mysql', user = 'testuser', pw = 'MServer', db = 'testdb')
  118.  
  119. class index:
  120. def GET(self):
  121. todos = db.select('todo')
  122. return render.index(todos)
  123.  
  124. class add:
  125. def POST(self):
  126. i = web.input()
  127. n = db.insert('todo', email=i.email, username=i.username, password=i.password)
  128. raise web.seeother('LANForum')
  129.  
  130. if __name__ == "__main__":
  131. app = web.application(urls, globals())
  132. app.run()
  133.  
  134. <link type="text/css" rel="stylesheet" href="LANForum.css">
  135.  
  136. <title>Red.Koala</title>
  137.  
  138. <body id="background"> <!-- Only used to set up the main background colors/any images.-->
  139.  
  140. <div id="title">
  141. <!-- I decided to use the title as a nest
  142. for all the other divs to rest in that way
  143. they could all run off of the same measurements,
  144. and they could line up easily using similar
  145. percentages and pixel distances-->
  146.  
  147. <down>Red.Koala</down>
  148. <!--"down" is just a random word I used as a tag so that I could
  149. separate the text form the divs. also the "+ [Current Forum Title]"
  150. part means that when the website is actually running you will be able
  151. to see the website name and then the forum title. example: Red.Koala/Funny -->
  152.  
  153. <div id="user">[This is where the current users information will go]</div><!-- User information in the top right-->
  154.  
  155. <div id="list">[This is where a list of pop. forum topics will go.]</div>
  156. <!-- List of popular forums located on the middle right of the page.-->
  157.  
  158. <div id="mforum">[This is where your main forum will go.]
  159. <!-- Forum that you are currently on displayed in the big box in the middle of the screen.-->
  160. <div id="post-bar"><!-- Section of the Forum section where any and all posting/commenting will be done -->
  161. <form action="" onsubmit=""><!-- Assigned to whatever server space we select -->
  162. <textarea id="text-box" type="text" placeholder="Post..."></textarea>
  163. <!-- The box which the user will type in to post or comment things -->
  164. <input id="post-button" type="submit" value="Post" required>
  165. </form>
  166. </div>
  167. </div>
  168.  
  169. </div>
  170.  
  171. <div id="buttons"><!-- page numbers on display for the user to switch between pages.--> <!--currently not working as buttons-->
  172.  
  173. <table>
  174.  
  175. <tr>
  176. <td>1</td>
  177. <td>2</td>
  178. <td>3</td>
  179. <td>4</td> <!-- Each cell contains a different page number-->
  180. <td>5</td>
  181. <td>6</td>
  182. <td>7</td>
  183. <td>8</td>
  184. <td>9</td>
  185. <td>10</td>
  186. <td>...</td>
  187. </tr>
  188. </table>
  189.  
  190. </div>
  191. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement