Example #1
0
File: web.py Project: Teifion/Rob3
def html_footers(cursor, page_dict, with_analytics=True):
    if page_dict.get("Admin", False):
        return headers.footers(page_dict)

    if with_analytics:
        analytics = common.data["analytics"]
    else:
        analytics = ""

    return """
	</div><!-- content -->
			<div class="clear">
				&nbsp;
			</div>
			</div><!-- page -->
			
			<div class="footer">
			<br />
			Game copyright <a href="http://woarl.com/blog">Teifion Jordan</a>, all rights reserved.<br />
			If you want to use these game rules for your own game, please contact Teifion, all player written stories and cultures are property of their authors
			</div><!-- footer -->
			{0}
		</body>
	</html>""".format(
        analytics
    )
Example #2
0
File: exec.py Project: Teifion/Rob3
elif m == 'edit_wonder_commit':		import pages.cities.edit_wonder_commit as the_page
elif m == 'remove_wonder':			import pages.cities.remove_wonder as the_page

# Map
# elif m == 'add_continent':			import pages.map.add_continent as the_page

# Nothing? 404?
else:								the_page = HTTP404()


output = []

cursor = database.get_cursor()
page_results = the_page.main(cursor)
ajax = bool(common.get_val('ajax', False))

if the_page.page_data.get("Redirect", "") != "":
	print("Location: web.py?mode={0}".format(the_page.page_data["Redirect"]))
	print("")

else:
	if the_page.page_data.get("Header", True) and page_results != "" and ajax != True:
		output.append(headers.main(cursor, the_page.page_data))
	
	output.append(page_results)
	
	if the_page.page_data.get("Header", True) and page_results != "" and ajax != True:
		output.append(headers.footers(cursor))
	
	print("")
	print(common.de_unicode("".join(output)))