1 |
rabit |
1.1 |
<?php |
2 |
|
|
/*------------------------------------------------------------------------------ |
3 |
|
|
--- www.netfrag.org |
4 |
|
|
--- Setup and common functions include file. |
5 |
|
|
-------------------------------------------------------------------------------- |
6 |
|
|
--- rabit, 04:31 24.08.2004 |
7 |
|
|
--- $$id$$ |
8 |
|
|
------------------------------------------------------------------------------*/ |
9 |
|
|
|
10 |
|
|
//---------------------------------------------------------- |
11 |
|
|
//- Developer host setup: |
12 |
|
|
|
13 |
|
|
$cfg['hostsetups'] = array( |
14 |
|
|
|
15 |
|
|
'default' => array( |
16 |
|
|
'urlrel' => '/nfo/', |
17 |
|
|
), |
18 |
|
|
|
19 |
|
|
'psl.no-ip.com' => array( |
20 |
|
|
'urlrel' => '/work/www.netfrag.org/', |
21 |
|
|
), |
22 |
|
|
|
23 |
|
|
); |
24 |
|
|
|
25 |
|
|
if(isset($cfg['hostsetups'][$_SERVER['SERVER_NAME']])) { |
26 |
|
|
|
27 |
|
|
$cfg['hostsetup'] = $cfg['hostsetups'][$_SERVER['SERVER_NAME']]; |
28 |
|
|
|
29 |
|
|
} else { |
30 |
|
|
|
31 |
|
|
$cfg['hostsetup'] = $cfg['hostsetups']['default']; |
32 |
|
|
|
33 |
|
|
} |
34 |
|
|
|
35 |
|
|
$documentroot = $_SERVER['DOCUMENT_ROOT'] . $cfg['hostsetup']['urlrel']; |
36 |
|
|
|
37 |
|
|
//------------------------------------------------------------------------------ |
38 |
|
|
//- Configuration include file: |
39 |
|
|
|
40 |
|
|
include($documentroot . 'inc/cfg/cfg.php.inc'); |
41 |
|
|
|
42 |
|
|
//------------------------------------------------------------------------------ |
43 |
|
|
//- Functions: |
44 |
|
|
|
45 |
|
|
function common_headline($caption) { |
46 |
|
|
|
47 |
|
|
echo '<h5>' . $caption . '</h5> |
48 |
|
|
|
49 |
|
|
'; |
50 |
|
|
|
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
//---------------------------------------------------------- |
54 |
|
|
|
55 |
|
|
function common_pageheader() { |
56 |
|
|
|
57 |
|
|
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
58 |
|
|
|
59 |
|
|
<html xmlns="http://www.w3.org/1999/xhtml"> |
60 |
|
|
|
61 |
|
|
<head> |
62 |
|
|
<title>www.netfrag.org</title> |
63 |
|
|
<style type="text/css"><!-- |
64 |
|
|
body { font: 10pt tahoma, serif; } |
65 |
|
|
h2, .box, .hl { background-color:#e0e0e0; padding:8px; } |
66 |
|
|
h2, .box { border:1px solid #a0a0a0; } |
67 |
|
|
--></style> |
68 |
|
|
</head> |
69 |
|
|
|
70 |
|
|
<body> |
71 |
|
|
|
72 |
|
|
<h2>www.netfrag.org</h2> |
73 |
|
|
|
74 |
|
|
<h3>• Home</h3> |
75 |
|
|
|
76 |
|
|
'; |
77 |
|
|
|
78 |
|
|
} |
79 |
|
|
|
80 |
|
|
//---------------------------------------------------------- |
81 |
|
|
|
82 |
|
|
function common_pagefooter() { |
83 |
|
|
|
84 |
|
|
echo '<p align="center" class="box"> |
85 |
|
|
(foot notes) |
86 |
|
|
</p> |
87 |
|
|
|
88 |
|
|
</body> |
89 |
|
|
|
90 |
|
|
</html> |
91 |
|
|
'; |
92 |
|
|
|
93 |
|
|
} |
94 |
|
|
|
95 |
|
|
//---------------------------------------------------------- |
96 |
|
|
|
97 |
|
|
function common_paragraph($contents, $class = '') { |
98 |
|
|
|
99 |
|
|
echo '<p align="justify"' . ($class ? ' class="' . $class . '"' : '') . '> |
100 |
|
|
' . $contents . ' |
101 |
|
|
</p> |
102 |
|
|
|
103 |
|
|
'; |
104 |
|
|
|
105 |
|
|
} |
106 |
|
|
|
107 |
|
|
//------------------------------------------------------------------------------ |
108 |
|
|
|
109 |
|
|
?> |