aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi32
1 files changed, 17 insertions, 15 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 9eb2ab6..f34b889 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -485,21 +485,23 @@ else:
print ' <div class="comments">'
# Form for adding comments
- random_int_a = random.randint(1,9)
- random_int_b = random.randint(1,9)
- cquizv = random_int_a + random_int_b
- print ' <div class="submit_comment">'
- print ' <form action="" method="post">'
- print ' <input type="hidden" name="ctitle" value="' + title + '" />'
- print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
- print ' <label class="submit_comment_name">name:</label><input class="submit_comment_name_input" type="text" id="cname" name="cname" />'
- print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" id="ctext" name="ctext"></textarea>'
- print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input class="submit_comment_quiz_input" type="text" id="cquiz" name="cquiz" />'
- print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />'
- print ' </form>'
- print ' </div>'
- print ' <div class="submit_border_bottom"></div>'
- print ''
+ if comments == "True":
+ random_int_a = random.randint(1,9)
+ random_int_b = random.randint(1,9)
+ cquizv = random_int_a + random_int_b
+ print ' <div class="submit_comment">'
+ print ' <form action="" method="post">'
+ print ' <input type="hidden" name="ctitle" value="' + title + '" />'
+ print ' <input type="hidden" name="cquizv" value="' + str(cquizv) + '" />'
+ print ' <label class="submit_comment_name">name:</label><input class="submit_comment_name_input" type="text" id="cname" name="cname" />'
+ print ' <br /><label class="submit_comment_text">text:</label><textarea class="submit_comment_textarea" id="ctext" name="ctext"></textarea>'
+ print ' <br /><label class="submit_comment_quiz">' + str(random_int_a) + '+' + str(random_int_b) + '=</label><input class="submit_comment_quiz_input" type="text" id="cquiz" name="cquiz" />'
+ print ' <br /><input class="submit_comment_button" type="submit" id="submit" value="post comment" />'
+ print ' </form>'
+ print ' </div>'
+ else:
+ print ' <div class="submit_border_bottom"></div>'
+ print ''
if comments == "True":
comments_file = glob.glob(entries_dir + title + '.comments')