Hi Joe,
Wordpress won't parse php, - at least not without finding a wordpress plugin that will work with your template.
WordPress can embed code for flash galleries without any problems. Search for a wordpress plugin that can force WP to parse php code. There are also numerous (free) non-php gallery plugins that work well with WordPress.