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


PHP comment::edit方法代码示例

本文整理汇总了PHP中comment::edit方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::edit方法的具体用法?PHP comment::edit怎么用?PHP comment::edit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在comment的用法示例。


在下文中一共展示了comment::edit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reply_comment

function reply_comment()
{
    global $smarty, $lang;
    $com_id = post('com_id');
    $com_reply = post('com_reply');
    $obj = new comment();
    $obj->set_value('com_reply', $com_reply);
    $obj->set_where("com_id = {$com_id}");
    $obj->edit();
    $smarty->assign('info_text', '回复评论成功');
    $smarty->assign('link_text', $lang['return_list']);
    $smarty->assign('link_href', url(array('channel' => 'service', 'mod' => 'comment_sheet')));
}
开发者ID:jechiy,项目名称:xiu-cms,代码行数:13,代码来源:deal.php

示例2: msg

        $condition .= " AND item_mid='{$mid}'";
    }
    if ($ip) {
        $condition .= " AND ip='{$ip}'";
    }
    if ($star) {
        $condition .= " AND star='{$star}'";
    }
}
switch ($action) {
    case 'edit':
        $itemid or msg();
        $do->itemid = $itemid;
        if ($submit) {
            if ($do->pass($post)) {
                $do->edit($post);
                dmsg('修改成功', $forward);
            } else {
                msg($do->errmsg);
            }
        } else {
            extract($do->get_one());
            $addtime = timetodate($addtime);
            $replytime = $replytime ? timetodate($replytime, 6) : '';
            include tpl('comment_edit', $module);
        }
        break;
    case 'ban':
        if ($submit) {
            $do->ban_update($post);
            dmsg('更新成功', '?moduleid=' . $moduleid . '&file=' . $file . '&action=ban&page=' . $page);
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:comment.inc.php

示例3: header

    $row = $result->fetch_assoc();
    $user_id = $row['id'];
    $anon_id = $row['id'];
}
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
    $id = $db->real_escape_string($_GET['id']);
    if (isset($_GET['s']) && $_GET['s'] == "edit" && isset($_POST['comment'])) {
        if ($_POST['conf'] != 1) {
            header("Location:index.php?page=post&s=view&id={$id}");
            exit;
        }
        if ($user == "Anonymous") {
            header("Location:index.php?page=post&s=view&id={$id}");
            exit;
        }
        $comment->edit($id, $_POST['comment'], $user);
        $cache = new cache();
        $cache->destroy_page_cache("cache/" . $id);
        $cache->create_page_cache("cache/" . $id);
        header("Location:index.php?page=post&s=view&id={$id}");
    }
    if (isset($_GET['s']) && $_GET['s'] == "save" && isset($_POST['comment'])) {
        if ($_POST['conf'] != 1) {
            header("Location:index.php?page=post&s=view&id={$id}");
            exit;
        }
        if (!$anon_comment && $user_nolog == "Anonymous") {
            header('Location: index.php?page=account&s=home');
            exit;
        }
        if (isset($_POST['post_anonymous']) || $_POST['post_anonymous'] == true) {
开发者ID:logtcn,项目名称:gelbooru-fork,代码行数:31,代码来源:comment.php

示例4: comment

    require 'subclasses/comment.php';
    $dbh_comment = new comment();
    $object_name = 'dbh_comment';
    require 'components/create_form_data.php';
    extract($arr_form_data);
    if ($_POST['btn_cancel']) {
        log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
        redirect("listview_comment.php?{$query_string}");
    }
    if ($_POST['btn_submit']) {
        log_action('Pressed submit button', $_SERVER['PHP_SELF']);
        $message .= $dbh_comment->sanitize($arr_form_data)->lst_error;
        extract($arr_form_data);
        if ($dbh_comment->check_uniqueness_for_editing($arr_form_data)->is_unique) {
            //Good, no duplicate in database
        } else {
            $message = "Record already exists with the same primary identifiers!";
        }
        if ($message == "") {
            $dbh_comment->edit($arr_form_data);
            redirect("listview_comment.php?{$query_string}");
        }
    }
}
require 'subclasses/comment_html.php';
$html = new comment_html();
$html->draw_header('Edit Comment', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_hidden('id');
$html->draw_controls('edit');
$html->draw_footer();
开发者ID:seans888,项目名称:APC-CPO,代码行数:31,代码来源:edit_comment.php


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