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


PHP Messages::sendMessage方法代码示例

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


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

示例1: json_encode

<?php

require_once '../phpInclude/db_connection.php';
//error_reporting(E_ALL);
require_once '../classes/AllClasses.php';
$user_id = $_REQUEST['user_id'];
$user_id1 = $_REQUEST['user_id2'];
$messages = $_REQUEST['message'];
$message = new Messages();
if (!empty($user_id) && !empty($user_id1) && !empty($messages)) {
    if ($message->sendMessage($user_id1, $user_id1, $messages)) {
        $success = '1';
        $msg = 'Sent successfully';
    } else {
        $success = '0';
        $msg = 'Error!';
    }
} else {
    $success = '0';
    $msg = 'Incomplete Parameters';
}
echo json_encode(array('success' => $success, 'msg' => $msg));
开发者ID:Gameonn,项目名称:qism,代码行数:22,代码来源:send_message.php

示例2: MasterData

    require_once INCLUDE_DIR . 'class.masterData.php';
    $objMaster = new MasterData();
    $schoolId = $_SESSION['schoolId'];
    $teachers = $objMaster->getAllTeachersOfSchool($schoolId);
    if ($_POST['act'] == "reply") {
        $messageId = $_POST['messageId'];
        $message = $objMsg->messagesDetail($messageId);
        $message['message'] = strip_tags($message['message']);
    }
    $objTpl->assign('login_error', $login_error);
    $objTpl->assign('message', $message);
    $objTpl->assign('teachers', $teachers);
    $objTpl->display('messages_compose.tpl');
    exit;
}
if ($_POST['act'] == "send") {
    $toId = $_POST['toId'];
    $fromId = $_SESSION['userId'];
    $title = $_POST['title'];
    $message = $_POST['message'];
    $rs = $objMsg->sendMessage($toId, $fromId, $title, $message);
    if ($rs) {
        $login_error = "Message send successfully.";
    }
}
$messages = $objMsg->getUserMessages($user);
//$unread = $objUser->getUnreadMsgs();
$objTpl->assign('login_error', $login_error);
$objTpl->assign('unread', $unread);
$objTpl->assign('messages', $messages);
$objTpl->display('messages.tpl');
开发者ID:php2code,项目名称:School,代码行数:31,代码来源:messages.php

示例3: processAction

 /**
  * processAction
  * Update the record previously selected
  * @return unknown_type
  */
 public function processAction()
 {
     $request = $this->getRequest();
     try {
         // Check if we have a POST request
         if (!$request->isPost()) {
             return $this->_helper->redirector('index');
         }
         // Get our form and validate it
         $form = $this->getForm('/admin/domains/process');
         if (!$form->isValid($request->getPost())) {
             // Invalid entries
             $this->view->form = $form;
             $this->view->title = $this->translator->translate("Domain Process");
             $this->view->description = $this->translator->translate("Check all the information posted before saving them.");
             return $this->_helper->viewRenderer('customform');
             // re-render the login form
         }
         // Get the values posted
         $params = $form->getValues();
         // Get the id
         $id = $params['domain_id'];
         if (!empty($params['dnsform']['target']) && !empty($params['dnsform']['zones'])) {
             Dns_Zones::addDnsZone($id, $params['dnsform']['subdomain'], $params['dnsform']['target'], $params['dnsform']['zones']);
         }
         // Save the message note
         if (!empty($params['note'])) {
             Messages::addMessage($params['note'], $this->customer['customer_id'], $id);
             $isp = Shineisp_Registry::get('ISP');
             $placeholder['fullname'] = $this->customer['firstname'] . " " . $this->customer['lastname'];
             $placeholder['domain'] = domains::getDomainName($id);
             $placeholder['message'] = $params['note'];
             $placeholder['messagetype'] = $this->translator->translate('Domain');
             Messages::sendMessage("message_new", $this->customer['email'], $placeholder);
             Messages::sendMessage("message_admin", $isp->email, $placeholder);
         }
         Domains::setAuthInfo($id, $params['authinfocode']);
         Domains::setAutorenew($id, $params['autorenew']);
         $this->_helper->redirector('edit', 'domains', 'default', array('id' => $id, 'mex' => 'The task requested has been executed successfully.', 'status' => 'success'));
     } catch (Exception $e) {
         die($e->getMessage());
     }
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:48,代码来源:DomainsController.php

示例4:

            $content = 'Proficiat ' . $firstname;
            $content = $content . ', <br/><br/>Je hebt &eacute;&eacute;n of meerdere realisaties in DeepskyLog!<br/><br/>';
            $content = $content . 'Bekijk je realisaties op <a href="http://www.deepskylog.be/index.php?indexAction=detail_observer&user=' . $value . '">http://www.deepskylog.be/index.php?indexAction=detail_observer&user=' . $value . '</a>';
            $content = $content . '<br /><br />Het DeepskyLog team';
        } else {
            if ($get->language == "en") {
                $subject = 'You have one of more realisations in DeepskyLog!';
                $content = 'Congratulations ' . $firstname;
                $content = $content . ', <br/><br/>You have one or more realisations in DeepskyLog!<br/><br/>';
                $content = $content . 'Look at your realisation at <a href="http://www.deepskylog.org/index.php?indexAction=detail_observer&user=' . $value . '">http://www.deepskylog.org/index.php?indexAction=detail_observer&user=' . $value . '</a>';
                $content = $content . '<br /><br />The DeepskyLog team';
            } else {
                if ($get->language == "fr") {
                    $subject = 'Vous avez une ou plusieures r&eacute;alisations dans DeepskyLog!';
                    $content = 'F&eacute;licitations ' . $firstname;
                    $content = $content . ', <br/><br/>Vous avez une ou plusieures r&eacute;alisations dans DeepskyLog!<br/><br/>';
                    $content = $content . 'Regardez vos r&eacute;alisations &agrave; <a href="http://www.deepskylog.fr/index.php?indexAction=detail_observer&user=' . $value . '">http://www.deepskylog.fr/index.php?indexAction=detail_observer&user=' . $value . '</a>';
                    $content = $content . '<br /><br />Le team DeepskyLog';
                } else {
                    $subject = 'Sie haben ein oder mehrere Realisierungen in DeepskyLog!';
                    $content = 'Gratulation ' . $firstname;
                    $content = $content . ', <br/><br/>Sie haben ein oder mehrere Realisierungen in DeepskyLog!<br/><br/>';
                    $content = $content . 'Sehen Sie Ihre Erkenntnisse auf <a href="http://www.deepskylog.de/index.php?indexAction=detail_observer&user=' . $value . '">http://www.deepskylog.de/index.php?indexAction=detail_observer&user=' . $value . '</a>';
                    $content = $content . '<br /><br />Das DeepskyLog Team';
                }
            }
        }
        $objMessages->sendMessage("DeepskyLog", $value, $subject, $content);
    }
}
print "Database update successful.\n<br />";
开发者ID:rolfvandervleuten,项目名称:DeepskyLog,代码行数:31,代码来源:updatev4.3-v5.0a.php

示例5: processAction

 /**
  * processAction
  * Update the record previously selected
  * @return unknown_type
  */
 public function processAction()
 {
     $request = $this->getRequest();
     // Check if we have a POST request
     if (!$request->isPost()) {
         return $this->_helper->redirector('index');
     }
     // Get our form and validate it
     $form = $this->getForm('/admin/service/process');
     if (!$form->isValid($request->getPost())) {
         // Invalid entries
         $this->view->form = $form;
         $this->view->title = $this->translator->translate("Service");
         $this->view->description = $this->translator->translate("Check all the fields and click on the save button");
         return $this->_helper->viewRenderer('customform');
         // re-render the login form
     }
     // Get the values posted
     $params = $form->getValues();
     // Get the id
     $id = $this->getRequest()->getParam('detail_id');
     if (is_numeric($id)) {
         OrdersItems::setAutorenew($id, $params['autorenew']);
     }
     // Save the message note
     if (!empty($params['message'])) {
         Messages::addMessage($params['message'], $this->customer['customer_id'], null, null, $id);
         $isp = Shineisp_Registry::get('ISP');
         $placeholder['fullname'] = $this->customer['firstname'] . " " . $this->customer['lastname'];
         $placeholder['messagetype'] = $this->translator->translate('Order Details');
         $placeholder['message'] = $params['message'];
         Messages::sendMessage("message_new", $this->customer['email'], $placeholder);
         Messages::sendMessage("message_admin", $isp->email, $placeholder);
     }
     $this->_helper->redirector('edit', 'services', 'default', array('id' => $id, 'mex' => 'The task requested has been executed successfully.', 'status' => 'success'));
 }
开发者ID:kokkez,项目名称:shineisp,代码行数:41,代码来源:ServicesController.php

示例6: Patient

     $emisor = PATIENT;
     $patient = $_SESSION['user']['id'];
     /*$admin = $data['mensaje']['to'];*/
     $admin = 1;
     $idioma = es;
 } else {
     $emisor = ADMIN;
     /*$admin = $_SESSION['user']['id'];*/
     $admin = 1;
     $patient = $data['mensaje']['to'];
     $pct = new Patient($db);
     $info_paciente = $pct->getPatient('info', $patient);
     $idioma = $info_paciente->datos[0]['idioma'];
 }
 $msg = new Messages($db);
 $result = $msg->sendMessage($emisor, $patient, $admin, $data['mensaje']['mensaje'], $data['mensaje']['asunto']);
 if ($result->resultado && isset($info_paciente)) {
     if ($_SESSION['user']['type'] != PATIENT) {
         switch ($idioma) {
             case "en":
                 $cuerpo = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/mails/message_en.html");
                 $asunto = 'You have received a message in your EMIO account';
                 break;
             case "de":
                 $cuerpo = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/mails/message_en.html");
                 $asunto = 'You have received a message in your EMIO account';
                 break;
             default:
                 $cuerpo = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/mails/message.html");
                 $asunto = 'Tiene un mensaje en EMIO';
         }
开发者ID:migumuno,项目名称:obesity,代码行数:31,代码来源:api.php

示例7: isset

<?php

include_once "../includes/webservice.inc.php";
$webService = new Webservices_Writer();
$webService->init();
$data = isset($_POST['data']) ? $_POST['data'] : '';
$messagesObj = new Messages();
$msgsent = $messagesObj->sendMessage($data);
if ($msgsent) {
    $webService->createXMLInstance();
    $webService->appendArrayToRootNode('', $msgsent);
    $webService->displayXML();
} else {
    $xmls = $webService->errorXML(join(",", $messagesObj->errorMessages));
    $webService->outputXML($xmls);
}
开发者ID:rapsody,项目名称:HeartwebApp,代码行数:16,代码来源:sendingmessage.php


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