impostor 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/History.txt +4 -0
  2. data/Manifest.txt +50 -0
  3. data/README.txt +65 -0
  4. data/Rakefile +40 -0
  5. data/lib/impostor.rb +6 -0
  6. data/lib/www/impostor/phpbb2.rb +260 -0
  7. data/lib/www/impostor/wwf79.rb +254 -0
  8. data/lib/www/impostor/wwf80.rb +264 -0
  9. data/lib/www/impostor.rb +269 -0
  10. data/test/fixtures/phpbb2-get-new_topic-form-good-response.html +725 -0
  11. data/test/fixtures/phpbb2-get-viewtopic-for-new-topic-good-response.html +364 -0
  12. data/test/fixtures/phpbb2-get-viewtopic-for-new-topic-malformed-response.html +364 -0
  13. data/test/fixtures/phpbb2-index.html +361 -0
  14. data/test/fixtures/phpbb2-logged-in.html +349 -0
  15. data/test/fixtures/phpbb2-login.html +306 -0
  16. data/test/fixtures/phpbb2-not-logged-in.html +349 -0
  17. data/test/fixtures/phpbb2-post-new_topic-good-response.html +290 -0
  18. data/test/fixtures/phpbb2-post-reply-good-response.html +290 -0
  19. data/test/fixtures/phpbb2-post-reply-throttled-response.html +290 -0
  20. data/test/fixtures/phpbb2-too-many-posts.html +290 -0
  21. data/test/fixtures/wwf79-forum_posts.html +422 -0
  22. data/test/fixtures/wwf79-general-new-topic-error.html +46 -0
  23. data/test/fixtures/wwf79-general-posting-error.html +46 -0
  24. data/test/fixtures/wwf79-good-post-forum_posts.html +462 -0
  25. data/test/fixtures/wwf79-index.html +137 -0
  26. data/test/fixtures/wwf79-logged-in.html +46 -0
  27. data/test/fixtures/wwf79-login.html +123 -0
  28. data/test/fixtures/wwf79-new-topic-forum_posts-response.html +305 -0
  29. data/test/fixtures/wwf79-new-topic-post_message_form.html +212 -0
  30. data/test/fixtures/wwf79-not-logged-in.html +128 -0
  31. data/test/fixtures/wwf79-too-many-posts.html +46 -0
  32. data/test/fixtures/wwf79-too-many-topics.html +46 -0
  33. data/test/fixtures/wwf80-general-posting-error.html +54 -0
  34. data/test/fixtures/wwf80-get-new_topic-form-good-response.html +217 -0
  35. data/test/fixtures/wwf80-get-viewtopic-for-new-topic-good-response.html +290 -0
  36. data/test/fixtures/wwf80-index.html +371 -0
  37. data/test/fixtures/wwf80-logged-in.html +52 -0
  38. data/test/fixtures/wwf80-login.html +125 -0
  39. data/test/fixtures/wwf80-new_reply_form.html +204 -0
  40. data/test/fixtures/wwf80-not-logged-in.html +136 -0
  41. data/test/fixtures/wwf80-post-new_topic-good-response.html +293 -0
  42. data/test/fixtures/wwf80-post-reply-good-response.html +331 -0
  43. data/test/fixtures/wwf80-too-many-posts.html +54 -0
  44. data/test/test_helper.rb +38 -0
  45. data/test/test_www_impostor.rb +165 -0
  46. data/test/test_www_impostor_phpbb2.rb +536 -0
  47. data/test/test_www_impostor_wwf79.rb +535 -0
  48. data/test/test_www_impostor_wwf80.rb +535 -0
  49. data/vendor/plugins/impostor/lib/autotest/discover.rb +3 -0
  50. data/vendor/plugins/impostor/lib/autotest/impostor.rb +49 -0
  51. data.tar.gz.sig +3 -0
  52. metadata +156 -0
  53. metadata.gz.sig +3 -0
@@ -0,0 +1,725 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
+ <html dir="ltr"><head>
3
+
4
+
5
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
+ <meta http-equiv="Content-Style-Type" content="text/css"><title>yourdomain.com :: Post a new topic</title><!-- link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css" -->
7
+
8
+
9
+
10
+
11
+ <style type="text/css">
12
+ <!--
13
+ /*
14
+ The original subSilver Theme for phpBB version 2+
15
+ Created by subBlue design
16
+ http://www.subBlue.com
17
+
18
+ NOTE: These CSS definitions are stored within the main page body so that you can use the phpBB2
19
+ theme administration centre. When you have finalised your style you could cut the final CSS code
20
+ and place it in an external file, deleting this section to save bandwidth.
21
+ */
22
+
23
+ /* General page style. The scroll bar colours only visible in IE5.5+ */
24
+ body {
25
+ background-color: #E5E5E5;
26
+ scrollbar-face-color: #DEE3E7;
27
+ scrollbar-highlight-color: #FFFFFF;
28
+ scrollbar-shadow-color: #DEE3E7;
29
+ scrollbar-3dlight-color: #D1D7DC;
30
+ scrollbar-arrow-color: #006699;
31
+ scrollbar-track-color: #EFEFEF;
32
+ scrollbar-darkshadow-color: #98AAB1;
33
+ }
34
+
35
+ /* General font families for common tags */
36
+ font,th,td,p { font-family: Verdana, Arial, Helvetica, sans-serif }
37
+ a:link,a:active,a:visited { color : #006699; }
38
+ a:hover { text-decoration: underline; color : #DD6900; }
39
+ hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
40
+
41
+ /* This is the border line & background colour round the entire page */
42
+ .bodyline { background-color: #FFFFFF; border: 1px #98AAB1 solid; }
43
+
44
+ /* This is the outline round the main forum tables */
45
+ .forumline { background-color: #FFFFFF; border: 2px #006699 solid; }
46
+
47
+ /* Main table cell colours and backgrounds */
48
+ td.row1 { background-color: #EFEFEF; }
49
+ td.row2 { background-color: #DEE3E7; }
50
+ td.row3 { background-color: #D1D7DC; }
51
+
52
+ /*
53
+ This is for the table cell above the Topics, Post & Last posts on the index.php page
54
+ By default this is the fading out gradiated silver background.
55
+ However, you could replace this with a bitmap specific for each forum
56
+ */
57
+ td.rowpic {
58
+ background-color: #FFFFFF;
59
+ background-image: url(templates/subSilver/images/cellpic2.jpg);
60
+ background-repeat: repeat-y;
61
+ }
62
+
63
+ /* Header cells - the blue and silver gradient backgrounds */
64
+ th {
65
+ color: #FFA34F; font-size: 11px; font-weight : bold;
66
+ background-color: #006699; height: 25px;
67
+ background-image: url(templates/subSilver/images/cellpic3.gif);
68
+ }
69
+
70
+ td.cat,td.catHead,td.catSides,td.catLeft,td.catRight,td.catBottom {
71
+ background-image: url(templates/subSilver/images/cellpic1.gif);
72
+ background-color:#D1D7DC; border: #FFFFFF; border-style: solid; height: 28px;
73
+ }
74
+
75
+ /*
76
+ Setting additional nice inner borders for the main table cells.
77
+ The names indicate which sides the border will be on.
78
+ Don't worry if you don't understand this, just ignore it :-)
79
+ */
80
+ td.cat,td.catHead,td.catBottom {
81
+ height: 29px;
82
+ border-width: 0px 0px 0px 0px;
83
+ }
84
+ th.thHead,th.thSides,th.thTop,th.thLeft,th.thRight,th.thBottom,th.thCornerL,th.thCornerR {
85
+ font-weight: bold; border: #FFFFFF; border-style: solid; height: 28px;
86
+ }
87
+ td.row3Right,td.spaceRow {
88
+ background-color: #D1D7DC; border: #FFFFFF; border-style: solid;
89
+ }
90
+
91
+ th.thHead,td.catHead { font-size: 12px; border-width: 1px 1px 0px 1px; }
92
+ th.thSides,td.catSides,td.spaceRow { border-width: 0px 1px 0px 1px; }
93
+ th.thRight,td.catRight,td.row3Right { border-width: 0px 1px 0px 0px; }
94
+ th.thLeft,td.catLeft { border-width: 0px 0px 0px 1px; }
95
+ th.thBottom,td.catBottom { border-width: 0px 1px 1px 1px; }
96
+ th.thTop { border-width: 1px 0px 0px 0px; }
97
+ th.thCornerL { border-width: 1px 0px 0px 1px; }
98
+ th.thCornerR { border-width: 1px 1px 0px 0px; }
99
+
100
+ /* The largest text used in the index page title and toptic title etc. */
101
+ .maintitle {
102
+ font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif;
103
+ text-decoration: none; line-height : 120%; color : #000000;
104
+ }
105
+
106
+ /* General text */
107
+ .gen { font-size : 12px; }
108
+ .genmed { font-size : 11px; }
109
+ .gensmall { font-size : 10px; }
110
+ .gen,.genmed,.gensmall { color : #000000; }
111
+ a.gen,a.genmed,a.gensmall { color: #006699; text-decoration: none; }
112
+ a.gen:hover,a.genmed:hover,a.gensmall:hover { color: #DD6900; text-decoration: underline; }
113
+
114
+ /* The register, login, search etc links at the top of the page */
115
+ .mainmenu { font-size : 11px; color : #000000 }
116
+ a.mainmenu { text-decoration: none; color : #006699; }
117
+ a.mainmenu:hover{ text-decoration: underline; color : #DD6900; }
118
+
119
+ /* Forum category titles */
120
+ .cattitle { font-weight: bold; font-size: 12px ; letter-spacing: 1px; color : #006699}
121
+ a.cattitle { text-decoration: none; color : #006699; }
122
+ a.cattitle:hover{ text-decoration: underline; }
123
+
124
+ /* Forum title: Text and link to the forums used in: index.php */
125
+ .forumlink { font-weight: bold; font-size: 12px; color : #006699; }
126
+ a.forumlink { text-decoration: none; color : #006699; }
127
+ a.forumlink:hover{ text-decoration: underline; color : #DD6900; }
128
+
129
+ /* Used for the navigation text, (Page 1,2,3 etc) and the navigation bar when in a forum */
130
+ .nav { font-weight: bold; font-size: 11px; color : #000000;}
131
+ a.nav { text-decoration: none; color : #006699; }
132
+ a.nav:hover { text-decoration: underline; }
133
+
134
+ /* titles for the topics: could specify viewed link colour too */
135
+ .topictitle,h1,h2 { font-weight: bold; font-size: 11px; color : #000000; }
136
+ a.topictitle:link { text-decoration: none; color : #006699; }
137
+ a.topictitle:visited { text-decoration: none; color : #5493B4; }
138
+ a.topictitle:hover { text-decoration: underline; color : #DD6900; }
139
+
140
+ /* Name of poster in viewmsg.php and viewtopic.php and other places */
141
+ .name { font-size : 11px; color : #000000;}
142
+
143
+ /* Location, number of posts, post date etc */
144
+ .postdetails { font-size : 10px; color : #000000; }
145
+
146
+ /* The content of the posts (body of text) */
147
+ .postbody { font-size : 12px; line-height: 18px}
148
+ a.postlink:link { text-decoration: none; color : #006699 }
149
+ a.postlink:visited { text-decoration: none; color : #5493B4; }
150
+ a.postlink:hover { text-decoration: underline; color : #DD6900}
151
+
152
+ /* Quote & Code blocks */
153
+ .code {
154
+ font-family: Courier, 'Courier New', sans-serif; font-size: 11px; color: #006600;
155
+ background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
156
+ border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
157
+ }
158
+
159
+ .quote {
160
+ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #444444; line-height: 125%;
161
+ background-color: #FAFAFA; border: #D1D7DC; border-style: solid;
162
+ border-left-width: 1px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px
163
+ }
164
+
165
+ /* Copyright and bottom info */
166
+ .copyright { font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #444444; letter-spacing: -1px;}
167
+ a.copyright { color: #444444; text-decoration: none;}
168
+ a.copyright:hover { color: #000000; text-decoration: underline;}
169
+
170
+ /* Form elements */
171
+ input,textarea, select {
172
+ color : #000000;
173
+ font: normal 11px Verdana, Arial, Helvetica, sans-serif;
174
+ border-color : #000000;
175
+ }
176
+
177
+ /* The text input fields background colour */
178
+ input.post, textarea.post, select {
179
+ background-color : #FFFFFF;
180
+ }
181
+
182
+ input { text-indent : 2px; }
183
+
184
+ /* The buttons used for bbCode styling in message post */
185
+ input.button {
186
+ background-color : #EFEFEF;
187
+ color : #000000;
188
+ font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
189
+ }
190
+
191
+ /* The main submit button option */
192
+ input.mainoption {
193
+ background-color : #FAFAFA;
194
+ font-weight : bold;
195
+ }
196
+
197
+ /* None-bold submit button */
198
+ input.liteoption {
199
+ background-color : #FAFAFA;
200
+ font-weight : normal;
201
+ }
202
+
203
+ /* This is the line in the posting page which shows the rollover
204
+ help line. This is actually a text box, but if set to be the same
205
+ colour as the background no one will know ;)
206
+ */
207
+ .helpline { background-color: #DEE3E7; border-style: none; }
208
+
209
+ /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
210
+ @import url("templates/subSilver/formIE.css");
211
+ -->
212
+ </style>
213
+ <script language="Javascript" type="text/javascript">
214
+ <!--
215
+ if ( 0 )
216
+ {
217
+ window.open('privmsg.php?mode=newpm', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
218
+ }
219
+ //-->
220
+ </script></head><body bgcolor="#e5e5e5" link="#006699" text="#000000" vlink="#5493b4">
221
+
222
+ <a name="top"></a>
223
+
224
+ <table align="center" border="0" cellpadding="10" cellspacing="0" width="100%">
225
+ <tbody><tr>
226
+ <td class="bodyline"><table border="0" cellpadding="0" cellspacing="0" width="100%">
227
+ <tbody><tr>
228
+ <td><a href="http://localhost/phpBB2/index.php"><img src="new_topic_files/logo_phpBB.gif" alt="yourdomain.com Forum Index" border="0" vspace="1"></a></td>
229
+ <td align="center" valign="middle" width="100%"><span class="maintitle">yourdomain.com</span><br><span class="gen">A _little_ text to describe your forum<br>&nbsp; </span>
230
+ <table border="0" cellpadding="2" cellspacing="0">
231
+ <tbody><tr>
232
+ <td align="center" nowrap="nowrap" valign="top"><span class="mainmenu">&nbsp;<a href="http://localhost/phpBB2/faq.php" class="mainmenu"><img src="new_topic_files/icon_mini_faq.gif" alt="FAQ" border="0" height="13" hspace="3" width="12">FAQ</a>&nbsp; &nbsp;<a href="http://localhost/phpBB2/search.php" class="mainmenu"><img src="new_topic_files/icon_mini_search.gif" alt="Search" border="0" height="13" hspace="3" width="12">Search</a>&nbsp; &nbsp;<a href="http://localhost/phpBB2/memberlist.php" class="mainmenu"><img src="new_topic_files/icon_mini_members.gif" alt="Memberlist" border="0" height="13" hspace="3" width="12">Memberlist</a>&nbsp; &nbsp;<a href="http://localhost/phpBB2/groupcp.php" class="mainmenu"><img src="new_topic_files/icon_mini_groups.gif" alt="Usergroups" border="0" height="13" hspace="3" width="12">Usergroups</a>&nbsp;
233
+ </span></td>
234
+ </tr>
235
+ <tr>
236
+ <td align="center" height="25" nowrap="nowrap" valign="top"><span class="mainmenu">&nbsp;<a href="http://localhost/phpBB2/profile.php?mode=editprofile" class="mainmenu"><img src="new_topic_files/icon_mini_profile.gif" alt="Profile" border="0" height="13" hspace="3" width="12">Profile</a>&nbsp; &nbsp;<a href="http://localhost/phpBB2/privmsg.php?folder=inbox" class="mainmenu"><img src="new_topic_files/icon_mini_message.gif" alt="You have no new messages" border="0" height="13" hspace="3" width="12">You have no new messages</a>&nbsp; &nbsp;<a href="http://localhost/phpBB2/login.php?logout=true&amp;sid=634167992ee20b38119f42ea4f619682" class="mainmenu"><img src="new_topic_files/icon_mini_login.gif" alt="Log out [ tester ]" border="0" height="13" hspace="3" width="12">Log out [ tester ]</a>&nbsp;</span></td>
237
+ </tr>
238
+ </tbody></table></td>
239
+ </tr>
240
+ </tbody></table>
241
+
242
+ <br>
243
+
244
+ <script language="JavaScript" type="text/javascript">
245
+ <!--
246
+ // bbCode control by
247
+ // subBlue design
248
+ // www.subBlue.com
249
+
250
+ // Startup variables
251
+ var imageTag = false;
252
+ var theSelection = false;
253
+
254
+ // Check for Browser & Platform for PC & IE specific bits
255
+ // More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
256
+ var clientPC = navigator.userAgent.toLowerCase(); // Get client info
257
+ var clientVer = parseInt(navigator.appVersion); // Get browser version
258
+
259
+ var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
260
+ var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
261
+ && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
262
+ && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
263
+ var is_moz = 0;
264
+
265
+ var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
266
+ var is_mac = (clientPC.indexOf("mac")!=-1);
267
+
268
+ // Helpline messages
269
+ b_help = "Bold text: [b]text[/b] (alt+b)";
270
+ i_help = "Italic text: [i]text[/i] (alt+i)";
271
+ u_help = "Underline text: [u]text[/u] (alt+u)";
272
+ q_help = "Quote text: [quote]text[/quote] (alt+q)";
273
+ c_help = "Code display: [code]code[/code] (alt+c)";
274
+ l_help = "List: [list]text[/list] (alt+l)";
275
+ o_help = "Ordered list: [list=]text[/list] (alt+o)";
276
+ p_help = "Insert image: [img]http://image_url[/img] (alt+p)";
277
+ w_help = "Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)";
278
+ a_help = "Close all open bbCode tags";
279
+ s_help = "Font color: [color=red]text[/color] Tip: you can also use color=#FF0000";
280
+ f_help = "Font size: [size=x-small]small text[/size]";
281
+
282
+ // Define the bbCode tags
283
+ bbcode = new Array();
284
+ bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]');
285
+ imageTag = false;
286
+
287
+ // Shows the help messages in the helpline window
288
+ function helpline(help) {
289
+ document.post.helpbox.value = eval(help + "_help");
290
+ }
291
+
292
+
293
+ // Replacement for arrayname.length property
294
+ function getarraysize(thearray) {
295
+ for (i = 0; i < thearray.length; i++) {
296
+ if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
297
+ return i;
298
+ }
299
+ return thearray.length;
300
+ }
301
+
302
+ // Replacement for arrayname.push(value) not implemented in IE until version 5.5
303
+ // Appends element to the array
304
+ function arraypush(thearray,value) {
305
+ thearray[ getarraysize(thearray) ] = value;
306
+ }
307
+
308
+ // Replacement for arrayname.pop() not implemented in IE until version 5.5
309
+ // Removes and returns the last element of an array
310
+ function arraypop(thearray) {
311
+ thearraysize = getarraysize(thearray);
312
+ retval = thearray[thearraysize - 1];
313
+ delete thearray[thearraysize - 1];
314
+ return retval;
315
+ }
316
+
317
+
318
+ function checkForm() {
319
+
320
+ formErrors = false;
321
+
322
+ if (document.post.message.value.length < 2) {
323
+ formErrors = "You must enter a message when posting.";
324
+ }
325
+
326
+ if (formErrors) {
327
+ alert(formErrors);
328
+ return false;
329
+ } else {
330
+ bbstyle(-1);
331
+ //formObj.preview.disabled = true;
332
+ //formObj.submit.disabled = true;
333
+ return true;
334
+ }
335
+ }
336
+
337
+ function emoticon(text) {
338
+ var txtarea = document.post.message;
339
+ text = ' ' + text + ' ';
340
+ if (txtarea.createTextRange && txtarea.caretPos) {
341
+ var caretPos = txtarea.caretPos;
342
+ caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
343
+ txtarea.focus();
344
+ } else {
345
+ txtarea.value += text;
346
+ txtarea.focus();
347
+ }
348
+ }
349
+
350
+ function bbfontstyle(bbopen, bbclose) {
351
+ var txtarea = document.post.message;
352
+
353
+ if ((clientVer >= 4) && is_ie && is_win) {
354
+ theSelection = document.selection.createRange().text;
355
+ if (!theSelection) {
356
+ txtarea.value += bbopen + bbclose;
357
+ txtarea.focus();
358
+ return;
359
+ }
360
+ document.selection.createRange().text = bbopen + theSelection + bbclose;
361
+ txtarea.focus();
362
+ return;
363
+ }
364
+ else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
365
+ {
366
+ mozWrap(txtarea, bbopen, bbclose);
367
+ return;
368
+ }
369
+ else
370
+ {
371
+ txtarea.value += bbopen + bbclose;
372
+ txtarea.focus();
373
+ }
374
+ storeCaret(txtarea);
375
+ }
376
+
377
+
378
+ function bbstyle(bbnumber) {
379
+ var txtarea = document.post.message;
380
+
381
+ txtarea.focus();
382
+ donotinsert = false;
383
+ theSelection = false;
384
+ bblast = 0;
385
+
386
+ if (bbnumber == -1) { // Close all open tags & default button names
387
+ while (bbcode[0]) {
388
+ butnumber = arraypop(bbcode) - 1;
389
+ txtarea.value += bbtags[butnumber + 1];
390
+ buttext = eval('document.post.addbbcode' + butnumber + '.value');
391
+ eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
392
+ }
393
+ imageTag = false; // All tags are closed including image tags :D
394
+ txtarea.focus();
395
+ return;
396
+ }
397
+
398
+ if ((clientVer >= 4) && is_ie && is_win)
399
+ {
400
+ theSelection = document.selection.createRange().text; // Get text selection
401
+ if (theSelection) {
402
+ // Add tags around selection
403
+ document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
404
+ txtarea.focus();
405
+ theSelection = '';
406
+ return;
407
+ }
408
+ }
409
+ else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
410
+ {
411
+ mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
412
+ return;
413
+ }
414
+
415
+ // Find last occurance of an open tag the same as the one just clicked
416
+ for (i = 0; i < bbcode.length; i++) {
417
+ if (bbcode[i] == bbnumber+1) {
418
+ bblast = i;
419
+ donotinsert = true;
420
+ }
421
+ }
422
+
423
+ if (donotinsert) { // Close all open tags up to the one just clicked & default button names
424
+ while (bbcode[bblast]) {
425
+ butnumber = arraypop(bbcode) - 1;
426
+ txtarea.value += bbtags[butnumber + 1];
427
+ buttext = eval('document.post.addbbcode' + butnumber + '.value');
428
+ eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
429
+ imageTag = false;
430
+ }
431
+ txtarea.focus();
432
+ return;
433
+ } else { // Open tags
434
+
435
+ if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
436
+ txtarea.value += bbtags[15];
437
+ lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
438
+ document.post.addbbcode14.value = "Img"; // Return button back to normal state
439
+ imageTag = false;
440
+ }
441
+
442
+ // Open tag
443
+ txtarea.value += bbtags[bbnumber];
444
+ if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
445
+ arraypush(bbcode,bbnumber+1);
446
+ eval('document.post.addbbcode'+bbnumber+'.value += "*"');
447
+ txtarea.focus();
448
+ return;
449
+ }
450
+ storeCaret(txtarea);
451
+ }
452
+
453
+ // From http://www.massless.org/mozedit/
454
+ function mozWrap(txtarea, open, close)
455
+ {
456
+ var selLength = txtarea.textLength;
457
+ var selStart = txtarea.selectionStart;
458
+ var selEnd = txtarea.selectionEnd;
459
+ if (selEnd == 1 || selEnd == 2)
460
+ selEnd = selLength;
461
+
462
+ var s1 = (txtarea.value).substring(0,selStart);
463
+ var s2 = (txtarea.value).substring(selStart, selEnd)
464
+ var s3 = (txtarea.value).substring(selEnd, selLength);
465
+ txtarea.value = s1 + open + s2 + close + s3;
466
+ return;
467
+ }
468
+
469
+ // Insert at Claret position. Code from
470
+ // http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130
471
+ function storeCaret(textEl) {
472
+ if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
473
+ }
474
+
475
+ //-->
476
+ </script>
477
+
478
+
479
+ <form action="posting.php" method="post" name="post" onsubmit="return checkForm(this)">
480
+
481
+
482
+
483
+
484
+ <table align="center" border="0" cellpadding="2" cellspacing="2" width="100%">
485
+ <tbody><tr>
486
+ <td align="left"><span class="nav"><a href="http://localhost/phpBB2/index.php" class="nav">yourdomain.com Forum Index</a>
487
+ -&gt; <a href="http://localhost/phpBB2/viewforum.php?f=2" class="nav">Cell Photo Bot</a></span></td>
488
+ </tr>
489
+ </tbody></table>
490
+
491
+ <table class="forumline" border="0" cellpadding="3" cellspacing="1" width="100%">
492
+ <tbody><tr>
493
+ <th class="thHead" colspan="2" height="25"><b>Post a new topic</b></th>
494
+ </tr>
495
+ <tr>
496
+ <td class="row1" width="22%"><span class="gen"><b>Subject</b></span></td>
497
+ <td class="row2" width="78%"> <span class="gen">
498
+ <input name="subject" size="45" maxlength="60" style="width: 450px;" tabindex="2" class="post" value="" type="text">
499
+ </span> </td>
500
+ </tr>
501
+ <tr>
502
+ <td class="row1" valign="top">
503
+ <table border="0" cellpadding="1" cellspacing="0" width="100%">
504
+ <tbody><tr>
505
+ <td><span class="gen"><b>Message body</b></span> </td>
506
+ </tr>
507
+ <tr>
508
+ <td align="center" valign="middle"> <br>
509
+ <table border="0" cellpadding="5" cellspacing="0" width="100">
510
+ <tbody><tr align="center">
511
+ <td colspan="4" class="gensmall"><b>Emoticons</b></td>
512
+ </tr>
513
+ <tr align="center" valign="middle">
514
+ <td><a href="javascript:emoticon(':D')"><img src="new_topic_files/icon_biggrin.gif" alt="Very Happy" title="Very Happy" border="0"></a></td>
515
+ <td><a href="javascript:emoticon(':)')"><img src="new_topic_files/icon_smile.gif" alt="Smile" title="Smile" border="0"></a></td>
516
+ <td><a href="javascript:emoticon(':(')"><img src="new_topic_files/icon_sad.gif" alt="Sad" title="Sad" border="0"></a></td>
517
+ <td><a href="javascript:emoticon(':o')"><img src="new_topic_files/icon_surprised.gif" alt="Surprised" title="Surprised" border="0"></a></td>
518
+ </tr>
519
+ <tr align="center" valign="middle">
520
+ <td><a href="javascript:emoticon(':shock:')"><img src="new_topic_files/icon_eek.gif" alt="Shocked" title="Shocked" border="0"></a></td>
521
+ <td><a href="javascript:emoticon(':?')"><img src="new_topic_files/icon_confused.gif" alt="Confused" title="Confused" border="0"></a></td>
522
+ <td><a href="javascript:emoticon('8)')"><img src="new_topic_files/icon_cool.gif" alt="Cool" title="Cool" border="0"></a></td>
523
+ <td><a href="javascript:emoticon(':lol:')"><img src="new_topic_files/icon_lol.gif" alt="Laughing" title="Laughing" border="0"></a></td>
524
+ </tr>
525
+ <tr align="center" valign="middle">
526
+ <td><a href="javascript:emoticon(':x')"><img src="new_topic_files/icon_mad.gif" alt="Mad" title="Mad" border="0"></a></td>
527
+ <td><a href="javascript:emoticon(':P')"><img src="new_topic_files/icon_razz.gif" alt="Razz" title="Razz" border="0"></a></td>
528
+ <td><a href="javascript:emoticon(':oops:')"><img src="new_topic_files/icon_redface.gif" alt="Embarassed" title="Embarassed" border="0"></a></td>
529
+ <td><a href="javascript:emoticon(':cry:')"><img src="new_topic_files/icon_cry.gif" alt="Crying or Very sad" title="Crying or Very sad" border="0"></a></td>
530
+ </tr>
531
+ <tr align="center" valign="middle">
532
+ <td><a href="javascript:emoticon(':evil:')"><img src="new_topic_files/icon_evil.gif" alt="Evil or Very Mad" title="Evil or Very Mad" border="0"></a></td>
533
+ <td><a href="javascript:emoticon(':twisted:')"><img src="new_topic_files/icon_twisted.gif" alt="Twisted Evil" title="Twisted Evil" border="0"></a></td>
534
+ <td><a href="javascript:emoticon(':roll:')"><img src="new_topic_files/icon_rolleyes.gif" alt="Rolling Eyes" title="Rolling Eyes" border="0"></a></td>
535
+ <td><a href="javascript:emoticon(':wink:')"><img src="new_topic_files/icon_wink.gif" alt="Wink" title="Wink" border="0"></a></td>
536
+ </tr>
537
+ <tr align="center" valign="middle">
538
+ <td><a href="javascript:emoticon(':!:')"><img src="new_topic_files/icon_exclaim.gif" alt="Exclamation" title="Exclamation" border="0"></a></td>
539
+ <td><a href="javascript:emoticon(':?:')"><img src="new_topic_files/icon_question.gif" alt="Question" title="Question" border="0"></a></td>
540
+ <td><a href="javascript:emoticon(':idea:')"><img src="new_topic_files/icon_idea.gif" alt="Idea" title="Idea" border="0"></a></td>
541
+ <td><a href="javascript:emoticon(':arrow:')"><img src="new_topic_files/icon_arrow.gif" alt="Arrow" title="Arrow" border="0"></a></td>
542
+ </tr>
543
+ <tr align="center">
544
+ <td colspan="4"><span class="nav"><a href="http://localhost/phpBB2/posting.php?mode=smilies" onclick="window.open('posting.php?mode=smilies', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">View more Emoticons</a></span></td>
545
+ </tr>
546
+ </tbody></table>
547
+ </td>
548
+ </tr>
549
+ </tbody></table>
550
+ </td>
551
+ <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span>
552
+ <table border="0" cellpadding="2" cellspacing="0" width="450">
553
+ <tbody><tr align="center" valign="middle">
554
+ <td><span class="genmed">
555
+ <input class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight: bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" type="button">
556
+ </span></td>
557
+ <td><span class="genmed">
558
+ <input class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style: italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" type="button">
559
+ </span></td>
560
+ <td><span class="genmed">
561
+ <input class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" type="button">
562
+ </span></td>
563
+ <td><span class="genmed">
564
+ <input class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px;" onclick="bbstyle(6)" onmouseover="helpline('q')" type="button">
565
+ </span></td>
566
+ <td><span class="genmed">
567
+ <input class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px;" onclick="bbstyle(8)" onmouseover="helpline('c')" type="button">
568
+ </span></td>
569
+ <td><span class="genmed">
570
+ <input class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px;" onclick="bbstyle(10)" onmouseover="helpline('l')" type="button">
571
+ </span></td>
572
+ <td><span class="genmed">
573
+ <input class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px;" onclick="bbstyle(12)" onmouseover="helpline('o')" type="button">
574
+ </span></td>
575
+ <td><span class="genmed">
576
+ <input class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px;" onclick="bbstyle(14)" onmouseover="helpline('p')" type="button">
577
+ </span></td>
578
+ <td><span class="genmed">
579
+ <input class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px;" onclick="bbstyle(16)" onmouseover="helpline('w')" type="button">
580
+ </span></td>
581
+ </tr>
582
+ <tr>
583
+ <td colspan="9">
584
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
585
+ <tbody><tr>
586
+ <td><span class="genmed"> &nbsp;Font colour:
587
+ <select name="addbbcode18" onchange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onmouseover="helpline('s')">
588
+ <option style="color: black; background-color: rgb(250, 250, 250);" value="#444444" class="genmed">Default</option>
589
+ <option style="color: darkred; background-color: rgb(250, 250, 250);" value="darkred" class="genmed">Dark Red</option>
590
+ <option style="color: red; background-color: rgb(250, 250, 250);" value="red" class="genmed">Red</option>
591
+ <option style="color: orange; background-color: rgb(250, 250, 250);" value="orange" class="genmed">Orange</option>
592
+ <option style="color: brown; background-color: rgb(250, 250, 250);" value="brown" class="genmed">Brown</option>
593
+ <option style="color: yellow; background-color: rgb(250, 250, 250);" value="yellow" class="genmed">Yellow</option>
594
+ <option style="color: green; background-color: rgb(250, 250, 250);" value="green" class="genmed">Green</option>
595
+ <option style="color: olive; background-color: rgb(250, 250, 250);" value="olive" class="genmed">Olive</option>
596
+ <option style="color: cyan; background-color: rgb(250, 250, 250);" value="cyan" class="genmed">Cyan</option>
597
+ <option style="color: blue; background-color: rgb(250, 250, 250);" value="blue" class="genmed">Blue</option>
598
+ <option style="color: darkblue; background-color: rgb(250, 250, 250);" value="darkblue" class="genmed">Dark Blue</option>
599
+ <option style="color: indigo; background-color: rgb(250, 250, 250);" value="indigo" class="genmed">Indigo</option>
600
+ <option style="color: violet; background-color: rgb(250, 250, 250);" value="violet" class="genmed">Violet</option>
601
+ <option style="color: white; background-color: rgb(250, 250, 250);" value="white" class="genmed">White</option>
602
+ <option style="color: black; background-color: rgb(250, 250, 250);" value="black" class="genmed">Black</option>
603
+ </select> &nbsp;Font size:<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.selectedIndex=0;" onmouseover="helpline('f')">
604
+ <option value="0" class="genmed">Font size</option>
605
+ <option value="7" class="genmed">Tiny</option>
606
+ <option value="9" class="genmed">Small</option>
607
+ <option value="12" selected="selected" class="genmed">Normal</option>
608
+ <option value="18" class="genmed">Large</option>
609
+ <option value="24" class="genmed">Huge</option>
610
+ </select>
611
+ </span></td>
612
+ <td align="right" nowrap="nowrap"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onmouseover="helpline('a')">Close Tags</a></span></td>
613
+ </tr>
614
+ </tbody></table>
615
+ </td>
616
+ </tr>
617
+ <tr>
618
+ <td colspan="9"> <span class="gensmall">
619
+ <input name="helpbox" size="45" maxlength="100" style="width: 450px; font-size: 10px;" class="helpline" value="Tip: Styles can be applied quickly to selected text." type="text">
620
+ </span></td>
621
+ </tr>
622
+ <tr>
623
+ <td colspan="9"><span class="gen">
624
+ <textarea name="message" rows="15" cols="35" wrap="virtual" style="width: 450px;" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"></textarea>
625
+ </span></td>
626
+ </tr>
627
+ </tbody></table>
628
+ </span></td>
629
+ </tr>
630
+ <tr>
631
+ <td class="row1" valign="top"><span class="gen"><b>Options</b></span><br><span class="gensmall">HTML is <u>OFF</u><br><a href="http://localhost/phpBB2/faq.php?mode=bbcode" target="_phpbbcode">BBCode</a> is <u>ON</u><br>Smilies are <u>ON</u></span></td>
632
+ <td class="row2"><span class="gen"> </span>
633
+ <table border="0" cellpadding="1" cellspacing="0">
634
+ <tbody><tr>
635
+ <td>
636
+ <input name="disable_bbcode" type="checkbox">
637
+ </td>
638
+ <td><span class="gen">Disable BBCode in this post</span></td>
639
+ </tr>
640
+ <tr>
641
+ <td>
642
+ <input name="disable_smilies" type="checkbox">
643
+ </td>
644
+ <td><span class="gen">Disable Smilies in this post</span></td>
645
+ </tr>
646
+ <tr>
647
+ <td>
648
+ <input name="notify" type="checkbox">
649
+ </td>
650
+ <td><span class="gen">Notify me when a reply is posted</span></td>
651
+ </tr>
652
+ <tr>
653
+ <td></td>
654
+ <td><span class="gen">Post topic as: <input name="topictype" value="0" checked="checked" type="radio"> Normal&nbsp;&nbsp;<input name="topictype" value="1" type="radio"> Sticky&nbsp;&nbsp;<input name="topictype" value="2" type="radio"> Announcement&nbsp;&nbsp;</span></td>
655
+ </tr>
656
+ </tbody></table>
657
+ </td>
658
+ </tr>
659
+
660
+ <tr>
661
+ <th class="thHead" colspan="2">Add a Poll</th>
662
+ </tr>
663
+ <tr>
664
+ <td class="row1" colspan="2"><span class="gensmall">If you do not want to add a poll to your topic, leave the fields blank.</span></td>
665
+ </tr>
666
+ <tr>
667
+ <td class="row1"><span class="gen"><b>Poll question</b></span></td>
668
+ <td class="row2"><span class="genmed"><input name="poll_title" size="50" maxlength="255" class="post" value="" type="text"></span></td>
669
+ </tr>
670
+ <tr>
671
+ <td class="row1"><span class="gen"><b>Poll option</b></span></td>
672
+ <td class="row2"><span class="genmed"><input name="add_poll_option_text" size="50" maxlength="255" class="post" value="" type="text"></span> &nbsp;<input name="add_poll_option" value="Add option" class="liteoption" type="submit"></td>
673
+ </tr>
674
+ <tr>
675
+ <td class="row1"><span class="gen"><b>Run poll for</b></span></td>
676
+ <td class="row2"><span class="genmed"><input name="poll_length" size="3" maxlength="3" class="post" value="" type="text"></span>&nbsp;<span class="gen"><b>Days</b></span> &nbsp; <span class="gensmall">[ Enter 0 or leave blank for a never-ending poll ]</span></td>
677
+ </tr>
678
+
679
+
680
+ <tr>
681
+ <td class="catBottom" colspan="2" align="center" height="28"> <input name="mode" value="newtopic" type="hidden"><input name="sid" value="634167992ee20b38119f42ea4f619682" type="hidden"><input name="f" value="2" type="hidden"><input tabindex="5" name="preview" class="mainoption" value="Preview" type="submit">&nbsp;<input accesskey="s" tabindex="6" name="post" class="mainoption" value="Submit" type="submit"></td>
682
+ </tr>
683
+ </tbody></table>
684
+
685
+ <table align="center" border="0" cellpadding="2" cellspacing="2" width="100%">
686
+ <tbody><tr>
687
+ <td align="right" valign="top"><span class="gensmall">All times are GMT</span></td>
688
+ </tr>
689
+ </tbody></table>
690
+ </form>
691
+
692
+ <table align="center" border="0" cellspacing="2" width="100%">
693
+ <tbody><tr>
694
+ <td align="right" valign="top">
695
+ <form method="get" name="jumpbox" action="viewforum.php" onsubmit="if(document.jumpbox.f.value == -1){return false;}"><table border="0" cellpadding="0" cellspacing="0">
696
+ <tbody><tr>
697
+ <td nowrap="nowrap"><span class="gensmall">Jump to:&nbsp;<select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ forms['jumpbox'].submit() }"><option value="-1">Select a forum</option><option value="-1">&nbsp;</option><option value="-1">Test category 1</option><option value="-1">----------------</option><option value="1">Test Forum 1</option><option value="2">Cell Photo Bot</option></select><input name="sid" value="634167992ee20b38119f42ea4f619682" type="hidden">&nbsp;<input value="Go" class="liteoption" type="submit"></span></td>
698
+ </tr>
699
+ </tbody></table></form>
700
+
701
+ </td>
702
+ </tr>
703
+ </tbody></table>
704
+
705
+
706
+
707
+
708
+ <div align="center"><span class="copyright"><br><a href="http://localhost/phpBB2/admin/index.php?sid=634167992ee20b38119f42ea4f619682">Go to Administration Panel</a><br><br><br>
709
+ <!--
710
+ We request you retain the full copyright notice below including the link to www.phpbb.com.
711
+ This not only gives respect to the large amount of time given freely by the developers
712
+ but also helps build interest, traffic and use of phpBB 2.0. If you cannot (for good
713
+ reason) retain the full copyright we request you at least leave in place the
714
+ Powered by phpBB line, with phpBB linked to www.phpbb.com. If you refuse
715
+ to include even this then support on our forums may be affected.
716
+
717
+ The phpBB Group : 2002
718
+ // -->
719
+ Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br></span></div>
720
+ </td>
721
+ </tr>
722
+ </tbody></table>
723
+
724
+
725
+ </body></html>