Project

General

Profile

1
<?php
2

    
3
// $Id: index.php 440 2007-03-12 14:25:39Z Ruebenwurzel $
4

    
5
/*
6

    
7
 Website Baker Project <http://www.websitebaker.org/>
8
 Copyright (C) 2004-2007, Ryan Djurovich
9

    
10
 Website Baker is free software; you can redistribute it and/or modify
11
 it under the terms of the GNU General Public License as published by
12
 the Free Software Foundation; either version 2 of the License, or
13
 (at your option) any later version.
14

    
15
 Website Baker is distributed in the hope that it will be useful,
16
 but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 GNU General Public License for more details.
19

    
20
 You should have received a copy of the GNU General Public License
21
 along with Website Baker; if not, write to the Free Software
22
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23

    
24
*/
25

    
26
if(!defined('WB_URL')) {
27
	header('Location: ../index.php');
28
	exit(0);
29
}
30

    
31
?>
32
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
34
<head>
35
<title><?php page_title(); ?></title>
36
<meta http-equiv="Content-Type" content="text/html; charset=<?php if(defined('DEFAULT_CHARSET')) { echo DEFAULT_CHARSET; } else { echo 'utf-8'; }?>" />
37
<meta name="description" content="<?php page_description(); ?>" />
38
<meta name="keywords" content="<?php page_keywords(); ?>" />
39
<link href="<?php echo TEMPLATE_DIR; ?>/screen.css" rel="stylesheet" type="text/css" media="screen" />
40
<link href="<?php echo TEMPLATE_DIR; ?>/print.css" rel="stylesheet" type="text/css" media="print" />
41
</head>
42
<body>
43

    
44
<table cellpadding="0" cellspacing="0" border="0" align="center" class="main" width="750">
45
<tr>
46
	<td colspan="2" class="header" height="80">
47
		<a href="<?php echo WB_URL; ?>"><img src="<?php echo TEMPLATE_DIR; ?>/banner.jpg" border="0" width="750" height="80" alt="<?php page_title('', '[WEBSITE_TITLE]'); ?>" /></a>
48
	</td>
49
</tr>
50
<tr>
51
	<?php
52
	// Only show menu items if we are supposed to
53
	if(SHOW_MENU) {
54
	?>	
55
	<td style="padding: 10px; background-color: #FFFFFF;" valign="top">
56
		<table cellpadding="0" cellspacing="0" border="0" width="150" align="center" class="menu">
57
		<tr>
58
			<td class="border">
59
				<img src="<?php echo TEMPLATE_DIR; ?>/menu_top.gif" border="0" alt="" />
60
			</td>
61
		</tr>
62
		<tr>
63
			<td width="170">
64
				<?php page_menu(); ?>
65
			</td>
66
		</tr>
67
		<tr>
68
			<td class="border">
69
				<img src="<?php echo TEMPLATE_DIR; ?>/menu_bottom.gif" border="0" alt="" />
70
			</td>
71
		</tr>
72
		</table>
73
		
74
		<?php if(SHOW_SEARCH) { ?>
75
		<form name="search" action="<?php echo WB_URL.'/search/index'.PAGE_EXTENSION; ?>" method="get">
76
			<table cellpadding="0" cellspacing="0" border="0" width="150" align="center" style="margin-top: 10px;">
77
				<tr>
78
					<td class="border">
79
						<img src="<?php echo TEMPLATE_DIR; ?>/menu_top.gif" border="0" alt="" />
80
					</td>
81
				</tr>
82
				<tr>
83
					<td class="login">
84
						<input type="text" name="string" />
85
					</td>
86
				</tr>
87
				<tr>
88
					<td class="login">
89
						<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" />
90
					</td>
91
				</tr>
92
				<tr>
93
					<td class="border">
94
						<img src="<?php echo TEMPLATE_DIR; ?>/menu_bottom.gif" border="0" alt="" />
95
					</td>
96
				</tr>
97
			</table>
98
		</form>
99
		<?php } ?>
100
		
101
		<?php
102
		if(FRONTEND_LOGIN AND !$wb->is_authenticated()) {
103
		?>
104
		<form name="login" action="<?php echo LOGIN_URL; ?>" method="post">
105
			
106
			<table cellpadding="0" cellspacing="0" border="0" width="150" align="center" style="margin-top: 10px;">
107
			<tr>
108
				<td class="border">
109
					<img src="<?php echo TEMPLATE_DIR; ?>/menu_top.gif" border="0" alt="" />
110
				</td>
111
			</tr>
112
			<tr>
113
				<td class="login" style="text-transform: uppercase;">
114
					<b><?php echo $TEXT['LOGIN']; ?></b>
115
				</td>
116
			</tr>
117
			<tr>
118
				<td class="login" style="text-align: left;">
119
					<?php echo $TEXT['USERNAME']; ?>:
120
				</td>
121
			</tr>
122
			<tr>
123
				<td class="login">
124
					<input type="text" name="username" />
125
				</td>
126
			</tr>
127
			<tr>
128
				<td class="login" style="text-align: left;">
129
					<?php echo $TEXT['PASSWORD']; ?>:
130
				</td>
131
			</tr>
132
			<tr>
133
				<td class="login">
134
					<input type="password" name="password" />
135
				</td>
136
			</tr>
137
			<tr>
138
				<td class="login">
139
					<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" style="margin-top: 3px; text-transform: uppercase;" />
140
				</td>
141
			</tr>
142
			<tr>
143
				<td class="login">
144
					<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a>
145
					<?php if(is_numeric(FRONTEND_SIGNUP)) { ?>
146
						<a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT['SIGNUP']; ?></a>
147
					<?php } ?>
148
				</td>
149
			</tr>
150
			<tr>
151
				<td class="border">
152
					<img src="<?php echo TEMPLATE_DIR; ?>/menu_bottom.gif" border="0" alt="" />
153
				</td>
154
			</tr>
155
			</table>
156
		
157
		</form>
158
		<?php
159
		} elseif(FRONTEND_LOGIN AND $wb->is_authenticated()) {
160
		?>
161
		<form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post">
162
			
163
			<table cellpadding="0" cellspacing="0" border="0" width="150" align="center" style="margin-top: 10px;">
164
			<tr>
165
				<td class="border">
166
					<img src="<?php echo TEMPLATE_DIR; ?>/menu_top.gif" border="0" alt="" />
167
				</td>
168
			</tr>
169
			<tr>
170
				<td class="login" style="text-transform: uppercase;">
171
					<b><?php echo $TEXT['LOGGED_IN']; ?></b>
172
				</td>
173
			</tr>
174
			<tr>
175
				<td class="login" style="padding-top: 15px; padding-bottom: 15px;">
176
					<?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $wb->get_display_name(); ?>
177
				</td>
178
			</tr>
179
			<tr>
180
				<td class="login">
181
					<input type="submit" name="submit" value="<?php echo $MENU['LOGOUT']; ?>" style="margin-top: 3px; text-transform: uppercase;" />
182
				</td>
183
			</tr>
184
			<tr>
185
				<td class="login">
186
					<a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU['PREFERENCES']; ?></a>
187
				</td>
188
			</tr>
189
			<tr>
190
				<td class="border">
191
					<img src="<?php echo TEMPLATE_DIR; ?>/menu_bottom.gif" border="0" alt="" />
192
				</td>
193
			</tr>
194
			</table>
195
		
196
		</form>
197
		<?php
198
		}
199
		?>
200
	</td>
201
	<?php } ?>
202
	<td class="content" width="600" rowspan="2">
203
		<?php page_content(); ?>
204
	</td>
205
</tr>
206
<tr>
207
	<?php
208
	// Only show menu items if we are supposed to
209
	if(defined('SHOW_MENU') AND SHOW_MENU == true) {
210
	?>	
211
	<td height="20" width="155" valign="bottom" class="powered_by">
212
		<a href="http://www.websitebaker.org/" target="_blank">
213
			<img src="<?php echo TEMPLATE_DIR; ?>/powered.jpg" border="0" alt="Powered By Website Baker" />
214
		</a>
215
	</td>
216
	<?php } ?>
217
</tr>
218
<tr>
219
	<td colspan="2" class="border">
220
		<img src="<?php echo TEMPLATE_DIR; ?>/footer.png" border="0" alt="" />
221
	</td>
222
</tr>
223
<tr>
224
	<td colspan="2" class="footer">
225
		<?php page_footer(); ?>
226
	</td>
227
</tr>
228
</table>
229

    
230
</body>
231
</html>
(4-4/10)