function getIcons($where = '', $parameters = array(), $orderby = '', $start = 0, $limit = 0)
{
    global $smcFunc;
    validateWhere($where);
    validateOrder($orderby);
    $parameters += array('start' => $start, 'limit' => $limit);
    $sql = $smcFunc['db_query']('', '
		SELECT id_icon, icon 
		FROM {db_prefix}adk_icons 
		' . $orderby . '
		' . $where . '
		' . (empty($limit) && empty($start) ? '' : 'LIMIT {int:start}, {int:limit}'), $parameters);
    $icons = array();
    while ($row = $smcFunc['db_fetch_assoc']($sql)) {
        $icons[] = array('id' => $row['id_icon'], 'icon' => $row['icon']);
    }
    $smcFunc['db_free_result']($sql);
    return $icons;
}
function getCatAdminDownload($where = '', $parameters = array(), $start = 0, $limit = 0)
{
    global $context, $smcFunc;
    validateWhere($where);
    if (!empty($limit)) {
        $final = 'LIMIT ' . $start . ', ' . $limit;
    } else {
        $final = '';
    }
    $dbresult = $smcFunc['db_query']('', '
		SELECT id_cat, title, roworder, error, id_parent
		FROM {db_prefix}adk_down_cat
		' . $where . '
	 	ORDER BY roworder ASC
	 	' . $final, $parameters);
    $context['downloads_cat'] = array();
    while ($row = $smcFunc['db_fetch_assoc']($dbresult)) {
        $context['downloads_cat'][] = array('id_cat' => $row['id_cat'], 'title' => $row['title'], 'roworder' => $row['roworder'], 'id_parent' => $row['id_parent'], 'has_error' => !empty($row['error']));
    }
    $smcFunc['db_free_result']($dbresult);
}