本文整理汇总了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);
}
}
示例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;
}
}
示例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());
}
示例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");
//
// }
}
}
示例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");
}
示例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");
}
示例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);
}
}
}
}
}
示例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");
}
}
}
}
示例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);
}
示例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());
}
示例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());
}
示例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");
}
}
}
示例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());
}
示例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);
}
示例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));
}