| 
              
                 | Neueintrag bestätigen und abschließen |  
                 | $datei = "./datenbank/mailtext2.txt";
if ($fp = fopen($datei, "r")) {
    $content = fread($fp, filesize($datei));
    $content = stripslashes($content);
    fclose($fp);
}
$mail_part = explode("[END]", $content);
?> 
    
        | $user = strip_tags($_REQUEST['user']);
            $ident = strip_tags($_REQUEST['ident']);
            $e = strip_tags($_REQUEST['e']);
            $send = strip_tags($_REQUEST['send']);
            if ($send != 1 && $send != 2) {
                $sqlQuery = "SELECT * FROM neu_validate WHERE userID = '$user'";
                $result = $conn->query($sqlQuery);
                $numberOfRows = mysqli_num_rows($result);
                if ($numberOfRows > 0) {
                    $i = 0;
                    while ($i < $numberOfRows) {
                        $thisId = mysqli_result($result, $i, "id");
                        $thisTitel = mysqli_result($result, $i, "titel");
                        $thisBeschreibung = mysqli_result($result, $i, "beschreibung");
                        $thisKeywords = mysqli_result($result, $i, "keywords");
                        $thisEmail = mysqli_result($result, $i, "email");
                        $thisKategorie = mysqli_result($result, $i, "katagorie");
                        $thisUser_date_time = mysqli_result($result, $i, "user_date_time");
                        $thisUserID = mysqli_result($result, $i, "userID");
                        $thisUrl = mysqli_result($result, $i, "url");
            ?> Nachfolgend sehen Sie wie Ihr Eintrag bei uns aussehen wird.
 
 
 
 echo "
 
 
 
 
 
 
 
 ";
                        $i++;
                    }
                } else {
                    echo $txt['0046'];
                }
            } elseif ($send == 2 && $send != 1) {
                $sql = "DELETE FROM neu_validate WHERE id = '$e' AND userID = '$ident' ";
                $result = $conn->query($sql);
                echo $txt2['0003'] . "
 
 
 ";
            } else {
                $sqlQuery1 = "SELECT * FROM neu_validate WHERE userID = '$ident' AND id = '$e'";
                $result1 = $conn->query($sqlQuery1);
                $numberOfRows1 = mysqli_num_rows($result1);
                if ($numberOfRows1 > 0) {
                    $i = 0;
                    while ($i < $numberOfRows1) {
                        $thisId1 = mysqli_result($result1, $i, "id");
                        $thisTitel1 = mysqli_result($result1, $i, "titel");
                        $thisBeschreibung1 = mysqli_result($result1, $i, "beschreibung");
                        $thisKeywords1 = mysqli_result($result1, $i, "keywords");
                        $thisBenutzermail1 = mysqli_result($result1, $i, "email");
                        $thisKategorie1 = mysqli_result($result1, $i, "katagorie");
                        $thisUser_date_time1 = mysqli_result($result1, $i, "user_date_time");
                        $thisUserID1 = mysqli_result($result1, $i, "userID");
                        $thisUrl1 = mysqli_result($result1, $i, "url");
                        $i++;
                    }
                    if ($demomode != 1) {
                        $eintmenge = $conn->query("SELECT COUNT(*) from eintraege WHERE url = '" . $thisUrl1 . "'");
                        $eintin = mysqli_result($eintmenge, 0, 0);
                        if ($eintin != 0) {
                            $check2 = "1";
                            echo $txt['0031'];
                            $sql = "DELETE FROM neu_validate WHERE id = '$thisId1' AND userID = '$thisUserID1' ";
                            $result = $conn->query($sql);
                        }
                        $in_val = $conn->query("SELECT COUNT(*) from validate WHERE url = '" . $thisUrl1 . "'");
                        $eintin_val = mysqli_result($in_val, 0, 0);
                        if ($eintin_val != 0) {
                            $check1 = "1";
                            echo $txt['0033'];
                            $sql = "DELETE FROM neu_validate WHERE id = '$thisId1' AND userID = '$thisUserID1' ";
                            $result = $conn->query($sql);
                        }
                    }
                }
                if ($check1 != 1 && $check2 != 1 && $numberOfRows1 > 0) {
                    if ($letter_an == 1) {
                        $eintmenge = $conn->query("SELECT COUNT(*) from newsletter WHERE newsmail = '$thisBenutzermail1'")
                            or die('query error');
                        $eintgesamt = 0;
                        $eintgesamt = mysqli_result($eintmenge, 0, 0);
                        if ($eintgesamt == 0) {
                            $sqlQueryx = "INSERT INTO newsletter (id , newsmail , user_date_time )
VALUES ('' , '$thisBenutzermail1' , '$thisUser_date_time1' )";
                            $resultx = $conn->query($sqlQueryx);
                        }
                    }
                    if ($auto_freischalt == "nein") {
                        echo $txt['0047'];
                        $sqlQuery = "INSERT INTO validate (id , titel , beschreibung , keywords , email , katagorie , user_date_time , url ) VALUES ('' , '$thisTitel1' , '$thisBeschreibung1' , '$thisKeywords1' , '$thisEmail1' , '$thisKategorie1' , '$thisUser_date_time1' , '$thisUrl1' )";
                        $result = $conn->query($sqlQuery);
                        $sql = "DELETE FROM neu_validate WHERE id = '$thisId1' AND userID = '$thisUserID1' ";
                        $result = $conn->query($sql);
                    } else {
                        echo $txt['0048'];
                        $freischaltbetreff = $mail_part[0];
                        $freischalttexttext = $mail_part[1];
                        $hostname = $_SERVER['HTTP_HOST'];
                        $path = dirname($_SERVER['PHP_SELF']);
                        $url_newsmail = urlencode($thisBenutzermail1);
                        $thislink = 'http://' . $hostname . ($path == '/' ? '' : $path) . '/index.php?go=newsletter&newsmail=' . $url_newsmail;
                        $thislink = trim($thislink);
                        $thislink = str_replace(" ", "%20", $thislink);
                        //echo $thislink;
                        $freischalttexttext = str_replace("{URL}", $thisUrl1, $freischalttexttext);
                        $freischalttexttext = str_replace("{TITEL}", $thisTitel1, $freischalttexttext);
                        $freischalttexttext = str_replace("{BESCHREIBUNG}", $thisBeschreibung1, $freischalttexttext);
                        $freischalttexttext = str_replace("{EMAIL}", $thisBenutzermail1, $freischalttexttext);
                        $freischalttexttext = str_replace("{NEWSLETTERLINK}", $thislink, $freischalttexttext);
                        @mail("$thisBenutzermail1", "$freischaltbetreff", "$freischalttexttext\n\n", "From: $systemmail");
                        $sqlQuery = "INSERT INTO eintraege (id , titel , beschreibung , url , keywords , kategorie , benutzermail , ip_date_time , top ) VALUES ('' , '$thisTitel1' , '$thisBeschreibung1' , '$thisUrl1' , '$thisKeywords1' , '$thisKategorie1' , '$thisBenutzermail1' , '$thisIp_date_time1', '')";
                        $result = $conn->query($sqlQuery);
                        $sql = "DELETE FROM neu_validate WHERE id = '$thisId1' AND userID = '$thisUserID1' ";
                        $result = $conn->query($sql);
                    }
                }
            }
            ?>
 |  
 |  |  |  |