Project

General

Profile

1
<?php
2

    
3
// $Id: index.php 457 2007-05-08 21:00:51Z 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
<?php page_css(); ?>
42
<?php page_javascript(); ?>
43
</head>
44
<body>
45

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

    
232
</body>
233
</html>
(4-4/10)