本文整理汇总了PHP中message::edit方法的典型用法代码示例。如果您正苦于以下问题:PHP message::edit方法的具体用法?PHP message::edit怎么用?PHP message::edit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类message
的用法示例。
在下文中一共展示了message::edit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reply_mes
function reply_mes()
{
global $smarty, $lang;
$mes_id = post('mes_id');
$mes_reply = post('mes_reply');
$obj = new message();
$obj->set_value('mes_reply', $mes_reply);
$obj->set_where("mes_id = {$mes_id}");
$obj->edit();
$smarty->assign('info_text', '回复留言成功');
$smarty->assign('link_text', $lang['return_list']);
$smarty->assign('link_href', url(array('channel' => 'service', 'mod' => 'message_sheet')));
}
示例2: dmsg
dmsg(isset($message['save']) ? $L['message_msg_save_draft'] : $L['message_msg_send'], $forward);
} else {
message($do->errmsg);
}
} else {
$touser = isset($touser) ? trim($touser) : '';
$title = isset($title) ? stripslashes($title) : '';
$content = isset($content) ? stripslashes($content) : '';
}
break;
case 'edit':
$itemid or message($L['message_msg_choose']);
$do->itemid = $itemid;
if ($submit) {
clear_upload($message['content']);
if ($do->edit($message)) {
dmsg(isset($message['send']) ? $L['message_msg_send'] : $L['message_msg_edit_draft'], '?action=draft');
} else {
message($do->errmsg);
}
} else {
$message = $do->get_one();
if (!$message || $message['status'] != 1 || $message['fromuser'] != $_username) {
message($L['message_msg_deny']);
}
$touser = $message['touser'];
$title = $message['title'];
$content = $message['content'];
}
break;
case 'clear':
示例3: elseif
$template->assign("async", "yes");
// get the message to edit
$message = $msg->getMessage($mid);
$template->assign("message", $message);
$template->display("editmessageform.tpl");
} elseif ($action == "edit") {
// check if the user is allowed to edit messages
if (!$userpermissions["messages"]["edit"]) {
$errtxt = $langfile["nopermission"];
$noperm = $langfile["accessdenied"];
$template->assign("errortext", "<h2>{$errtxt}</h2><br>{$noperm}");
$template->display("error.tpl");
die;
}
// edit the msg
if ($msg->edit($mid_post, $title, $text)) {
if ($redir) {
$redir = $url . $redir;
header("Location: {$redir}");
} else {
$loc = $url . "managemessage.php?action=showproject&id={$id}&mode=edited";
header("Location: {$loc}");
}
}
} elseif ($action == "del") {
// check if the user is allowed to delete messages
if (!$userpermissions["messages"]["del"]) {
$errtxt = $langfile["nopermission"];
$noperm = $langfile["accessdenied"];
$template->assign("errortext", "<h2>{$errtxt}</h2><br>{$noperm}");
$template->display("error.tpl");
示例4: elseif
} elseif ($action == "edit")
{
// check if the user is allowed to edit messages
if (!$userpermissions["messages"]["edit"])
{
$errtxt = $langfile["nopermission"];
$noperm = $langfile["accessdenied"];
$template->assign("errortext", "<h2>$errtxt</h2><br>$noperm");
$template->display("error.tpl");
die();
}
$tagobj = new tags();
$tags = $tagobj->formatInputTags($tags);
// edit the msg
if ($msg->edit($mid_post, $title, $text, $tags))
{
if ($redir)
{
$redir = $url . $redir;
header("Location: $redir");
}
else
{
$loc = $url . "managemessage.php?action=showproject&id=$id&mode=edited";
header("Location: $loc");
}
}
} elseif ($action == "del")
{
// check if the user is allowed to delete messages