/** * nv_faq_list_cats() * * @param mixed $module_data * @return */ function nv_faq_list_cats($module_data) { global $db; $sql = "SELECT id, title, alias, who_view, groups_view FROM " . NV_PREFIXLANG . "_" . $module_data . "_categories WHERE status=1"; $result = $db->query($sql); $list = array(); while ($row = $result->fetch()) { if (nv_faq_set_allow($row['who_view'], $row['groups_view'])) { $list[$row['id']] = array('id' => (int) $row['id'], 'title' => $row['title'], 'alias' => $row['alias']); } } return $list; }
/** * nv_faq_list_cats() * * @param mixed $module_data * @return */ function nv_faq_list_cats($module_data) { global $db; $sql = "SELECT `id`, `title`, `alias`, `who_view`, `groups_view` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_categories` WHERE `status`=1"; $result = $db->sql_query($sql); $list = array(); while ($row = $db->sql_fetchrow($result)) { if (nv_faq_set_allow($row['who_view'], $row['groups_view'])) { $list[$row['id']] = array('id' => (int) $row['id'], 'title' => $row['title'], 'alias' => $row['alias']); } } return $list; }