本文整理匯總了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';