Revision 5
Added by stefan about 19 years ago
link.php | ||
---|---|---|
73 | 73 |
// Function to generate page list |
74 | 74 |
function gen_page_list($parent) { |
75 | 75 |
global $template, $database; |
76 |
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent'"); |
|
76 |
$get_pages = $database->query("SELECT page_id,menu_title,link,level FROM ".TABLE_PREFIX."pages WHERE parent = '$parent' AND visibility!='deleted'");
|
|
77 | 77 |
while($page = $get_pages->fetchRow()) { |
78 | 78 |
$title = stripslashes($page['menu_title']); |
79 | 79 |
// Add leading -'s so we can tell what level a page is at |
... | ... | |
91 | 91 |
// Get pages and put them into the pages list |
92 | 92 |
$template->set_block('main_block', 'page_list_block', 'page_list'); |
93 | 93 |
$database = new database(); |
94 |
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0'"); |
|
94 |
$get_pages = $database->query("SELECT page_id,menu_title,link FROM ".TABLE_PREFIX."pages WHERE parent = '0' AND visibility!='deleted'");
|
|
95 | 95 |
if($get_pages > 0) { |
96 | 96 |
// Add 'Please select...' |
97 | 97 |
$template->set_var('TITLE', 'Please select...'); |
... | ... | |
115 | 115 |
$template->parse('main', 'main_block', false); |
116 | 116 |
$template->pparse('output', 'page'); |
117 | 117 |
|
118 |
?> |
|
118 |
?> |
Also available in: Unified diff
Restructured frontend code and fixed various bugs