I got a Fatal error
Code:
Fatal error: Call to a member function query_read() on a non-object in public_html/vbbtest/includes/adminfunctions_navbarmanager.php on line 36
Bellow is my code and recursive function
PHP Code:
$navbars = $db->query_read ("SELECT * FROM " . TABLE_PREFIX . "navbar_manager ORDER BY navbarid ASC,sortorder ASC");
while ($navbar = $db->fetch_array ($navbars))
{
$mc++;
print_cells_row (array ($navbar['navbarname'],
$navbar['navbarname'],
$navbar['sortorder'],
construct_link_code ($vbphrase['edit'], "navbar_manager.php?" . $vbulletin->session->vars['sessionurl'] . "do=manager&so=edit&navbarid=$navbar[navbarid]") .
construct_link_code ($vbphrase['delete'], "navbar_manager.php?" . $vbulletin->session->vars['sessionurl'] . "do=manager&so=delete&navbarid=$navbar[navbarid]")
));
getMenucon($navbar['navbarid']);
}
recursive function
PHP Code:
function getMenucon($id_cha){
$sqlMenuCon = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "navbar_manager WHERE navbarparentid = ". intval ($id_cha) ." order by sortorder");
while($navbar2 = $db->fetch_array($sqlMenuCon))
{
print_cells_row (array ($navbar['navbarname'],
$navbar['navbarname'],
$navbar['sortorder'],
construct_link_code ($vbphrase['edit'], "navbar_manager.php?" . $vbulletin->session->vars['sessionurl'] . "do=manager&so=edit&navbarid=$navbar[navbarid]") .
construct_link_code ($vbphrase['delete'], "navbar_manager.php?" . $vbulletin->session->vars['sessionurl'] . "do=manager&so=delete&navbarid=$navbar[navbarid]")
));
}
}
this code work when i test out site vbulletin.
Anybody can help me?