本文整理汇总了PHP中messages::uuidToMessageID方法的典型用法代码示例。如果您正苦于以下问题:PHP messages::uuidToMessageID方法的具体用法?PHP messages::uuidToMessageID怎么用?PHP messages::uuidToMessageID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类messages
的用法示例。
在下文中一共展示了messages::uuidToMessageID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: messages
<?php
/**
* Delete a specific message of your own then display your messages
*/
if ($_SESSION['username'] != "") {
require_once 'web/core/navigation.php';
// get and initiate the course class to access the functions
require_once 'src/core/controller/messages.php';
$ObjMessages = new messages();
if ($d) {
$messageid = $ObjMessages->uuidToMessageID($d);
// get messages for this user with correct pagination
$messages = $ObjMessages->displayMessage($ObjAkonga->usernametoid($_SESSION['username']), $messageid, 0, 1);
// Remove the message chosen
foreach ($messages as $item) {
$removeMessage = $ObjMessages->delteMessage($ObjMessages->uuidToMessageID($messageid));
if ($removeMessage !== false) {
$responseMsg = "Your message has been deleted";
} else {
$responseMsg = "Your message could not be deleted, please try again.";
}
}
// create the view for messages
$messages = $ObjMessages->displayMessage($ObjAkonga->usernametoid($_SESSION['username']), '', 0, 15);
require_once 'web/core/messages/view.php';
} else {
// Missing message ID so just pull the inbox
$messageid = "";
// get messages for this user with correct pagination
$messages = $ObjMessages->displayMessage($ObjAkonga->usernametoid($_SESSION['username']), $messageid, 0, 15);
示例2: messages
require_once 'src/core/controller/messages.php';
$ObjMessages = new messages();
// check for start and limit values for pagination
if ($e) {
$startval = (int) $e;
if ($f) {
$limitval = (int) $f;
} else {
$limitval = 15;
}
} else {
$startval = 0;
$limitval = 15;
}
if ($d) {
$messageid = $ObjMessages->uuidToMessageID($d);
} else {
$messageid = "";
}
// get messages for this user with correct pagination
$messages = $ObjMessages->displayMessage($ObjAkonga->usernametoid($_SESSION['username']), $messageid, $startval, $limitval);
// Set the message to read if the message has not previously been read
foreach ($messages as $item) {
if ($item['message_state'] == '1') {
$ObjMessages->markAsRead($messageid);
}
}
// create the view for messages
require_once 'web/core/messages/view.php';
} else {
require_once 'web/core/login/index.php';