当前位置: 首页>>代码示例>>PHP>>正文


PHP message::edit方法代码示例

本文整理汇总了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')));
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:13,代码来源:deal.php

示例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':
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:message.inc.php

示例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");
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:managemessage.php

示例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
开发者ID:janvalentik,项目名称:Collabtive,代码行数:31,代码来源:managemessage.php


注:本文中的message::edit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。