14 |
14 |
|
15 |
15 |
// Function to generate page list
|
16 |
16 |
function gen_page_list($parent) {
|
17 |
|
global $template, $database;
|
18 |
|
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'");
|
19 |
|
while($page = $get_pages->fetchRow()) {
|
|
17 |
global $template, $database, $admin;
|
|
18 |
$get_pages = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'");
|
|
19 |
while($page = $get_pages->fetchRow()) {
|
|
20 |
if(!$admin->page_is_visible($page))
|
|
21 |
continue;
|
20 |
22 |
$title = stripslashes($page['menu_title']);
|
21 |
23 |
// Add leading -'s so we can tell what level a page is at
|
22 |
24 |
$leading_dashes = '';
|
... | ... | |
44 |
46 |
// Get pages and put them into the pages list
|
45 |
47 |
$template->set_block('main_block', 'page_list_block', 'page_list');
|
46 |
48 |
$database = new database();
|
47 |
|
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0'");
|
48 |
|
if($get_pages > 0) {
|
|
49 |
$get_pages = $database->query("SELECT * FROM ".TABLE_PREFIX."pages WHERE parent = '0'");
|
|
50 |
if($get_pages->numRows() > 0) {
|
49 |
51 |
// Loop through pages
|
50 |
|
while($page = $get_pages->fetchRow()) {
|
|
52 |
while($page = $get_pages->fetchRow()) {
|
|
53 |
if(!$admin->page_is_visible($page))
|
|
54 |
continue;
|
51 |
55 |
$title = stripslashes($page['menu_title']);
|
52 |
56 |
$template->set_var('TITLE', $title);
|
53 |
57 |
$template->set_var('LINK', '[wblink'.$page['page_id'].']');
|
fck_wbmodules.php: foreign privates pages in dropdown, fixed.
Fixed an E_NOTICE-warning.