73 lines
2.2 KiB
INI
73 lines
2.2 KiB
INI
|
|
[html]
|
||
|
|
|
||
|
|
header = <?xml version="1.0" encoding="us-ascii"?>
|
||
|
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||
|
|
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||
|
|
+<head>
|
||
|
|
+<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
|
||
|
|
+<title>Simple test CGI program</title>
|
||
|
|
+<style>
|
||
|
|
+body { font-size: 18px; background-color: white; padding: 10px; }
|
||
|
|
+.content { background-color: #e0e0e0; color: #000000;
|
||
|
|
+ margin: 0; padding: 1em; border: 2px solid #a8a8a8; }
|
||
|
|
+code { font-size: 18px; font-family: monospace; }
|
||
|
|
+</style>
|
||
|
|
+</head><body><div class="content">
|
||
|
|
+
|
||
|
|
|
||
|
|
footer = </div></body></html>
|
||
|
|
+
|
||
|
|
|
||
|
|
|
||
|
|
[errorpage]
|
||
|
|
|
||
|
|
# the error page template can use macros provided by the dullcgi framework,
|
||
|
|
# that is, ``common'' macros of Thalassa CMS and the macros added by the
|
||
|
|
# framework, namely %html:%, %req:% and %getenv:%
|
||
|
|
#
|
||
|
|
# besides that, three local macros are defined here:
|
||
|
|
# %errcode% - the 3-digit error code such as 404, 501 etc
|
||
|
|
# %errmessage% - short human-readable error message
|
||
|
|
# %progname% - the CGI program name, as defined by dullcgi_program_name
|
||
|
|
#
|
||
|
|
# please note no ``custom'' macros (added by the dullcgi_main function)
|
||
|
|
# should ever be used here, because the error page may in some cases be
|
||
|
|
# composed before calling that function
|
||
|
|
|
||
|
|
template = %html:header%
|
||
|
|
+<h2 style="margin:2em;">%errcode% %errmessage%</h2>
|
||
|
|
+<p>Sorry, something went wrong</p>
|
||
|
|
+<hr />
|
||
|
|
+%html:footer%
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
# redirects are not used by test.cgi, although the dullcgi framework still
|
||
|
|
# recognizes the [redirectpage] section
|
||
|
|
#
|
||
|
|
# [redirectpage]
|
||
|
|
#
|
||
|
|
# template = %html:header%
|
||
|
|
# +<h2>Redirecting to %url%...</h2>
|
||
|
|
# +<a href="%url%">Click here if your browser doesn't redirect automatically</a>
|
||
|
|
# +%html:footer%
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
[page default]
|
||
|
|
|
||
|
|
template = %html:header%
|
||
|
|
+<h2>It WORKS!</h2>
|
||
|
|
+<p>Your address and port:
|
||
|
|
+<code>%[getenv:REMOTE_ADDR]:%[getenv:REMOTE_PORT]</code></p>
|
||
|
|
+<p>HTTP Referer: <code>%[getenv:HTTP_REFERER]</code></p>
|
||
|
|
+<p>User Agent: <code>%[getenv:HTTP_USER_AGENT]</code></p>
|
||
|
|
+<p>Current time: %[rfcdate:%now%]</p>
|
||
|
|
+<hr />
|
||
|
|
+<p>The test.cgi program is a part of
|
||
|
|
+ <a href="http://thalassa.croco.net">Thalassa CMS</a>
|
||
|
|
+</p>
|
||
|
|
+%html:footer%
|
||
|
|
|