//startseite
include ("config.inc.php");
include ("include/funcs.inc.php");
//===========================================
//get variables
//===========================================
$email=$_POST["email"];
$step=$_POST["step"];
$agb=$_POST["agb"];
connect();
//===========================================
//verabreitung
//===========================================
if ($step==2)
{
$check=gimmeone("SELECT count(*) FROM user WHERE email='".mysql_escape_string($email)."' LIMIT 0,1");
if ($check<>0)
{
$error.='- Die eingegebene Mailadresse ist bereits eingetragen!
';
}
if (!is_valid_email($email) && !empty($email))
{
$error.='- Die Mail-Adresse ist nicht korrekt!
';
}
if (empty($email))
{
$error.='- Bitte eine Mail-Adresse angeben!
';
}
if ($agb<>1)
{
$error.='- Bitte die AGB akzeptieren!
';
}
if (empty($error))
{
add_new_user('','',$email);
$step=2;
}
else
{
$step=1;
}
}
//===========================================
//ausgabe
//===========================================
$template["highlight_current"]=6;
include ("template/header.inc.php");
if (empty($step) || $step==1)
{
//es wurde kein schritt übertragen => wir sind bei step 1
include ("template/newsletter-1.inc.php");
}
else
{
//wir sind bei step 2
include ("template/newsletter-2.inc.php");
}
include ("template/footer.inc.php");
?>