#python

files_dir = consts.FILES_DIR
SCRIPT = consts.CGI_NAME
BACK = '<p>back to the <a href="%s?page=sites/ming-cgi/server/index">main page</a>' % SCRIPT
lib.prn("FILES_DIR",files_dir)

file_dict = lib.get_dict(files_dir + os.sep + "gq.response")
lib.prn("file_dict", file_dict)
dates = file_dict.keys()
dates.sort()
dates.reverse()
for date in dates:
	dict = file_dict[date]
	try:
		name = dict["author"]
		text = dict["comment_text"]
		title= dict["title"]
	except:
		continue
	write("\n <!-- %s -->" % title)
	write("<p> %s - %s (%s) " % (name, title, time.ctime(float(dict["stamp"]))))
	text = text.replace("\n", "<br>")
	write("<p>" + text)
	write("<hr align=left width=25%>")

write(BACK)




