コード例 #1
0
ファイル: products.php プロジェクト: diedsmiling/busenika
    // enable SMTP authentication
    $mail->Host = "lindero.ru";
    // sets the SMTP server
    $mail->Username = "******";
    // SMTP account username
    $mail->Password = "******";
    // SMTP account password
    $mail->SetFrom('*****@*****.**', 'First Last');
    $mail->AddReplyTo("*****@*****.**", "First Last");
    $mail->Subject = "PHPMailer Test Subject via smtp, basic with authentication";
    $mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
    // optional, comment out and test
    $mail->MsgHTML($body);
    $address = "*****@*****.**";
    $mail->AddAddress($address, "John Doe");
    $mail->AddAttachment("images/phpmailer.gif");
    // attachment
    $mail->AddAttachment("images/phpmailer_mini.gif");
    // attachment
    if (!$mail->Send()) {
        echo "Mailer Error: " . $mail->ErrorInfo;
    } else {
        echo "Message sent!";
    }
    $view->display('/views/products/autocomplete.tpl');
} elseif ($mode == 'ajax_search') {
    //ini_set('display_errors', 2);
    //var_dump($_GET['q']);
    $key = mysql_real_escape_string($_GET['q']);
    $result = array();
    $product_id_row = db_get_fields("SELECT product_id, MATCH(product) AGAINST ('{$key}' IN BOOLEAN MODE) AS relevance FROM  `cscart_product_descriptions` WHERE MATCH(product) AGAINST ('{$key}' IN BOOLEAN MODE) AND `lang_code` = 'RU' ORDER BY relevance DESC LIMIT 8");