<?php

include("inc.top.php");
$q=new Cdb;
	$t->set_file("content", "new_campaign.ag.html");
	get_logged_info();
	$member_id=$q->f("id");
	if ($_GET['err'] == 1){
		$t->set_var('error',"<tr><td align='center'><b style='color:red'>The fields marked with * are mandatory</b></td></tr>");
	}elseif ($_GET['err'] == 2){
		$t->set_var('error',"<tr><td align='center'><b style='color:red'>The number of friends to ask on page is greater than the mandatory number to submit</b></td></tr>");
	}elseif ($_GET['err'] == 3){
		$t->set_var('error',"<tr><td align='center'><b style='color:red'>The number of friends or mandatory friends are not a number</b></td></tr>");
	}else{
		$t->set_var('error',"");
	}
	$error_captcha="";
	if (function_exists("imagecreate")==0) $error_captcha.="GDI library not installed"; 
	if (function_exists("imagettftext")==0) $error_captcha.="FreeType library not installed";
	$t->set_var("captcha_error",$error_captcha);
	$t->set_var("sitename_viral",get_setting("site_full_url"));
	
//	$q->query("SELECT * FROM autoresponder_config where field!='method'");
//	$values_arr = array();
//	while ($q->next_record()){
//		
//		if (strpos($q->f("field"),"field") === false){
//			
//		}elseif ($q->f("value")!=''){
//			$t->set_var($q->f("field"), $q->f("value"));
//			$q->next_record();
//			$t->set_var($q->f("field"), $q->f("value"));
//		}else{
//			$t->set_var($q->f("field"), $q->f("value"));
//			$q->next_record();
//			$t->set_var($q->f("field"), $q->f("value"));
//		}
//	}
//
//	$q->query("select * from autoresponder_config where field='method'");
//	$q->next_record();
//	$t->set_var("selected".$q->f("value"),"checked");
//	$q->query("select * from autoresponder_config where field='url'");
//	$q->next_record();
//	$t->set_var("url",$q->f("value"));
//	$q->query("select * from autoresponder_config where id='3'");
//	$q->next_record();
//	$t->set_var("first_name",$q->f("field"));
//	$t->set_var("value_name", substr(getdbfields("select_x",$q->f("value")),0,-5));
//
//	$q->query("select * from autoresponder_config where id='4'");
//	$q->next_record();
//	$t->set_var("email",$q->f("field"));
//	$t->set_var("email_value", substr(getdbfields("select_x",$q->f("value")),0,-5));
//


include("inc.bottom.php");
?>