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


PHP message类代码示例

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


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

示例1: _checkForCorrectMessageType

 /**
  * Assert that the SNS message type is notification
  *
  * @param message $snsJsonMsg convertedJsonMsg
  *
  * @throws OffAmazonPaymentsNotifications_InvalidMessageException if not correct type
  *
  * @return void if correct type
  */
 private static function _checkForCorrectMessageType($snsJsonMsg)
 {
     $type = $snsJsonMsg->getMandatoryField("Type");
     if (strcasecmp($type, "Notification") != 0) {
         throw new OffAmazonPaymentsNotifications_InvalidMessageException("Error with SNS Notification - unexpected message with Type of " . $type);
     }
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:16,代码来源:SnsMessageParser.php

示例2: getUnreadMessages

function getUnreadMessages($inUserID)
{
    if (isset($_SESSION['userid'])) {
        $messages = array();
        $messageid;
        $dbhandle = db_connect();
        $stmt = $dbhandle->stmt_init();
        //Get all messages from/to this user that are unread
        $stmt->prepare("SELECT MessageID, Time FROM Messages WHERE SenderID=? AND ReceiverID=? AND ReadFlag=0 ORDER BY Time");
        $stmt->bind_param("ii", $inUserID, $_SESSION['userid']);
        $stmt->execute();
        $stmt->store_result();
        $stmt->bind_result($messageid, $temptime);
        //Add each resulting message to the array to return
        //Mark the message as read
        while ($stmt->fetch()) {
            $message = new message();
            $message->getFromDB($messageid);
            $message->markRead();
            array_push($messages, $message);
        }
        $stmt->close();
        $dbhandle->close();
        return $messages;
    }
}
开发者ID:sammyr2011,项目名称:Task_Master,代码行数:26,代码来源:message_lister.php

示例3: module_message_edit

function module_message_edit()
{
    global $global, $smarty;
    $obj = new message();
    $obj->set_where('mes_id = ' . $global['id']);
    $smarty->assign('message', $obj->get_one());
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:7,代码来源:message_edit.php

示例4: removeava

 public function removeava()
 {
     if (isset($_GET['avi_id']) && isset($_GET['cli_id'])) {
         $idAvis = $_GET['avi_id'];
         $idUser = $_GET['cli_id'];
         $st = db()->prepare("DELETE FROM T_J_AVISABUSIF_AVA WHERE avi_id=:avi and cli_id=:cli");
         $st->bindParam(':avi', $idAvis);
         $st->bindParam(':cli', $idUser);
         $st->execute();
         $m = new message();
         $m->setFlash("L'avis abusif a été ignoré", "success");
         header("Refresh:0; url=../Sprint/?r=src");
         //            $id = $_GET['avi_id'];
         //            $avis = new T_E_AVIS_AVI($id);
         //            if($avis->avi_id == null){
         //                $m = new message();
         //                $m->setFlash("Cet avis n'existe pas");
         //                header("Refresh:0; url=../Sprint/?r=src");
         //            } else {
         //                $avis->deleteAllAva();
         //                $m = new message();
         //                $m->setFlash("l'avis a bien été supprimé","success");
         //                header("Refresh:0; url=../Sprint/?r=src");
         //
         //            }
     }
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:27,代码来源:SERVICE_COMMUNICATIONController.php

示例5: addPhoto

 public static function addPhoto($jeu_id, $pho_url)
 {
     $st = db()->prepare("insert into t_e_photo_pho(jeu_id,pho_url) values(" . $jeu_id . ",'" . $pho_url . "')");
     $st->execute();
     $m = new message();
     $m->setFlash("Upload réussi", "success");
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:7,代码来源:T_E_PHOTO_PHO.php

示例6: addVideo

 public static function addVideo($jeu_id, $vid_url)
 {
     $st = db()->prepare("insert into t_e_video_vid(jeu_id,vid_url) values(" . $jeu_id . ",'" . $vid_url . "')");
     $st->execute();
     $m = new message();
     $m->setFlash("Upload réussi", "success");
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:7,代码来源:T_E_VIDEO_VID.php

示例7: addMessages

 private function addMessages($project_id, $messagesArray)
 {
     $addMessage = new message();
     $userObj = new user();
     foreach ($messagesArray->{'post'} as $message) {
         $insid = 0;
         $title = $message->{'title'};
         $text = $message->{'body'};
         $uid = $message->{'author-id'};
         $user = $this->peopleHash["{$uid}"];
         $userProfile = $userObj->getProfile($user);
         $username = $userProfile["name"];
         $replies = $message->{'comments'};
         $insid = $addMessage->add($project_id, $title, $text, "", $user, $username, 0, 0);
         if ($insid > 0) {
             ++$this->msgCount;
             if (count($replies) > 0) {
                 foreach ($replies->{'comment'} as $reply) {
                     ++$this->msgCount;
                     $replytext = $reply->{"body"};
                     $ruid = $reply->{'author-id'};
                     $ruser = $this->peopleHash["{$ruid}"];
                     $ruserProfile = $userObj->getProfile($ruser);
                     $rusername = $ruserProfile["name"];
                     $addMessage->add($project_id, $replytext, $replytext, "", $ruser, $rusername, $insid, 0);
                 }
             }
         }
     }
 }
开发者ID:janvalentik,项目名称:Collabtive,代码行数:30,代码来源:class.importer.php

示例8: signal

 public function signal()
 {
     if (isset($_GET['id_avi'])) {
         if (!isset($_SESSION['user'])) {
             $m = new message();
             $m->setFlash("Vous devez etre connecté pour signaler un commentaire");
             $c = new T_E_CLIENT_CLIController();
             $c->render("login");
         } else {
             $allAvas = T_J_AVISABUSIF_AVA::FindAllByIdAvis($_GET['id_avi']);
             $alreadySignal = false;
             foreach ($allAvas as $ava) {
                 if ($ava->T_E_CLIENT_CLI->cli_id == $_SESSION['user']->cli_id) {
                     $alreadySignal = true;
                 }
             }
             if ($alreadySignal) {
                 $m = new message();
                 $m->setFlash("Vous avez déja signaler ce commentaire, merci d'attendre que le service vente prenne en compte votre requête");
                 header("Refresh:0; url=../Sprint/?r=jeu");
             } else {
                 T_J_AVISABUSIF_AVA::insertNewAva($_GET['id_avi'], $_SESSION['user']->cli_id);
                 $m = new message();
                 $m->setFlash("Le commentaire a bien été signalé", 'success');
                 header("Refresh:0; url=../Sprint/?r=jeu");
             }
         }
     }
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:29,代码来源:T_E_AVIS_AVIController.php

示例9: module_message_main

function module_message_main()
{
    global $global, $smarty;
    $obj = new message();
    $obj->set_page_size(5);
    $obj->set_page_num($global['page']);
    $sheet = $obj->get_sheet();
    set_link($obj->get_page_sum());
    $smarty->assign('message', $sheet);
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:10,代码来源:message_main.php

示例10: xsend

 public function xsend()
 {
     $message_configs['appid'] = $this->appid;
     $message_configs['appkey'] = $this->appkey;
     if ($this->sign_type != '') {
         $message_configs['sign_type'] = $this->sign_type;
     }
     $message = new message($message_configs);
     return $message->xsend($this->buildRequest());
 }
开发者ID:xueron,项目名称:SUBMAIL_PHP_SDK,代码行数:10,代码来源:messagexsend.php

示例11: unsubscribe

 public function unsubscribe()
 {
     $message_configs['appid'] = $this->appid;
     $message_configs['appkey'] = $this->appkey;
     if ($this->sign_type != '') {
         $message_configs['sign_type'] = $this->sign_type;
     }
     $addressbook = new message($message_configs);
     return $addressbook->unsubscribe($this->buildRequest());
 }
开发者ID:xueron,项目名称:SUBMAIL_PHP_SDK,代码行数:10,代码来源:addressbookmessage.php

示例12: removeRelay

 public function removeRelay()
 {
     if (isset($_SESSION['user'])) {
         if (isset($_GET['rel_id'])) {
             T_J_RELAISCLIENT_REC::removeRelayClient($_SESSION['user']->cli_id, $_GET['rel_id']);
             $m = new message();
             $m->setFlash('Le relais a bien été supprimé', 'success');
             header("Refresh:0; url=../Sprint/?r=cli/myRelay");
         }
     }
 }
开发者ID:ColinPeyrat,项目名称:scrum-ecommerce,代码行数:11,代码来源:T_J_RELAISCLIENT_RECController.php

示例13: send

 public function send($template, $data, $callback)
 {
     $builder = $this->mailer->MessageBuilder();
     $message = new message($builder);
     $message->from($this->config->get('mail.from'));
     $this->view->appendData($data);
     $message->body($this->view->render($template));
     call_user_func($callback, $message);
     $domain = $this->config->get('mail.domain');
     $this->mailer->post("{$domain}/messages", $builder->getMessage());
 }
开发者ID:yigitemre,项目名称:BauBoxProject,代码行数:11,代码来源:mailer.php

示例14: shutdown

 public static function shutdown()
 {
     $error = error_get_last();
     if ($error['message']) {
         $message = new message($error['message'], self::$levels['fatal']);
         $message->setFile($error['file']);
         $message->setLine($error['line']);
     } else {
         $message = new message("Exit", self::$levels['notice']);
     }
     self::_log($message);
 }
开发者ID:nastradamus39,项目名称:logger_client,代码行数:12,代码来源:httplogger.php

示例15: show_mail

 private function show_mail($mail)
 {
     $message = new message($mail["message"]);
     $mail["message"] = $message->unescaped_output();
     if ($mail["to_user_id"] == $this->user->id) {
         $this->title = "Inbox";
     } else {
         $this->title = "Sentbox";
         $back = "/sent";
     }
     $actions = show_boolean($mail["to_user_id"] == $this->user->id);
     $this->output->record($mail, "mail", array("actions" => $actions, "back" => $back));
 }
开发者ID:shannara,项目名称:banshee,代码行数:13,代码来源:mailbox.php


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