Copyright (C) 2004-2005, Ryan Djurovich
Website Baker is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Website Baker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Website Baker; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require('../../config.php');
require_once(WB_PATH.'/framework/class.admin.php');
$admin = new admin('Pages', 'pages');
?>
>
query($query);
// Insert values into main page list
if($get_pages->numRows() > 0) {
while($page = $get_pages->fetchRow()) {
// Get user perms
$admin_groups = explode(',', str_replace('_', '', $page['admin_groups']));
$admin_users = explode(',', str_replace('_', '', $page['admin_users']));
if(is_numeric(array_search($admin->get_group_id(), $admin_groups)) OR is_numeric(array_search($admin->get_user_id(), $admin_users))) {
if($page['visibility'] == 'deleted') {
$can_modify = true;
$editable_pages = $editable_pages+1;
} else {
$can_modify = false;
}
} else {
$can_modify = false;
}
// Work out if we should show a plus or not
$get_page_subs = $database->query("SELECT page_id,admin_groups,admin_users FROM ".TABLE_PREFIX."pages WHERE parent = '".$page['page_id']."'");
if($get_page_subs->numRows() > 0) {
$display_plus = true;
} else {
$display_plus = false;
}
// Work out how many pages there are for this parent
$num_pages = $get_pages->numRows();
?>
get_permission('pages_modify') == true AND $can_modify == true AND $page['visibility'] != 'heading') { ?>
'.stripslashes($page['page_title']).'';
}
?>
get_permission('pages_settings') == true AND $can_modify == true) { ?>
get_permission('pages_settings') == true AND $can_modify == true) { ?>
get_permission('pages_settings') == true AND $can_modify == true) { ?>
get_permission('pages_delete') == true AND $can_modify == true) { ?>