Bicycle crunches, roman-chair leg lifting exercise, plank exercises. You need all this stuff to strengthen your core (there are more core exercisesm naturally) and you can do them without hurting your knees. They won't work the big leg muscles, they're not easy, they hurt, but you absolutely MUST do them. A lot of other exercises depend on them. If you cannot do squats with weights, try bodyweight squats. Make your your knees are in line with your toes, and that should strengthen the muscles that hold them in place.
The reason your knees are bad is because they're weak - speak with a (I'm sure you've done this, though) sports injury expert and ask what exercises you can do. The bike -might- help with the knees. but I honestly have my doubts.
and as far as exercise goes, i stick with what i learned the last time. I have a gym that i use. right now im riding the bike because i have bad knees and the bike is the only thing i can use that doesnt bother my knees.