I would keep him home until he's better or he could wind up in a very embarrassing situation. At 7 he's not going to miss anything that urgent anyway.
Diarreha is, unfortunately, something I have loads of experience with since I've had IBS since I was 19 and had to learn what avoid. Also I've been through the whole intestinal bug thing with my 4 children over the years.
Avoid fruit juices. Stuff like Kool Aid is better (pretty much time the only time I buy it) If he'll drink Pedialyte, better yet (my kids won't touch the stuff, unfortunately). Go with the BRAT diet (bananas, white rice, applesauce, and dry white toast) until he feels better. Things like Jello and non-fruit juice ice pops (like Hoodsie Pops) are ok too. Their systems might be a little sensitive for a few days after they've gotten over it, so you might still have to avoid fruits and fruit juices, high fiber foods, dairy products, and fatty foods.
They should be back to normal in a day or 2. Hang in there :)