--- gotwo.module.org	2006-10-20 11:09:54.000000000 -0400
+++ gotwo.module	2006-10-21 17:51:34.000000000 -0400
@@ -115,9 +115,23 @@
     drupal_not_found();
   }
   else {
-    db_query("UPDATE {gotwo} SET cnt = cnt+1 WHERE gid = '%d'", $res->gid);
-    drupal_goto($res->dst);
-    exit();
+    	db_query("UPDATE {gotwo} SET cnt = cnt+1 WHERE gid = '%d'", $res->gid);
+    if (variable_get('gotwo_disclaimer_boolean','FALSE')) {
+    	//Display the Disclaimer
+	$disclaimer_text = variable_get('gotwo_disclaimer_text','');
+	$find_array = array('%url','%seconds');
+	$replace_array = array($res->dst,variable_get('gotwo_disclaimer_time',0));
+	$page_content = str_replace($find_array, $replace_array,$disclaimer_text);
+	
+	//Should we refresh? 
+	if (variable_get('gotwo_disclaimer_time',0) > 0 ) {
+		drupal_set_html_head('<meta http-equiv="refresh" content="'.variable_get('gotwo_disclaimer_time',0).';url='.$res->dst.'"/>');
+	}
+	return $page_content;
+    } else {
+    	drupal_goto($res->dst);
+    	exit();
+    }
   }
 }
 
@@ -299,6 +313,29 @@
     '#description' => t('Target labels are the parts after the "go/" part of the shown url. The absolute maximum is 128.'),
     '#default_value' => min(variable_get('gotwo_max_length', 128), 128),
   );
+
+  $form['gotwo_disclaimer_boolean'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Disclaimer'),
+    '#description' => t('Check to add a disclaimer before redirecting to the Gotwo links'),
+    '#default_value' => variable_get('gotwo_disclaimer_boolean', false),
+  );
+  $gotwo_time = array(0,1,2,3,4,5,10,15,30,45,60);
+  $form['gotwo_disclaimer_time'] = array(
+    '#type' => 'select',
+    '#title' => t('# of seconds until refresh'),
+    '#options' => $gotwo_time,
+    '#description' => t('Number of seconds until the page will be redirected to the requested URL, 0 means no refresh'),
+    '#default_value' => variable_get('gotwo_disclaimer_time', 0),
+  );
+
+  $form['gotwo_disclaimer_text'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Disclaimer Text'),
+    '#description' => t('The disclaimer that will be presented to the user before they are redirected<br><strong>Variables available:</strong><br> %url = url to be redirected to <br>%seconds = # of seconds until page redirects'),
+    '#default_value' => variable_get('gotwo_disclaimer_text',''),
+  );
+
   return $form;
 }
 
