Is_Pro_Site Usage - Coding help please

Hi

I am trying to output the current list of pro_sites a currently logged in user has (just like domain.com/pro-sites/ ) I will be adding it to a user dashboard.

Everytime I enter it, the code white screens my site....

<?php
if ( is_pro_site($blog_id) ) {
 $blogs = get_blogs_of_user(get_current_user_id());
	    if ($blogs) {
	      $content .= '<h3>' . __('Please choose a site to Upgrade or Modify:', 'psts') . '</h3>';
	      $content .= '
<ul>';
	      foreach ($blogs as $blog) {

	        //check for permission
	        switch_to_blog($blog->userblog_id);
	        $permission = current_user_can('edit_pages');
	        restore_current_blog();
	        if (!$permission)
	          continue;

	        $has_blog = true;

					$level = $this->get_level($blog->userblog_id);
					$level_label = ($level) ? $this->get_level_setting($level, 'name') : sprintf(__('Not %s', 'psts'), $this->get_setting('rebrand'));
					$upgrade_label = is_pro_site($blog->userblog_id) ? sprintf(__('Modify "%s"', 'psts'), $blog->blogname) : sprintf(__('Upgrade "%s"', 'psts'), $blog->blogname);

	        $content .= '
<li><a>checkout_url($blog->userblog_id) . '">' . $upgrade_label . '</a> (<em>' . $blog->siteurl . '</em>) - ' . $level_label . '</li>
';
	      }
	      $content .= '</ul>
';
	    }

	    //show message if no valid blogs
	    if (!$has_blog)
	      $content .= '<strong>' . __('Sorry, but it appears you are not an administrator for any sites.', 'psts') . '</strong>';

	  }

} endif; ?>

Cheers

Johnny