File: viewdoc.cgi

package info (click to toggle)
doc-central 1.8.2%2Bnmu2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 128 kB
  • ctags: 49
  • sloc: python: 475; sh: 12; makefile: 1
file content (47 lines) | stat: -rwxr-xr-x 1,426 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/python

# Import all system packages we need
import cgi, os, sys, string, re
# Import all our own stuff
import docconfig, docutils

# Get our configuration
docutils.extractcgiparams()

Keyword=string.strip(docconfig.Options["keyword"])

Title = "Direct access to '%s'" % Keyword

print "Content-Type: text/html\n"

print '''<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>%s</title>
</head>

<frameset cols="200,*">
  <frame name="contents" src="/cgi-bin/doc-central/contents.cgi" scrolling="auto">
  <frame name="main" src="/cgi-bin/doc-central/search.cgi?keyword=%s" scrolling="auto">
</frameset>

<noframes>
<body bgcolor="#ffffff" text="#000000" link="#0000cc" vlink="#000066"
  alink="#ff0000">
<h1>Direct Document Access</h1>

<p>You are seeing this because you tried to access a document directly.
However, your browser does not support frames, what causes you to not
have the left menu available while viewing the documentation you want.</p>

<p>To see the left menu and be able to browse all the documentation available,
click <a href="/cgi-bin/doc-central/contents.cgi">here</a>. To go on with the
search you specified in order to get to this page, click
<a href="/cgi-bin/doc-central/search.cgi?keyword=%s">here</a>.</p>

<p>Enjoy!</p>

</body>
</noframes>
</html>''' % (Title, Keyword, Keyword)