Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 01a7f585a60cc307a8a77bfc05f29e37dcdc4cff @rosslagerwall committed Apr 13, 2011
Showing with 15,194 additions and 0 deletions.
  1. +674 −0 COPYING
  2. +165 −0 COPYING.LESSER
  3. BIN Readme.odt
  4. BIN Readme.pdf
  5. +10 −0 Readme.txt
  6. +41 −0 addForum.php
  7. +49 −0 addForumExecute.php
  8. +85 −0 addPoll.php
  9. +131 −0 addPollExecute.php
  10. +40 −0 addTopic.php
  11. +151 −0 addTopicExecute.php
  12. +513 −0 basic.css
  13. +46 −0 class.Forum.php
  14. +61 −0 class.PM.php
  15. +78 −0 class.Poll.php
  16. +54 −0 class.Post.php
  17. +73 −0 class.Topic.php
  18. +95 −0 class.User.php
  19. +40 −0 common.php
  20. +55 −0 createImage.php
  21. +2 −0 db/Topics/0.dat
  22. +1 −0 db/Topics/0/posts.dat
  23. +8 −0 db/Topics/0/topic.dat
  24. 0 db/Topics/0sticky.dat
  25. +10 −0 db/Users/user.dat
  26. 0 db/boarddescription.dat
  27. 0 db/boardname.dat
  28. +1 −0 db/forumList.dat
  29. +1 −0 db/forumNo.dat
  30. 0 db/forumOnlineGuests.dat
  31. +1 −0 db/forumOnlineUsers.dat
  32. +5 −0 db/forumStatistics.dat
  33. +1 −0 db/topicNo.dat
  34. +1 −0 db/topicsperpage.dat
  35. +39 −0 editBoardSettings.php
  36. +67 −0 editBoardSettingsExecute.php
  37. +118 −0 editExecute.php
  38. +40 −0 editPost.php
  39. +89 −0 editPostExecute.php
  40. +29 −0 editTopic.php
  41. +23 −0 editTopicExecute.php
  42. +73 −0 editUser.php
  43. +100 −0 forumListChange.php
  44. +47 −0 forumListEdit.php
  45. +44 −0 forumListEditExecute.php
  46. +138 −0 function.OnlineList.php
  47. BIN images/bar.png
  48. BIN images/bl.gif
  49. BIN images/br.gif
  50. BIN images/grad.png
  51. BIN images/heading.png
  52. +78 −0 index.php
  53. +238 −0 install.php
  54. +30 −0 lockExecute.php
  55. +50 −0 login.php
  56. +39 −0 loginExecute.php
  57. +32 −0 loginHeader.php
  58. +10 −0 logout.php
  59. +164 −0 moderate.php
  60. +40 −0 moveTopic.php
  61. +104 −0 moveTopicExecute.php
  62. +37 −0 outHtml.php
  63. +43 −0 pmCompose.php
  64. +88 −0 pmComposeExecute.php
  65. +18 −0 pmDelete.php
  66. +57 −0 pmInbox.php
  67. +60 −0 pmView.php
  68. +138 −0 postExecute.php
  69. +62 −0 register.php
  70. +72 −0 registerExecute.php
  71. +108 −0 stickyExecute.php
  72. +9 −0 tiny.css
  73. +154 −0 tiny_mce/langs/en.js
  74. +5 −0 tiny_mce/plugins/advhr/css/advhr.css
  75. +1 −0 tiny_mce/plugins/advhr/editor_plugin.js
  76. +43 −0 tiny_mce/plugins/advhr/js/rule.js
  77. +5 −0 tiny_mce/plugins/advhr/langs/en_dlg.js
  78. +63 −0 tiny_mce/plugins/advhr/rule.htm
  79. +13 −0 tiny_mce/plugins/advimage/css/advimage.css
  80. +1 −0 tiny_mce/plugins/advimage/editor_plugin.js
  81. +238 −0 tiny_mce/plugins/advimage/image.htm
  82. BIN tiny_mce/plugins/advimage/img/sample.gif
  83. +441 −0 tiny_mce/plugins/advimage/js/image.js
  84. +43 −0 tiny_mce/plugins/advimage/langs/en_dlg.js
  85. +8 −0 tiny_mce/plugins/advlink/css/advlink.css
  86. +1 −0 tiny_mce/plugins/advlink/editor_plugin.js
  87. +527 −0 tiny_mce/plugins/advlink/js/advlink.js
  88. +52 −0 tiny_mce/plugins/advlink/langs/en_dlg.js
  89. +339 −0 tiny_mce/plugins/advlink/link.htm
  90. +1 −0 tiny_mce/plugins/contextmenu/editor_plugin.js
  91. +40 −0 tiny_mce/plugins/emotions/editor_plugin.js
  92. +55 −0 tiny_mce/plugins/emotions/emotions.htm
  93. BIN tiny_mce/plugins/emotions/img/smiley/smiley-cool.gif
  94. BIN tiny_mce/plugins/emotions/img/smiley/smiley-cry.gif
  95. BIN tiny_mce/plugins/emotions/img/smiley/smiley-embarassed.gif
  96. BIN tiny_mce/plugins/emotions/img/smiley/smiley-foot-in-mouth.gif
  97. BIN tiny_mce/plugins/emotions/img/smiley/smiley-frown.gif
  98. BIN tiny_mce/plugins/emotions/img/smiley/smiley-innocent.gif
  99. BIN tiny_mce/plugins/emotions/img/smiley/smiley-kiss.gif
  100. BIN tiny_mce/plugins/emotions/img/smiley/smiley-laughing.gif
  101. BIN tiny_mce/plugins/emotions/img/smiley/smiley-money-mouth.gif
  102. BIN tiny_mce/plugins/emotions/img/smiley/smiley-sealed.gif
  103. BIN tiny_mce/plugins/emotions/img/smiley/smiley-smile.gif
  104. BIN tiny_mce/plugins/emotions/img/smiley/smiley-surprised.gif
  105. BIN tiny_mce/plugins/emotions/img/smiley/smiley-tongue-out.gif
  106. BIN tiny_mce/plugins/emotions/img/smiley/smiley-undecided.gif
  107. BIN tiny_mce/plugins/emotions/img/smiley/smiley-wink.gif
  108. BIN tiny_mce/plugins/emotions/img/smiley/smiley-yell.gif
  109. +22 −0 tiny_mce/plugins/emotions/js/emotions.js
  110. +20 −0 tiny_mce/plugins/emotions/langs/en_dlg.js
  111. +10 −0 tiny_mce/plugins/emotions/part1.txt
  112. +40 −0 tiny_mce/plugins/emotions/part3.txt
  113. +3 −0 tiny_mce/plugins/emotions/part5.txt
  114. +1 −0 tiny_mce/plugins/inlinepopups/editor_plugin.js
  115. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
  116. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
  117. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
  118. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
  119. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
  120. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
  121. BIN tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
  122. +90 −0 tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
  123. +387 −0 tiny_mce/plugins/inlinepopups/template.htm
  124. +1 −0 tiny_mce/plugins/insertdatetime/editor_plugin.js
  125. +22 −0 tiny_mce/plugins/paste/blank.htm
  126. +14 −0 tiny_mce/plugins/paste/css/blank.css
  127. +3 −0 tiny_mce/plugins/paste/css/pasteword.css
  128. +1 −0 tiny_mce/plugins/paste/editor_plugin.js
  129. +42 −0 tiny_mce/plugins/paste/js/pastetext.js
  130. +56 −0 tiny_mce/plugins/paste/js/pasteword.js
  131. +5 −0 tiny_mce/plugins/paste/langs/en_dlg.js
  132. +34 −0 tiny_mce/plugins/paste/pastetext.htm
  133. +29 −0 tiny_mce/plugins/paste/pasteword.htm
  134. +1 −0 tiny_mce/plugins/preview/editor_plugin.js
  135. +28 −0 tiny_mce/plugins/preview/example.html
  136. +73 −0 tiny_mce/plugins/preview/jscripts/embed.js
  137. +19 −0 tiny_mce/plugins/preview/preview.html
  138. +1 −0 tiny_mce/plugins/safari/blank.htm
  139. +1 −0 tiny_mce/plugins/safari/editor_plugin.js
  140. +6 −0 tiny_mce/plugins/searchreplace/css/searchreplace.css
  141. +1 −0 tiny_mce/plugins/searchreplace/editor_plugin.js
  142. +126 −0 tiny_mce/plugins/searchreplace/js/searchreplace.js
  143. +16 −0 tiny_mce/plugins/searchreplace/langs/en_dlg.js
  144. +105 −0 tiny_mce/plugins/searchreplace/searchreplace.htm
  145. +20 −0 tiny_mce/plugins/spellchecker/changelog
  146. +66 −0 tiny_mce/plugins/spellchecker/classes/EnchantSpell.php
  147. +158 −0 tiny_mce/plugins/spellchecker/classes/GoogleSpell.php
  148. +81 −0 tiny_mce/plugins/spellchecker/classes/PSpell.php
  149. +112 −0 tiny_mce/plugins/spellchecker/classes/PSpellShell.php
  150. +61 −0 tiny_mce/plugins/spellchecker/classes/SpellChecker.php
  151. +595 −0 tiny_mce/plugins/spellchecker/classes/utils/JSON.php
  152. +268 −0 tiny_mce/plugins/spellchecker/classes/utils/Logger.php
  153. +22 −0 tiny_mce/plugins/spellchecker/config.php
  154. +1 −0 tiny_mce/plugins/spellchecker/css/content.css
  155. +1 −0 tiny_mce/plugins/spellchecker/editor_plugin.js
  156. BIN tiny_mce/plugins/spellchecker/img/wline.gif
  157. +98 −0 tiny_mce/plugins/spellchecker/includes/general.php
  158. +111 −0 tiny_mce/plugins/spellchecker/rpc.php
  159. +184 −0 tiny_mce/plugins/table/cell.htm
  160. +17 −0 tiny_mce/plugins/table/css/cell.css
  161. +25 −0 tiny_mce/plugins/table/css/row.css
  162. +13 −0 tiny_mce/plugins/table/css/table.css
  163. +1 −0 tiny_mce/plugins/table/editor_plugin.js
  164. +269 −0 tiny_mce/plugins/table/js/cell.js
  165. +29 −0 tiny_mce/plugins/table/js/merge_cells.js
  166. +212 −0 tiny_mce/plugins/table/js/row.js
  167. +413 −0 tiny_mce/plugins/table/js/table.js
  168. +74 −0 tiny_mce/plugins/table/langs/en_dlg.js
  169. +38 −0 tiny_mce/plugins/table/merge_cells.htm
  170. +161 −0 tiny_mce/plugins/table/row.htm
  171. +193 −0 tiny_mce/plugins/table/table.htm
  172. +12 −0 tiny_mce/plugins/template/blank.htm
  173. +23 −0 tiny_mce/plugins/template/css/template.css
  174. +1 −0 tiny_mce/plugins/template/editor_plugin.js
  175. +106 −0 tiny_mce/plugins/template/js/template.js
  176. +15 −0 tiny_mce/plugins/template/langs/en_dlg.js
  177. +39 −0 tiny_mce/plugins/template/template.htm
  178. +56 −0 tiny_mce/themes/advanced/about.htm
  179. +32 −0 tiny_mce/themes/advanced/anchor.htm
  180. +54 −0 tiny_mce/themes/advanced/charmap.htm
  181. +76 −0 tiny_mce/themes/advanced/color_picker.htm
  182. +1 −0 tiny_mce/themes/advanced/editor_template.js
  183. +86 −0 tiny_mce/themes/advanced/image.htm
  184. BIN tiny_mce/themes/advanced/img/colorpicker.jpg
  185. BIN tiny_mce/themes/advanced/img/icons.gif
  186. +72 −0 tiny_mce/themes/advanced/js/about.js
  187. +37 −0 tiny_mce/themes/advanced/js/anchor.js
  188. +325 −0 tiny_mce/themes/advanced/js/charmap.js
  189. +253 −0 tiny_mce/themes/advanced/js/color_picker.js
  190. +245 −0 tiny_mce/themes/advanced/js/image.js
  191. +155 −0 tiny_mce/themes/advanced/js/link.js
  192. +62 −0 tiny_mce/themes/advanced/js/source_editor.js
  193. +62 −0 tiny_mce/themes/advanced/langs/en.js
  194. +51 −0 tiny_mce/themes/advanced/langs/en_dlg.js
  195. +64 −0 tiny_mce/themes/advanced/link.htm
  196. +32 −0 tiny_mce/themes/advanced/skins/default/content.css
  197. +114 −0 tiny_mce/themes/advanced/skins/default/dialog.css
  198. BIN tiny_mce/themes/advanced/skins/default/img/buttons.png
  199. BIN tiny_mce/themes/advanced/skins/default/img/items.gif
  200. BIN tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif
  201. BIN tiny_mce/themes/advanced/skins/default/img/menu_check.gif
  202. BIN tiny_mce/themes/advanced/skins/default/img/progress.gif
  203. BIN tiny_mce/themes/advanced/skins/default/img/tabs.gif
  204. +214 −0 tiny_mce/themes/advanced/skins/default/ui.css
  205. +32 −0 tiny_mce/themes/advanced/skins/o2k7/content.css
  206. +113 −0 tiny_mce/themes/advanced/skins/o2k7/dialog.css
  207. BIN tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png
  208. BIN tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png
  209. BIN tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png
  210. +215 −0 tiny_mce/themes/advanced/skins/o2k7/ui.css
  211. +8 −0 tiny_mce/themes/advanced/skins/o2k7/ui_black.css
  212. +5 −0 tiny_mce/themes/advanced/skins/o2k7/ui_silver.css
  213. +32 −0 tiny_mce/themes/advanced/source_editor.htm
  214. +1 −0 tiny_mce/tiny_mce.js
  215. +294 −0 tiny_mce/tiny_mce_popup.js
  216. +69 −0 tiny_mce/utils/editable_selects.js
  217. +199 −0 tiny_mce/utils/form_utils.js
  218. +76 −0 tiny_mce/utils/mctabs.js
  219. +219 −0 tiny_mce/utils/validate.js
  220. +76 −0 tiny_mce_init.js
  221. +51 −0 userAdmin.php
  222. +40 −0 userAdminExecute.php
  223. +31 −0 userList.php
  224. +192 −0 viewPosts.php
  225. +164 −0 viewTopics.php
  226. +80 −0 viewUser.php
  227. +24 −0 voteExecute.php
674 COPYING

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,10 @@
+FlooBB 0.9
+Copyright 2009. shiz
+
+This software is released under the LGPL.
+
+FlooBB is an easy to use bulletin board system which does not rely on an external database. It simply uses text files to store the data and is optimized for speed. It incorporates TinyMCE to provide a WYSIWYG method of entering posts into the system.
+
+Usage:
+
+Simply extract the contents of the release to a directory on your server and browse to this directory using your web browser. The install.php script will run. You will have to input some details about the administrator account. Once you are done, delete or rename install.php and then once again, go to the directory with your web browser. You should see the main page of the forum. The html of the board may be customized by changing OutHtml.php.
@@ -0,0 +1,41 @@
+<?php
+ include("common.php");
+
+ outHtml1("Add Forum");
+?>
+
+<!-- TinyMCE -->
+<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
+<script type="text/javascript" src="tiny_mce_init.js"></script>
+
+<?php
+ outHtml2("Add Forum:", "index.php");
+?>
+ <form action="addForumExecute.php" method="post">
+ <table class="tbl">
+ <tr>
+ <td class="tblleft">Forum Name</td>
+ <td class="tblright"><input type="text" name="name"/></td>
+ </tr>
+ <tr>
+ <td class="tblleft">Forum Description</td>
+ <td class="tblright">
+ <div style="margin-left: 1%; padding: 0;"><textarea name="description" id="description"></textarea></div>
+ </td>
+ </tr>
+ </table>
+ <?php
+ if ($_GET['error'] == 1)
+ {
+ echo "<div class='error'>Please enter a forum name!</div>";
+ }
+ else if ($_GET['error'] == 2)
+ {
+ echo "<div class='error'>Please enter a forum description!</div>";
+ }
+ ?>
+ <div id="submitDiv"><input type="submit" value="Add Forum" /></div>
+ </form>
+<?php
+ outHtml3();
+?>
@@ -0,0 +1,49 @@
+<?php
+ include("common.php");
+
+ $name = stripslashes($_POST['name']);
+ $name = str_replace("\n","",$name);
+ $name = str_replace("\r\n","",$name);
+ $name = str_replace("\r","",$name);
+ $name = str_replace("~","",$name);
+ $description = stripslashes($_POST['description']);
+ $description = str_replace("\n","",$description);
+ $description = str_replace("\r\n","",$description);
+ $description = str_replace("\r","",$description);
+ $description = str_replace("~","",$description);
+ $description = substr($description,3,strlen($description)-7);
+
+ if (trim($name) == "")
+ {
+ header("Location: addForum.php?error=1");
+ exit();
+ }
+ if (trim($description) == "")
+ {
+ header("Location: addForum.php?error=2");
+ exit();
+ }
+
+ $forumId = trim(file_get_contents("db/forumNo.dat"));
+
+ $fh = fopen("db/forumList.dat","a");
+ fwrite($fh,$forumId."~".$name."~".$description."~0~0\n");
+ fclose($fh);
+
+ file_put_contents("db/Topics/".$forumId.".dat","");
+ file_put_contents("db/Topics/".$forumId."sticky.dat","");
+
+ file_put_contents("db/forumNo.dat",($forumId+1)."\n");
+
+ //***********************
+ $fileC = file("db/forumStatistics.dat",FILE_IGNORE_NEW_LINES);
+ $fileC[0] = trim($fileC[0]) + 1;
+ $str = "";
+ foreach ($fileC as $statistic)
+ {
+ $str .= $statistic."\n";
+ }
+ file_put_contents("db/forumStatistics.dat",$str);
+
+ header("Location: index.php");
+?>
@@ -0,0 +1,85 @@
+<?php
+ include("common.php");
+ outHtml1("Add Poll");
+?>
+
+<script>
+ function add()
+ {
+ if (document.getElementById("table").rows.length < 12)
+ {
+ //alert("asdgsdg");
+ var row = document.getElementById("table").insertRow(-1);
+ var cell = row.insertCell(-1);
+ cell.className = "tblleft";
+ var text = document.createElement("span");
+ text.appendChild(document.createTextNode("Option"));
+ text.style.textDecoration = "underline";
+ cell.appendChild(text);
+ var delButton = document.createElement("input");
+ delButton.type = "button";
+ delButton.name = "delButton";
+ delButton.setAttribute("value","Delete");
+ delButton.setAttribute("onClick","del("+(document.getElementById("table").rows.length-1)+");");
+ delButton.style.marginLeft = "10px";
+ delButton.id = document.getElementById("table").rows.length-1;
+ cell.appendChild(delButton);
+ var cell = row.insertCell(-1);
+ cell.className = "tblright";
+ var inputBox = document.createElement("input");
+ inputBox.type = "text";
+ inputBox.name = "option[]";
+ cell.appendChild(inputBox);
+ }
+ }
+
+ function del(num)
+ {
+ document.getElementById("table").deleteRow(num);
+ for (i = 2; i < document.getElementById("table").rows.length; i++)
+ {
+ document.getElementById("table").rows[i].cells[0].lastChild.setAttribute("onClick","del("+i+");");
+ }
+ }
+</script>
+<?php
+ outHtml2("Add Poll:", "viewTopics.php?forumId=".$_GET['forumId']);
+?>
+
+ <form action="addPollExecute.php?forumId=<?php echo $_GET['forumId']?>" method="post">
+ <table class="tbl" id="table">
+ <tr>
+ <td class="tblleft"><u>Poll Question</u></td>
+ <td class="tblright"><input type="text" name="pollQuestion"/></td>
+ </tr>
+ <tr>
+ <td class="tblleft"><u>Number Of Days (0 is forever)</u></td>
+ <td class="tblright"><input type="text" name="pollLength" value="0" /></td>
+ </tr>
+ <tr>
+ <td class="tblleft"><u>Option</u><input type="button" style="margin-left: 10px" name="delButton" id="2" value="Delete" onClick="del(2)" /></td>
+ <td class="tblright"><input type="text" name="option[]" /></td>
+ </tr>
+ <tr>
+ <td class="tblleft"><u>Option</u><input type="button" style="margin-left: 10px" name="delButton" id="3" value="Delete" onClick="del(3)" /></td>
+ <td class="tblright"><input type="text" name="option[]" /></td>
+ </tr>
+ </table>
+ <?php
+ if ($_GET['error'] == 1)
+ {
+ echo "<div class='error'>Please enter a poll question!</div>";
+ }
+ else if ($_GET['error'] == 2)
+ {
+ echo "<div class='error'>Please fill in all the visible options.</div>";
+ }
+ ?>
+ <div class="buttons">
+ <input type="button" name="addOption" value="Add Option" onClick="add();" />
+ <input type="submit" name="submit" value="Add Poll" />
+ </div>
+ </form>
+<?php
+ outHtml3();
+?>
Oops, something went wrong.

0 comments on commit 01a7f58

Please sign in to comment.