In top.php find:$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : "";
Insert below:$cat_match_sql .= " AND i.cat_id NOT IN (XX, XX, XX)";
Replace XX with list of category IDs you dont want to see.
For random image thing, in includes/functions.php find: $cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");
Insert below: $cat_id_sql .= (($cat_id_sql) ? "," : "")."XX,XX,XX";
Same deal, replace XX with list of category IDs you dont want to show. Note, this will affect the category random images as well.