--- contributions/modules/banner/banner.module	Thu Aug  5 21:30:29 2004
+++ modules/banner.module	Mon Aug  9 20:48:33 2004
@@ -191,7 +285,7 @@
 
 
 function banner_user_edit($banner) {
-  $output = _banner_show(array2object($banner));
+  $output = theme('banner_show', array2object($banner));
 
   $headers = array('', t('views'), t('clicks'), '%', t('max views'), t('max clicks'), t('views left'), t('clicks left'), t('notify'), t('status'));
 
@@ -510,18 +604,18 @@
         $output = banner_admin_view(db_fetch_object(db_query('SELECT * from {banner} WHERE id = %d', $id)));
         break;
       case t('Save'):
-        $output = banner_save($edit);
-        $output .= banner_overview();
+        banner_save($edit);
+        drupal_goto('admin/banner');
         break;
       case t('Delete'):
-        $output = banner_delete($edit);
-        $output .= banner_overview();
+        banner_delete($edit);
+        drupal_goto('admin/banner');
         break;
       case 'refresh':
-        $output = '<hr>';
         _banner_refresh_cache();
-        $output .= drupal_set_message(t('Cache refreshed.'));
-        // break intentionally omitted!
+        drupal_set_message(t('Cache refreshed.'));
+        drupal_goto('admin/banner');
+        break;
       /*
       ** TODO: Find another easy way to walk the array
       ** Now that we return the output of admin pages instead of simply
@@ -535,7 +629,7 @@
       **  break;
       */
       default:
-        $output .= banner_overview();
+        $output = banner_overview();
         break;
     }
     print theme('page', $output);
@@ -548,7 +642,7 @@
 function banner_admin_view($banner = NULL) {
   if ($banner->id) {
 
-    $output = _banner_show($banner). "<br />\n";
+    $output = theme('banner_show', $banner). "<br />\n";
     $output .= '<h3>'. t('Overview') .":</h3>\n";
     $headers = array(
                  array('data' => t('title')),
@@ -641,7 +735,7 @@
 function banner_form($edit = NULL) {
   $group = '';
   if ($edit['id']) {
-    $group = '<div align=\'center\'>' ._banner_show(array2object($edit)). '</div>';
+    $group = '<div class="banner-preview">' .theme('banner_show', array2object($edit)). '</div>';
   }
 
   $group .= form_textfield(t('Title'), 'title', $edit['title'], 30, 255, t('A name for this banner, used in administration only. e.g.: banner-1'));
@@ -651,7 +745,7 @@
   $group .= form_select(t('Position'), 'position', $edit['position'], range(0,9), t('Position of this banner in the page.'));
   $group .= form_textfield(t('Automatically publish banner'), 'publish_date', ($edit['publish_date'] ? format_date((int)$edit['publish_date']) : ''), 30, 55, t('The date at which this banner will be automatically published.  Leave empty if you don\'t want to schedule this banner, or fill out a string containing an English date format.  Example input:') . " '". date('j F Y G:i') ."', '". date('m/d/y H:i') ."', '". date('F j, Y H:i') ."', ...");
   $group .= form_textfield(t('Automatically unpublish banner'), 'unpublish_date', ($edit['unpublish_date'] ? format_date((int)$edit['unpublish_date']) : ''), 30, 55, t('The date at which this banner will be automatically unpublished.  Leave empty if you don\'t want to schedule this banner, or fill out a string containing an English date format.  Example input:') . " '". date('j F Y G:i') ."', '". date('m/d/y H:i') ."', '". date('F j, Y H:i') ."', ...");
-  $form .= form_group(t('Overview'), $group);
+  $form .= $group;
 
   $group = form_select(t('Daily notification'), 'day_notify', $edit['day_notify'], array(0 => t('disabled'), 1 => t('enabled')), t('Daily notification of banner statistics.  If enabled, the owner of this banner will receive daily notification emails summarizing banner activity.'));
   $group .= form_select(t('Weekly notification'), 'week_notify', $edit['week_notify'], array(0 => t('disabled'), 1 => t('enabled')), t('Weekly notification of banner statistics.  If enabled, the owner of this banner will receive weekly notification emails summarizing banner activity.'));
@@ -762,7 +856,8 @@
   }
 
   _banner_refresh_cache(array('banner_reset' => $reset));
-  return drupal_set_message($string);
+  drupal_set_message($string);
+  return;
 }
 
 function banner_delete($edit) {
@@ -771,7 +866,8 @@
   watchdog('special', strtr("banner: '%banner' deleted.", array('%banner' => l("$edit[title]", "admin/banner/edit/$edit[id]"))));
   db_query('DELETE FROM {banner} WHERE id = %d', $edit['id']);
   _banner_refresh_cache();
-  return drupal_set_message(t('banner deleted.'));
+  drupal_set_message(t('banner deleted.'));
+  return;
 }
 
 function banner_overview() {
@@ -856,12 +952,12 @@
   }
 }
 
-function _banner_show($banner) {
+function theme_banner_show($banner) {
   $filename = file_create_url("$banner->path");
 
   switch(_banner_type($banner->format)) {
     case 'image':
       return l("<img src='$filename' border='0' width='$banner->width' height='$banner->height'>", "banner/$banner->id", array('title'=>$banner->url));
       break;
     case 'swf':
       $out = <<<EOD
