| ︙ | | |
860
861
862
863
864
865
866
867
868
869
870
871
872
873
|
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
|
+
|
"SELECT"
" substr(event.comment,instr(event.comment,':')+2)"
" FROM forumpost, event"
" WHERE event.objid=forumpost.fpid"
" AND forumpost.fpid=%d;",
fpid
);
style_set_current_feature("forum");
style_header("%s%s", zThreadTitle, *zThreadTitle ? "" : "Forum");
fossil_free(zThreadTitle);
if( mode!=FD_CHRONO ){
style_submenu_element("Chronological", "%R/%s/%s?t=c%s%s", g.zPath, zName,
bUnf ? "&unf" : "", bHist ? "&hist" : "");
}
if( mode!=FD_HIER ){
|
| ︙ | | |
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
|
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
|
+
|
if( isEdit ){
forumedit_page();
}else{
forumnew_page();
}
return;
}
style_set_current_feature("forum");
style_header("%h As Anonymous?", isEdit ? "Reply" : "Post");
@ <p>You are not logged in.
@ <p><table border="0" cellpadding="10">
@ <tr><td>
@ <form action="%s(zGoto)" method="POST">
@ <input type="submit" value="Remain Anonymous">
@ </form>
|
| ︙ | | |
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
|
+
|
if( P("submit") && cgi_csrf_safe(1) ){
if( forum_post(zTitle, 0, 0, 0, zMimetype, zContent) ) return;
}
if( P("preview") && !whitespace_only(zContent) ){
@ <h1>Preview:</h1>
forum_render(zTitle, zMimetype, zContent, "forumEdit", 1);
}
style_set_current_feature("forum");
style_header("New Forum Thread");
@ <form action="%R/forume1" method="POST">
@ <h1>New Thread:</h1>
forum_from_line();
forum_post_widget(zTitle, zMimetype, zContent);
@ <input type="submit" name="preview" value="Preview">
if( P("preview") && !whitespace_only(zContent) ){
|
| ︙ | | |
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
|
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
|
+
|
cgi_redirectf("%R/forumpost/%S",zParent);
}else{
cgi_redirectf("%R/forum");
}
return;
}
}
style_set_current_feature("forum");
isDelete = P("nullout")!=0;
if( P("submit")
&& isCsrfSafe
&& (zContent = PDT("content",""))!=0
&& (!whitespace_only(zContent) || isDelete)
){
int done = 1;
|
| ︙ | | |
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
|
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
|
+
|
int srchFlags;
login_check_credentials();
srchFlags = search_restrict(SRCH_FORUM);
if( !g.perm.RdForum ){
login_needed(g.anon.RdForum);
return;
}
style_set_current_feature("forum");
style_header("Forum");
if( g.perm.WrForum ){
style_submenu_element("New Thread","%R/forumnew");
}else{
/* Can't combine this with previous case using the ternary operator
* because that causes an error yelling about "non-constant format"
* with some compilers. I can't see it, since both expressions have
|
| ︙ | | |