1<?php
2/********************************
3OSBib:
4A collection of PHP classes to create and manage bibliographic formatting for OS bibliography software
5using the OSBib standard.
6
7Released through http://bibliophile.sourceforge.net under the GPL licence.
8Do whatever you like with this -- some credit to the author(s) would be appreciated.
9
10If you make improvements, please consider contacting the administrators at bibliophile.sourceforge.net
11so that your improvements can be added to the release package.
12
13Adapted from WIKINDX: http://wikindx.sourceforge.net
14
15Mark Grimshaw 2005
16http://bibliophile.sourceforge.net
17********************************/
18/*****
19* CLOSE class
20*
21* Close tidily and print HTML.
22*
23*	$Header: /cvsroot/bibliophile/OSBib/create/CLOSE.php,v 1.4 2005/06/29 20:22:05 sirfragalot Exp $
24*
25*****/
26class CLOSE
27{
28// Constructor
29	function CLOSE($pString = FALSE, $helpLink = TRUE)
30	{
31		include_once("MESSAGES.php");
32		$this->messages = new MESSAGES();
33		print $this->header();
34		print $this->openBody($helpLink);
35		print $this->closeBody($pString);
36		ob_end_flush();
37		die;
38	}
39/**
40* Print HTML header information
41*/
42	function header()
43	{
44return <<< END
45<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
46<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
47
48<head>
49<title>OSBib-Create</title>
50<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
51<link rel="stylesheet" href="osbib.css" type="text/css" />
52<!-- Javascript required for preview links when creating/editing styles.
53-->
54<script type="text/javascript" src="common.js"></script>
55</head>
56
57END;
58	}
59/**
60* Open HTML body and print title table
61*/
62	function openBody($helpLinkDisplay)
63	{
64		$helpLink = $this->messages->text("heading", "helpStyles");
65$pString = <<< END1
66<body onload="init()">
67<table class="titleTable" border="0" cellspacing="0" cellpadding="0" align="center">
68	<tr class="" align="left" valign="top">
69		<td class="" align="left" valign="top">
70<!-- Heading -->
71<h2>OSBib-Create</h2>
72		</td>
73
74END1;
75	if($helpLinkDisplay)
76	{
77$pString .= <<< END2
78		<td class="" align="left" valign="top">
79			<a class="link" href="index.php">
80			Home
81			</a>
82		</td>
83		<td class="" align="right" valign="top">
84			<a class="link" href="index.php?action=help" target="_blank">
85			$helpLink
86			</a>
87		</td>
88
89END2;
90	}
91
92$pString .= <<< END3
93		<td class="" align="right" valign="top">
94			<a class="imgLink" href="http://bibliophile.sourceforge.net/" target="_blank">
95			<img src="bibliophile.gif" border="0" width="127" height="75" alt="BIBLIOPHILE" />
96			</a>
97		</td>
98	</tr>
99</table>
100
101END3;
102
103		return $pString;
104	}
105/**
106* Close HTML body and print result
107*/
108	function closeBody($pString)
109	{
110return <<< END
111<table class="mainTable" border="0" cellspacing="0" cellpadding="0" align="center">
112	<tr class="" align="left" valign="top">
113		<td class="" align="left" valign="top">
114			$pString
115		</td>
116	</tr>
117</table>
118</body>
119</html>
120END;
121	}
122}
123?>
124