if ($contactSubmit) {
    $salute = filter_input(INPUT_POST, 'salute', FILTER_SANITIZE_STRING);
    $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
    $mail = filter_input(INPUT_POST, 'mail', FILTER_SANITIZE_STRING);
    $subject = filter_input(INPUT_POST, 'subject', FILTER_SANITIZE_STRING);
    $msg = filter_input(INPUT_POST, 'msg', FILTER_SANITIZE_STRING);
    $contactErrors = [];
    if (!empty($name) && !filterName($name)) {
        $contactErrors[] = 'Bitte verwenden Sie nur Buchstaben in ihrem Namen.';
    }
    if (empty($mail)) {
        $contactErrors[] = 'Bitte geben Sie Ihre E-Mail Adresse an.';
    } elseif (!filterEmail($mail)) {
        $contactErrors[] = 'Ihre angegebene E-Mail Adresse ist ungültig.';
    }
    if (!empty($subject) && !filterName($subject)) {
        $contactErrors[] = 'Bitte verwenden Sie nur Buchstaben in ihrem Namen.';
    }
    if (empty($msg)) {
        $contactErrors[] = 'Bitte geben Sie eine Nachricht ein.';
    } elseif (!filterString($msg)) {
        $contactErrors[] = 'Ihre Nachricht enthält unzulässige Zeichen';
    }
    if (empty($contactErrors)) {
        $to = '*****@*****.**';
        $msgSubject = $subject or 'Kontaktformular: Neue Nachricht an Möbel Mafia';
        $message = $msg;
        $headers = "From: <*****@*****.**> Kontaktformular" . "\r\n";
        $headers .= "Reply-To: " . $mail;
        $sent = mail($to, $msgSubject, $message, $headers);
        if ($sent) {
             } else {
                 $statement = filterNone();
                 $statement .= " GROUP BY id ";
                 $entries = getDBEntryCount($statement);
                 $statement .= setLimit($startAt, $rowsPerPage);
                 echo "Kein Filter gesetzt";
             }
         } else {
             if ($_POST["filter"] == "filterName") {
                 if (isset($_GET["in1"])) {
                     $input1 = $_GET["in1"];
                 } else {
                     $input1 = filterfunktion($_POST["filterInputName"]);
                 }
                 if (preg_match("/^[a-zA-Z ]*\$/", $input1)) {
                     $statement = filterName($input1);
                     $statement .= " GROUP BY id ";
                     $entries = getDBEntryCount($statement);
                     $statement .= setLimit($startAt, $rowsPerPage);
                     echo "Name beinhaltet \"" . $input1 . "\"";
                 } else {
                     $statement = filterNone();
                     $statement .= " GROUP BY id ";
                     $entries = getDBEntryCount($statement);
                     $statement .= setLimit($startAt, $rowsPerPage);
                     echo "Kein Filter gesetzt";
                 }
             }
         }
     }
 }
        <?php 
        }
        ?>
	        <li class="fl">
	        <?php 
        echo '<a class="pad_b2" href="javascript:document.checkout_address.address.value=\'' . $addresses->fields['address_book_id'] . '\';document.checkout_address.submit();" >';
        echo zen_image($template->get_template_dir('btn_ship.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_ship.gif');
        echo '</a>';
        ?>
	        <div class="pad_l">
	        <b><?php 
        echo zen_output_string_protected($addresses->fields['firstname'] . ' ' . $addresses->fields['lastname']);
        ?>
</b>
	        <?php 
        $array_filtered = filterName($addresses->fields);
        ?>
	        <?php 
        echo zen_address_format($format_id, $array_filtered, true, ' ', '<br />');
        echo '<br />Phone:' . $addresses->fields['phone'];
        ?>
	        
	        <ul class="pad_top">
	            <a href="<?php 
        echo zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses->fields['address_book_id']);
        ?>
">
	              <?php 
        echo zen_image($template->get_template_dir('btn_edit.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_edit.gif');
        ?>
	            </a>
?>
</div>
		</div>
	</li>
	<?php 
// ** BEGIN PAYPAL EXPRESS CHECKOUT **
if (!$payment_modules->in_special_checkout()) {
    // ** END PAYPAL EXPRESS CHECKOUT **
    ?>
	<li>
		<div id="checkoutBillto" class="margin_t big_">
		<ul>
    <?php 
    $billToArray = zen_get_address_fields($_SESSION['customer_id'], $_SESSION['billto']);
    echo '<b>' . $billToArray['firstname'] . ' ' . $billToArray['lastname'] . '</b>';
    $billToArrayFiltered = filterName($billToArray);
    $format_id_bill = zen_get_address_format_id($billToArrayFiltered['country_id']);
    echo zen_address_format($format_id_bill, $billToArrayFiltered, true, ' ', '<br />');
    echo '<br/>Phone: ' . $billToArray['phone'];
    ?>
		</ul>
		<?php 
    if (MAX_ADDRESS_BOOK_ENTRIES >= 2) {
        ?>
	    <ul class="pad_l_90px margin_t"><?php 
        echo '<a href="' . zen_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'url=checkout_shipping&edit=' . $_SESSION['billto'], 'SSL') . '">' . zen_image($template->get_template_dir('btn_edit.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/button') . '/btn_edit.gif', '', '', '', ' border="0"') . '</a>';
        ?>
</ul>
    <?php 
    }
    ?>
示例#5
0
function send_login_trouble_email($name, $from, $login_code, $message)
{
    $to = "*****@*****.**";
    $name = filterName($name);
    $from = filterEmail($from);
    $subject = "[Login Trouble] " . $name . " (" . $from . ") is having login trouble";
    $message = wordwrap(filterOther($message), 70, "\r\n");
    $login_code = filterOther($login_code);
    $message = $name . " is having trouble logging in with code " . $login_code . "\r\nMessage:\r\n" . $message;
    $headers = "From: " . $from . "\r\n" . "Reply-To: " . $from . "\r\n";
    return mail($to, $subject, $message, $headers);
}