Revision 865
Added by doc about 16 years ago
index.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
|
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2008, 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 |
|
|
2 |
/** |
|
3 |
* $Id$ |
|
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. |
|
24 | 28 |
*/ |
25 | 29 |
|
26 |
if(!defined('WB_URL')) { |
|
27 |
header('Location: ../index.php'); |
|
28 |
exit(0); |
|
29 |
} |
|
30 |
// prevent this file from being accessed directly |
|
31 |
if (!defined('WB_PATH')) die(header('Location: ../../index.php')); |
|
30 | 32 |
|
33 |
// TEMPLATE CODE STARTS BELOW |
|
31 | 34 |
?> |
32 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
35 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
36 |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
33 | 37 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
34 | 38 |
<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 |
|
42 |
// this allows to include the optional module files (frontend.css, frontend.js) into the head section |
|
43 |
if(function_exists('register_frontend_modfiles')) { |
|
44 |
register_frontend_modfiles('css'); |
|
45 |
register_frontend_modfiles('js'); |
|
46 |
} ?> |
|
47 |
<?php |
|
48 |
// this allows to add custom information to the head section of your template (WB-->Settings-->Website Header) |
|
49 |
echo WEBSITE_HEADER; |
|
50 |
?> |
|
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> |
|
51 | 54 |
</head> |
55 |
|
|
52 | 56 |
<body> |
53 | 57 |
|
54 | 58 |
<div class="main"> |
55 | 59 |
|
56 | 60 |
<div class="banner"> |
57 |
<a href="<?php echo WB_URL; ?>/" target="_top"><?php echo WEBSITE_TITLE; ?></a>
|
|
58 |
<font color="#D0D0D0">| <?php echo PAGE_TITLE; ?></font>
|
|
61 |
<a href="<?php echo WB_URL; ?>/" target="_top"><?php page_title('', '[WEBSITE_TITLE]'); ?></a>
|
|
62 |
<span>| <?php page_title('', '[PAGE_TITLE]'); ?></span>
|
|
59 | 63 |
</div> |
60 | 64 |
|
65 |
<!-- frontend search --> |
|
61 | 66 |
<div class="search_box"> |
62 |
<?php if(SHOW_SEARCH) { ?> |
|
63 |
<form name="search" action="<?php echo WB_URL.'/search/index.php'; ?>" method="get"> |
|
64 |
<input type="text" name="string" class="search_string" /> |
|
65 |
<input type="submit" name="submit" value="<?php echo $TEXT['SEARCH']; ?>" class="search_submit" /> |
|
66 |
</form> |
|
67 |
<?php } ?> |
|
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 |
} ?> |
|
68 | 78 |
</div> |
69 |
|
|
70 |
<?php |
|
71 |
// Only show menu items if we are supposed to |
|
72 |
if(SHOW_MENU) { |
|
73 |
?> |
|
79 |
|
|
80 |
<!-- main navigation menu --> |
|
74 | 81 |
<div class="menu"> |
75 |
<?php |
|
76 |
show_menu(); |
|
82 |
<?php show_menu(1, 0, -1, true, |
|
83 |
'<li><span [class]>[a][menu_title][/a]</span>', '</li>', |
|
84 |
'<ul>', '</ul>', 'class="menu_default"', 'class="menu_current"', 0 |
|
85 |
); |
|
86 |
?> |
|
77 | 87 |
|
78 |
if(FRONTEND_LOGIN == 'enabled' AND VISIBILITY != 'private' AND $wb->get_session('USER_ID') == '') { |
|
79 |
?> |
|
80 |
<form name="login" action="<?php echo LOGIN_URL; ?>" method="post" class="login_table"> |
|
81 |
<h1><?php echo $TEXT['LOGIN']; ?></h1> |
|
82 |
<?php echo $TEXT['USERNAME']; ?>: |
|
83 |
<input type="text" name="username" style="text-transform: lowercase;" /> |
|
84 |
<?php echo $TEXT['PASSWORD']; ?>: |
|
85 |
<input type="password" name="password" /> |
|
86 |
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" style="margin-top: 3px; text-transform: uppercase;" /> |
|
87 |
<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a> |
|
88 |
<?php if(is_numeric(FRONTEND_SIGNUP)) { ?> |
|
89 |
<a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT['SIGNUP']; ?></a> |
|
90 |
<?php } ?> |
|
91 |
</form> |
|
92 | 88 |
<?php |
93 |
} elseif(FRONTEND_LOGIN == 'enabled' AND is_numeric($wb->get_session('USER_ID'))) { |
|
94 |
?> |
|
95 |
<form name="logout" action="<?php echo LOGOUT_URL; ?>" method="post" class="login_table"> |
|
96 |
<h1><?php echo $TEXT['LOGGED_IN']; ?></h1> |
|
97 |
<?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $wb->get_display_name(); ?> |
|
89 |
// CODE FOR WEBSITE BAKER FRONTEND LOGIN |
|
90 |
if (FRONTEND_LOGIN == 'enabled' && VISIBILITY != 'private' |
|
91 |
&& $wb->get_session('USER_ID') == '') { ?> |
|
92 |
<!-- login form --> |
|
98 | 93 |
<br /> |
99 |
<input type="submit" name="submit" value="<?php echo $MENU['LOGOUT']; ?>" /> |
|
94 |
<form name="login" id="login" action="<?php echo LOGIN_URL; ?>" method="post"> |
|
95 |
<fieldset> |
|
96 |
<legend><?php echo $TEXT['LOGIN']; ?></legend> |
|
97 |
<label for="username" accesskey="1"><?php echo $TEXT['USERNAME']; ?>:</label> |
|
98 |
<input type="text" name="username" id="username" style="text-transform: lowercase;" /><br /> |
|
99 |
<label for="password" accesskey="2"><?php echo $TEXT['PASSWORD']; ?>:</label> |
|
100 |
<input type="password" name="password" id="password" /><br /> |
|
101 |
<input type="submit" name="wb_login" id="wb_login" value="<?php echo $MENU['LOGIN']; ?>"/><br /> |
|
102 |
|
|
103 |
<!-- forgotten details link --> |
|
104 |
<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a> |
|
105 |
|
|
106 |
<!-- frontend signup --> |
|
107 |
<?php |
|
108 |
if (is_numeric(FRONTEND_SIGNUP)) { ?> |
|
109 |
<a href="<?php echo SIGNUP_URL; ?>"><?php echo $TEXT['SIGNUP']; ?></a> |
|
110 |
<?php } ?> |
|
111 |
</fieldset> |
|
112 |
</form> |
|
113 |
|
|
114 |
<?php |
|
115 |
} elseif (FRONTEND_LOGIN == 'enabled' && is_numeric($wb->get_session('USER_ID'))) { ?> |
|
116 |
<!-- logout form --> |
|
100 | 117 |
<br /> |
101 |
<a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU['PREFERENCES']; ?></a> |
|
102 |
<a href="<?php echo ADMIN_URL; ?>/index.php"><?php echo $TEXT['ADMINISTRATION']; ?></a> |
|
103 |
</form> |
|
104 |
<?php |
|
105 |
} |
|
106 |
?> |
|
118 |
<form name="logout" id="logout" action="<?php echo LOGOUT_URL; ?>" method="post"> |
|
119 |
<fieldset> |
|
120 |
<legend><?php echo $TEXT['LOGGED_IN']; ?>:</legend> |
|
121 |
<?php echo $TEXT['WELCOME_BACK']; ?>, <?php echo $wb->get_display_name(); ?> |
|
122 |
<input type="submit" name="wb_logout" id="wb_logout" value="<?php echo $MENU['LOGOUT']; ?>" /> |
|
123 |
<!-- edit user preferences --> |
|
124 |
<a href="<?php echo PREFERENCES_URL; ?>"><?php echo $MENU['PREFERENCES']; ?></a> |
|
125 |
</fieldset> |
|
126 |
</form> |
|
127 |
<?php |
|
128 |
} ?> |
|
107 | 129 |
</div> |
108 |
<?php } ?> |
|
109 | 130 |
|
110 | 131 |
<div class="content"> |
111 | 132 |
<?php page_content(); ?> |
Also available in: Unified diff
updated basic templates according the template guidelines