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


PHP messages::sendMessage方法代码示例

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


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

示例1: messages

 function action_index()
 {
     $data = new messages();
     if (isset($_POST['send'])) {
         if ($_POST["id"]) {
             $data->sendMessage($_POST["id"], $_POST["message"]);
         }
     }
     $messages = $data->getMessages();
     $data = array(array($messages, 'messages'));
     $this->view->generate('messages.tpl', $data);
 }
开发者ID:RWB01,项目名称:PHP-Learning,代码行数:12,代码来源:controller_messages.php

示例2: die

        $sql .= " published_day = '{$d}' ,";
        $sql .= " published_month = '{$m}' ,";
        $sql .= " published_year = '{$y}' ";
        $sql .= " where articles.articleID=" . $value;
        $result = $db->query($sql);
        if (!($result = $db->query($sql))) {
            die('Error:' . $db->error());
        }
        // Also we have to update on the article versions...
        $sql = " update article_versions ";
        $sql .= " set article_versions.stageID = '6' , status = 'live' , ";
        $sql .= " status = 'published' ,";
        $sql .= " dateline= '{$date_published}' ,";
        $sql .= " published_day = '{$d}' ,";
        $sql .= " published_month = '{$m}' ,";
        $sql .= " published_year = '{$y}' ";
        $sql .= " where article_versions.articleID=" . $value;
        if (!($result = $db->query($sql))) {
            die('Error:' . $db->error());
        }
        $receiverID = array($editorID, $writerID, $newsdirectorID);
        $msg = new messages();
        $title = $_SESSION['title'];
        $_SESSION['task'] = 'publish';
        $_SESSION['title'] = $title;
        $subject = " PUBLISHED : " . $_SESSION['title'];
        $message = " The article was successfully published. Thanks =) ";
        $msg->sendMessage($_SESSION['userID'], $receiverID, $date_msg_created, 0, $subject, $message);
    }
}
header('Location: view_article_versions.php?stageID=5');
开发者ID:sudogem,项目名称:brcms,代码行数:31,代码来源:publish_article.php

示例3: header

require 'coreclass.php';
session_start();
// if user is not login..redirect him to login page
if (!isset($_SESSION['login'])) {
    header('Location: login.php');
}
if (isset($_SESSION['login'])) {
    $userID = $_SESSION['userID'];
    $usertype = $_SESSION['usertype'];
}
// print_r($_POST);
if (isset($_POST['send'])) {
    $to = $_POST['to'];
    $subject = $_POST['subject'];
    $message = $_POST['message'];
    $date_msg_created = time();
    $msg = new messages();
    $result = $msg->sendMessage($_SESSION['userID'], $to, $date_msg_created, 'Unread', $subject, $message);
    if ($result) {
        $_SESSION['task'] = 'sent';
        $_SESSION['title'] = $subject;
        $_SESSION['to'] = $to;
        // Log the activity
        $action = new activity();
        $action->track_activity($userID, $action->sending_msg, 'Sending a message " ' . $_SESSION['title'] . ' " to ' . getUser_info($_SESSION['to'], 'fullname'));
        header('location: view_messages.php');
    }
}
if (isset($_POST['cancel'])) {
    header('location: view_messages.php');
}
开发者ID:sudogem,项目名称:brcms,代码行数:31,代码来源:sendmessage.php


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