本文整理汇总了PHP中message::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP message::delete方法的具体用法?PHP message::delete怎么用?PHP message::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类message
的用法示例。
在下文中一共展示了message::delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: template
$head_link = 'index.php?moduleid=' . $moduleid . '&action=message';
$back_link = 'javascript:Dback(\'' . $head_link . '\');';
}
include template('message_send', $TP);
}
break;
case 'message_delete':
if (!$_userid) {
wap_msg($L['please_login'], 'index.php?moduleid=' . $moduleid . '&action=login');
}
if ($itemid) {
require DT_ROOT . '/include/post.func.php';
require DT_ROOT . '/module/member/message.class.php';
$do = new message();
$do->itemid = $itemid;
$do->delete();
wap_msg($L['delete_message'], 'index.php?moduleid=' . $moduleid . '&action=message');
} else {
wap_msg($L['not_message']);
}
break;
case 'message':
if (!$_userid) {
wap_msg($L['please_login'], 'index.php?moduleid=' . $moduleid . '&action=login');
}
if ($itemid) {
require DT_ROOT . '/module/member/message.class.php';
$do = new message();
$do->itemid = $itemid;
$message = $do->get_one();
if (!$message) {
示例2: message
}
$touser = $message['touser'];
$title = $message['title'];
$content = $message['content'];
}
break;
case 'clear':
$status or message();
$message = $do->clear($status);
dmsg($L['message_msg_clear'], $forward);
break;
case 'delete':
$itemid or message($L['message_msg_choose']);
$recycle = isset($recycle) ? 0 : 1;
$do->itemid = $itemid;
$message = $do->delete($recycle);
dmsg($L['op_del_success'], $forward);
break;
case 'mark':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
$message = $do->mark();
dmsg($L['message_msg_mark'], $forward);
break;
case 'restore':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
$message = $do->restore();
dmsg($L['message_msg_restore'], $forward);
break;
case 'color':
示例3: message
}
$touser = $message['touser'];
$title = $message['title'];
$content = $message['content'];
}
break;
case 'clear':
$status or message();
$message = $do->clear($status);
dmsg($L['message_msg_clear'], $forward);
break;
case 'delete':
$itemid or message($L['message_msg_choose']);
$recycle = isset($recycle) ? 0 : 1;
$do->itemid = $itemid;
$do->delete($recycle);
dmsg($L['op_del_success'], $forward);
break;
case 'mark':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
$do->mark();
dmsg($L['message_msg_mark'], $forward);
break;
case 'markall':
$message = $do->markall();
dmsg($L['message_msg_mark'], $forward);
break;
case 'restore':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
示例4: delete
public function delete()
{
global $DB, $USER;
$cm = $this->dialogue->cm;
$course = $this->dialogue->course;
$context = $this->dialogue->context;
// hasn't been saved yet
if (is_null($this->_conversationid)) {
return true;
}
// permission to delete conversation
$candelete = (has_capability('mod/dialogue:delete', $context) and $USER->id == $this->_authorid or has_capability('mod/dialogue:deleteany', $context));
if (!$candelete) {
throw new \moodle_exception('nopermissiontodelete', 'dialogue');
}
// delete flags
$DB->delete_records('dialogue_flags', array('conversationid' => $this->_conversationid));
// delete bulk open rules
$DB->delete_records('dialogue_bulk_opener_rules', array('conversationid' => $this->_conversationid));
// delete participants
$DB->delete_records('dialogue_participants', array('conversationid' => $this->_conversationid));
// delete replies
foreach ($this->replies() as $reply) {
// delete reply
$reply->delete();
}
// delete conversation
$DB->delete_records('dialogue_conversations', array('id' => $this->_conversationid));
parent::delete();
}