Project

General

Profile

1
<?php
2
/**
3
 * $Id: index.php 1528 2011-11-22 23:19:56Z Luisehahne $
4
 * Website Baker template: allcss
5
 * This template is one of four basis templates distributed with Website Baker.
6
 * Feel free to modify or build up on this template.
7
 *
8
 * This file contains the overall template markup and the Website Baker
9
 * template functions to add the contents from the database.
10
 *
11
 * LICENSE: GNU General Public License
12
 * 
13
 * @author     Ryan Djurovich, C. Sommer
14
 * @copyright  GNU General Public License
15
 * @license    http://www.gnu.org/licenses/gpl.html
16
 * @version    2.70
17
 * @platform   Website Baker 2.7
18
 *
19
 * Website Baker is free software; you can redistribute it and/or modify
20
 * it under the terms of the GNU General Public License as published by
21
 * the Free Software Foundation; either version 2 of the License, or
22
 * (at your option) any later version.
23
 *
24
 * Website Baker is distributed in the hope that it will be useful,
25
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
 * GNU General Public License for more details.
28
*/
29

    
30
// prevent this file from being accessed directly
31
if (!defined('WB_PATH')) die(header('Location: ../../index.php'));
32

    
33
// TEMPLATE CODE STARTS BELOW
34
?>
35
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
36
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
37
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
38
<head>
39
	<meta http-equiv="Content-Type" content="text/html; charset=<?php 
40
	echo defined('DEFAULT_CHARSET') ? DEFAULT_CHARSET : 'utf-8'; ?>" />
41
	<meta name="description" content="<?php page_description(); ?>" />
42
	<meta name="keywords" content="<?php page_keywords(); ?>" />
43
	<?php 
44
	// automatically include optional WB module files (frontend.css, frontend.js)
45
	if (function_exists('register_frontend_modfiles')) {
46
		register_frontend_modfiles('css');
47
		register_frontend_modfiles('js');
48
	} ?>
49
	<link rel="stylesheet" type="text/css" href="<?php 
50
	echo TEMPLATE_DIR; ?>/template.css" media="screen,projection" />
51
	<link rel="stylesheet" type="text/css" href="<?php 
52
	echo TEMPLATE_DIR; ?>/print.css" media="print" />
53
	<title><?php page_title('', '[WEBSITE_TITLE]'); ?></title>
54
</head>
55

    
56
<body>
57

    
58
<div class="main">
59
	
60
	<div class="banner">
61
		<a href="<?php echo WB_URL; ?>/" target="_top"><?php page_title('', '[WEBSITE_TITLE]'); ?></a>
62
		<span>| <?php page_title('', '[PAGE_TITLE]'); ?></span>
63
	</div>
64
	
65
	<!-- frontend search -->
66
	<div class="search_box">
67
		<?php 
68
		// CODE FOR WEBSITE BAKER FRONTEND SEARCH
69
		if (SHOW_SEARCH) { ?>
70
			<form name="search" action="<?php echo WB_URL; ?>/search/index.php" method="get">
71
				<input type="hidden" name="referrer" value="<?php 
72
				echo defined('REFERRER_ID') ? REFERRER_ID : PAGE_ID; ?>" />
73
				<input type="text" name="string" class="search_string" />
74
				<input type="submit" name="wb_search" id="wb_search" value="<?php 
75
				echo $TEXT['SEARCH']; ?>" class="search_submit" />
76
			</form><?php 
77
		} ?>
78
	</div>
79

    
80
	<!-- main navigation menu -->
81
	<div class="menu">
82
<?php show_menu2(SM2_ALLMENU, SM2_ROOT, SM2_ROOT+PAGE_LEVEL_LIMIT, SM2_ALL|SM2_NUMCLASS );	?>
83
<?php
84
		// CODE FOR WEBSITE BAKER FRONTEND LOGIN
85
		if (FRONTEND_LOGIN == 'enabled' && VISIBILITY != 'private' && $wb->get_session('USER_ID') == '') {
86
				$redirect_url = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : WB_URL );
87
				$redirect_url = (isset($thisApp->redirect_url) ? $thisApp->redirect_url : $redirect_url );
88
?>
89
			<!-- login form -->
90
			<br />
91
			<form name="login" id="login" action="<?php echo LOGIN_URL; ?>" method="post">
92
				<input type="hidden" name="redirect" value="<?php echo $redirect_url;?>" /></p>
93
				<fieldset>
94
					<legend><?php echo $TEXT['LOGIN']; ?></legend>
95
					<label for="username" accesskey="1"><?php echo $TEXT['USERNAME']; ?>:</label>
96
					<input type="text" name="username" id="username" style="text-transform: lowercase;" /><br />
97
					<label for="password" accesskey="2"><?php echo $TEXT['PASSWORD']; ?>:</label>
98
					<input type="password" name="password" id="password" /><br />
99
					<input type="submit" name="wb_login" id="wb_login" value="<?php echo $MENU['LOGIN']; ?>"/><br />
100
	
101
					<!-- forgotten details link -->
102
					<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a>
103

    
104
					<!-- frontend signup -->
105
					<?php
106
					if (is_numeric(FRONTEND_SIGNUP)) { ?>
107
						<a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT['SIGNUP']; ?></a>
108
					<?php } ?>
109
				</fieldset>
110
			</form>
111
			
112
		<?php 
113
		} elseif (FRONTEND_LOGIN == 'enabled' && is_numeric($wb->get_session('USER_ID'))) { ?>
114
			<!-- logout form -->
115
			<br />
116
			<form name="logout" id="logout" action="<?php echo LOGOUT_URL; ?>" method="post">
117
				<fieldset>
118
					<legend><?php echo $TEXT['LOGGED_IN']; ?>:</legend>
119
					<?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $wb->get_display_name(); ?>
120
					<input type="submit" name="wb_logout" id="wb_logout" value="<?php echo $MENU['LOGOUT']; ?>" />
121
					<!-- edit user preferences -->
122
					<a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU['PREFERENCES']; ?></a>
123
				</fieldset>
124
			</form>
125
		<?php 
126
		} ?>
127
	</div>
128
	
129
	<div class="content">
130
		<?php page_content(); ?>
131
	</div>
132
	
133
	<div class="footer">
134
		<?php page_footer(); ?>
135
	</div>
136
	
137
</div>
138

    
139
<div class="powered_by">
140
	Powered by <a href="http://www.websitebaker.org" target="_blank">Website Baker</a>
141
</div>
142
<?php 
143
// automatically include optional WB module file frontend_body.js)
144
if (function_exists('register_frontend_modfiles_body')) { register_frontend_modfiles_body(); } 
145
?>
146
</body>
147
</html>
(1-1/5)