当前位置: 首页>>代码示例>>PHP>>正文


PHP CommonController::sentMail方法代码示例

本文整理汇总了PHP中CommonController::sentMail方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonController::sentMail方法的具体用法?PHP CommonController::sentMail怎么用?PHP CommonController::sentMail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CommonController的用法示例。


在下文中一共展示了CommonController::sentMail方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

include 'assets/config.php';
if (!empty($_SESSION['id']) && !empty($_POST['id'])) {
    $status = array('0' => 'Awaiting Approval', '1' => 'Approved', '2' => 'Declined');
    $commonController = new CommonController();
    $resultReviews = $commonController->getTableData(array('table' => 'booking_requests br LEFT JOIN establishments e ON e.id = br.establishment_id', 'select' => 'br.*, e.name as establishment_name', 'where' => array('br.id=' . $_POST['id'])));
    if (mysql_num_rows($resultReviews)) {
        $row = mysql_fetch_array($resultReviews);
        $rowBookingStatusMail = 'Hi ' . $row['from_name'] . ',<br />';
        $rowBookingStatusMail .= 'Thank you for your booking request for <strong>
		<a href="' . SITE_URL . 'detail.php?q=' . base64_encode($row['listing_id']) . '">' . $row['establishment_name'] . '</a></strong> on ' . date('m-d-Y', strtotime($row['sent_date'])) . '<br />';
        $rowBookingStatusMail .= 'Your requirement meesage was as below, <br />';
        $rowBookingStatusMail .= $row['message'] . '<br /><br /><br />';
        $rowBookingStatusMail .= 'Your current request status is : ' . $status[$_POST['status']];
        $updateData['table'] = 'booking_requests';
        $updateData['id'] = $_POST['id'];
        $updateData['status'] = $_POST['status'];
        $updateData['status_changed_date'] = date('Y-m-d h:i:s');
        $commonController->insertUpdateData($updateData);
        $commonController->sentMail(array('to' => $row['from_email'], 'subject' => $row['establishment_name'] . ' Booking Request', 'message' => $rowBookingStatusMail));
        echo '1';
    } else {
        echo '0';
    }
} else {
    echo '0';
}
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:28,代码来源:booking_status_changed.php

示例2: array

            $resultPackage = $commonController->getTableData(array('table' => 'packages', 'where' => array('price=0')));
            if (mysql_num_rows($resultPackage) > 0) {
                $rowPackages = mysql_fetch_array($resultPackage);
                $data['subscription_id'] = $rowPackages['id'];
                $data['subscribed_on'] = date('Y-m-d h:i:s');
            }
            if ($commonController->insertUpdateData($data) > 0) {
                if ($sendRegisterMail) {
                    $registrationMsg = 'Hi ' . $data['username'] . ', <br /><br />';
                    $registrationMsg .= 'You have been successfully registered with Snoozeover site. <br />';
                    $registrationMsg .= 'email: ' . $data['email'] . ' <br />';
                    $registrationMsg .= 'password: ' . $password . ' <br />';
                    $registrationMsg .= 'Please <a href="' . SITE_URL . '">click here</a> to have a look to our SnoozeOver <br />';
                    $registrationMsg .= 'Thank you <br />';
                    $registrationMsg .= '<br /><br /><small><i>please don\'t replay to this mail</i></small>';
                    $commonController->sentMail(array('to' => $data['email'], 'subject' => 'Registration Mail', 'message' => $registrationMsg));
                }
                header("location:listingUser.php?userType=" . $_REQUEST['userType'] . "&save=success");
            } else {
                $msg = 'Something went wrong. We are looking into it';
                $class = 'danger';
            }
        } else {
            $class = 'danger';
        }
    }
}
?>
<div class="row">
	<div class="col-md-12">
		<h1 class="page-header">
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:add_edit_users.php

示例3: CommonController

<?php

include 'header.php';
$commonController = new CommonController();
if (!empty($_POST['btnContactUs'])) {
    $resultAdmin = $commonController->getTableData(array('table' => 'admin-user', 'where' => array('id=1')));
    if (mysql_num_rows($resultAdmin)) {
        $row = mysql_fetch_assoc($resultAdmin);
        $commonController->sentMail(array('to' => $row['email'], 'subject' => $_POST['txtSubject'], 'from' => $_POST['txtFrom'], 'message' => $_POST['txtMessage']));
        $msg = "Thank you for contacting us. We will get into touch with you soon.";
        $class = 'success';
    } else {
        $msg = "Sorry..!! But unfortunately something went wrong while processing your request. Please try after sometime";
        $class = 'danger';
    }
}
?>
<div class="inner-page">
	<h1>Contact Us</h1>
	<p>Happy to help you.</p> <br />

	<form method="POST" class="contact-us col-lg-4">
		<div class="checkin-form margin-1">
			<?php 
$name = '';
$email = '';
if (!empty($_SESSION['id'])) {
    $dataUser['table'] = 'users';
    $dataUser['where'] = array('id=' . $_SESSION['id'], 'status=1', 'is_delete=0');
    $resultUser = $commonController->getTableData($dataUser);
    if (mysql_num_rows($resultUser) > 0) {
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:contact.php

示例4: CommonController

<?php

include 'assets/config.php';
if (!empty($_SESSION['id']) && !empty($_POST['id'])) {
    $commonController = new CommonController();
    $resultReviews = $commonController->getTableData(array('table' => 'establishments_reviews er LEFT JOIN users u ON u.id = er.reviewed_by LEFT JOIN establishments e ON e.id = er.establishment_id', 'select' => 'er.review, er.created_date, u.username, er.id, u.email, e.name as establishment_name, er.establishment_id', 'where' => array('er.id=' . $_POST['id'])));
    if (mysql_num_rows($resultReviews)) {
        $rowReview = mysql_fetch_array($resultReviews);
        $reviewMail = 'Hi ' . $rowReview['username'] . ',<br />';
        $reviewMail .= 'Thank you for your review on <strong>
		<a href="' . SITE_URL . 'detail.php?q=' . base64_encode($rowReview['establishment_id']) . '">' . $rowReview['establishment_name'] . '</a></strong> on ' . date('m-d-Y', strtotime($rowReview['created_date'])) . '<br />';
        $reviewMail .= 'Your review was as below, <br />';
        $reviewMail .= $rowReview['review'] . '<br /><br /><br />';
        $reviewMail .= $_POST['msg'];
        $commonController->sentMail(array('to' => $rowReview['email'], 'subject' => $rowReview['establishment_name'] . ' Review Reply', 'message' => $reviewMail));
        echo '1';
    } else {
        echo '0';
    }
} else {
    echo '0';
}
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:22,代码来源:review_reply.php

示例5: json_encode

    $data['from_name'] = $_POST['from_name'];
    $data['check_in'] = date('Y-m-d h:i:s', strtotime($_POST['check_in']));
    $data['check_out'] = date('Y-m-d h:i:s', strtotime($_POST['check_out']));
    $data['sent_date'] = date('Y-m-d h:i:s');
    $data['status'] = 0;
    $data['establishment_id'] = $_POST['listing_id'];
    $data['thread_id'] = strtotime(date("Y-m-d h:i:s"));
    $data['status_changed_date'] = date('Y-m-d h:i:s');
    $result = $commonController->getTableData(array('select' => 'u.id, u.username, u.email, e.name as establishment_name', 'table' => 'establishments e INNER JOIN users u ON u.id = e.user_id', 'where' => array('e.id=' . $_POST['listing_id'])));
    if (!empty($result) && mysql_num_rows($result) > 0) {
        $row = mysql_fetch_array($result);
        $data['to_id'] = $row['id'];
        $data['to_name'] = $row['username'];
        $data['to_email'] = $row['email'];
    }
    $msg = "Hi " . $data['to_name'] . ",<br /><br />";
    $msg .= $data['from_name'] . " has contacted you for <a href='" . SITE_URL . "detail.php?q=" . base64_encode($listingId) . "'>" . $row['establishment_name'] . "</a> listing. <br /><br />";
    $msg .= "Following are the details, <br />";
    $msg .= "<ul><li>Rooms: " . $_POST['bookingRooms'] . "</li><li>Adults: " . $_POST['bookingAdults'] . "</li><li>Children: " . $_POST['bookingChildrens'] . "</li><li>Special Request: " . $_POST['bookingMessage'] . "</li></ul>";
    $data['message'] = mysql_escape_string($msg);
    if ($commonController->insertUpdateData($data) > 0) {
        // sent mail
        $commonController->sentMail(array('to' => $data['to_email'], 'from' => $data['from_email'], 'subject' => 'Booking Request regarding ' . $row['establishment_name'], 'message' => $msg));
        $array = array("d" => "1");
    } else {
        $array = array("d" => "0");
    }
} else {
    $array = array("d" => "0");
}
echo json_encode($array);
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:booking_request.php

示例6: date

        if (mysql_num_rows($resultUser) > 0) {
            $rowUsers = mysql_fetch_array($resultUser);
            $password = $commonController->randomPassword();
            $data['id'] = $rowUsers['id'];
            $data['password'] = md5($password);
            $data['updated_date'] = date('Y-m-d h:i:s');
            $data['table'] = 'users';
            if ($commonController->insertUpdateData($data)) {
                $registrationMsg = 'Hi ' . $rowUsers['username'] . ', <br /><br />';
                $registrationMsg .= 'You have been successfully reseted your password. <br />';
                $registrationMsg .= 'email: ' . $rowUsers['email'] . ' <br />';
                $registrationMsg .= 'password: ' . $password . ' <br />';
                $registrationMsg .= 'Please <a href="' . SITE_URL . '">click here</a> to have a look to our SnoozeOver <br />';
                $registrationMsg .= 'Thank you <br />';
                $registrationMsg .= '<br /><br /><small><i>please don\'t replay to this mail</i></small>';
                $commonController->sentMail(array('to' => $rowUsers['email'], 'subject' => 'Forgot Password', 'message' => stripslashes($registrationMsg)));
                $msg = "Password changed successfully and had been mail to you.";
                $class = 'success';
            } else {
                $msg = "Something went wrong, we are looking into it.";
                $class = 'danger';
            }
        } else {
            $msg = "Sorry, but we didn't find the email address associates with us. Can you please try to login or register?";
            $class = 'danger';
        }
    }
}
?>
<div class="inner-page">
	<h1>Forgot Password?</h1><br />
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:forgot_password.php

示例7: date

                     }
                 }
             }
             $updatedData = json_encode(array_merge($jsonObj, $commonKey));
             $saveScheduleData['table'] = 'schedule';
             $saveScheduleData['id'] = $scheduleId;
             $saveScheduleData['data'] = $updatedData;
             $commonController->insertUpdateData($saveScheduleData);
         }
         $dataOrder['ordered_date'] = date('Y-m-d h:i:s');
         $commonController->insertUpdateData($dataOrder);
         $msg = 'Hi ' . $rowUsers['username'];
         $msg .= '<br /><br />Thank you for booking at our site for ' . $rowEstablishment['name'] . ' on ' . $dataOrder['check_in_date'] . ' to ' . $dataOrder['check_out_date'];
         $msg .= '<br />Your transaction id is #' . $_POST["txn_id"];
         $msg .= 'Please <a href="' . SITE_URL . '">click here</a> to have a look to our SnoozeOver <br />';
         $commonController->sentMail(array('to' => $rowUsers['email'], 'subject' => 'Booking Information', 'message' => $msg));
         $subject = 'Instant Payment Notification - Recieved Payment';
         //$p->send_report($subject); // Send the notification about the transaction
         header('location:' . SITE_URL . 'post_payment.php?success=true&txn_id=' . $_POST["txn_id"]);
     } else {
         $subject = 'Instant Payment Notification - Payment Fail';
         //$p->send_report($subject); // failed notification
         header('location:' . SITE_URL . 'post_payment.php?success=false');
     }
     break;
 case "cancel":
     // case cancel to show user the transaction was cancelled
     echo "<h1>Transaction Cancelled<h1>";
     header('location:' . SITE_URL . 'cancel_payment.php');
     break;
 case "ipn":
开发者ID:aniketbasu14,项目名称:snoozeover,代码行数:31,代码来源:booking_paypal.php


注:本文中的CommonController::sentMail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。