本文整理汇总了PHP中MessageManager::return_message方法的典型用法代码示例。如果您正苦于以下问题:PHP MessageManager::return_message方法的具体用法?PHP MessageManager::return_message怎么用?PHP MessageManager::return_message使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageManager
的用法示例。
在下文中一共展示了MessageManager::return_message方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
$content = str_replace("\\", "", urldecode($info_reply[1]));
$user_reply = $info_reply[2];
$user_email_base = str_replace(')', '(', $info_reply[5]);
$user_email_prepare = explode('(', $user_email_base);
if (count($user_email_prepare) == 1) {
$user_email = trim($user_email_prepare[0]);
} elseif (count($user_email_prepare) == 3) {
$user_email = trim($user_email_prepare[1]);
}
$user_id_by_email = MessageManager::get_user_id_by_email($user_email);
if ($info_reply[6] == 'save_form') {
$user_id_by_email = $info_reply[2];
}
if (isset($user_reply) && !is_null($user_id_by_email) && strlen($info_reply[0]) > 0) {
MessageManager::send_message($user_id_by_email, $title, $content);
Display::addFlash(MessageManager::return_message($user_id_by_email, 'confirmation'));
$social_right_content .= MessageManager::inbox_display();
exit;
} elseif (is_null($user_id_by_email)) {
$message_box = get_lang('ErrorSendingMessage');
Display::return_message(api_xml_http_response_encode($message_box), 'error');
$social_right_content .= MessageManager::inbox_display();
exit;
}
} elseif (trim($info_delete[0]) == 'delete') {
for ($i = 1; $i <= $count_delete; $i++) {
MessageManager::delete_message_by_user_receiver(api_get_user_id(), $info_delete[$i]);
}
$message_box = get_lang('SelectedMessagesDeleted');
Display::return_message(api_xml_http_response_encode($message_box));
$social_right_content .= MessageManager::inbox_display();
示例2: str_replace
$content = str_replace("\\", "", urldecode($info_reply[1]));
$user_reply = $info_reply[2];
$user_email_base = str_replace(')', '(', $info_reply[5]);
$user_email_prepare = explode('(', $user_email_base);
if (count($user_email_prepare) == 1) {
$user_email = trim($user_email_prepare[0]);
} elseif (count($user_email_prepare) == 3) {
$user_email = trim($user_email_prepare[1]);
}
$user_id_by_email = MessageManager::get_user_id_by_email($user_email);
if ($info_reply[6] == 'save_form') {
$user_id_by_email = $info_reply[2];
}
if (isset($user_reply) && !is_null($user_id_by_email) && strlen($info_reply[0]) > 0) {
MessageManager::send_message($user_id_by_email, $title, $content);
$show_message .= MessageManager::return_message($user_id_by_email, 'confirmation');
$social_right_content .= MessageManager::inbox_display();
exit;
} elseif (is_null($user_id_by_email)) {
$message_box = get_lang('ErrorSendingMessage');
$show_message .= Display::return_message(api_xml_http_response_encode($message_box), 'error');
$social_right_content .= MessageManager::inbox_display();
exit;
}
} elseif (trim($info_delete[0]) == 'delete') {
for ($i = 1; $i <= $count_delete; $i++) {
MessageManager::delete_message_by_user_receiver(api_get_user_id(), $info_delete[$i]);
}
$message_box = get_lang('SelectedMessagesDeleted');
$show_message .= Display::return_message(api_xml_http_response_encode($message_box));
$social_right_content .= MessageManager::inbox_display();