當前位置: 首頁>>代碼示例>>PHP>>正文


PHP comment::set_where方法代碼示例

本文整理匯總了PHP中comment::set_where方法的典型用法代碼示例。如果您正苦於以下問題:PHP comment::set_where方法的具體用法?PHP comment::set_where怎麽用?PHP comment::set_where使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在comment的用法示例。


在下文中一共展示了comment::set_where方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: module_comment

function module_comment()
{
    global $global, $smarty;
    if ($global['id']) {
        $obj = new comment();
        $obj->set_where('com_channel_id = ' . get_id('channel', 'cha_code', $global['channel']));
        $obj->set_where('com_page_id = ' . $global['id']);
        $obj->set_page_size(5);
        $obj->set_page_num($global['page']);
        $sheet = $obj->get_sheet();
        set_link($obj->get_page_sum());
        $smarty->assign('comment', $sheet);
    }
}
開發者ID:jechiy,項目名稱:xiu-cms,代碼行數:14,代碼來源:comment.php

示例2: module_comment_edit

function module_comment_edit()
{
    global $global, $smarty;
    $obj = new comment();
    $obj->set_where('com_id = ' . $global['id']);
    $one = $obj->get_one();
    $one['channel'] = '';
    $one['title'] = '';
    $obj = new channel();
    $list = $obj->get_list();
    for ($i = 0; $i < count($list); $i++) {
        if ($list[$i]['cha_id'] == $one['com_channel_id']) {
            $one['channel'] = $list[$i]['cha_code'];
            $original = $list[$i]['cha_code'];
            if ($list[$i]['cha_original'] != 0) {
                for ($j = 0; $j < count($list); $j++) {
                    if ($list[$i]['cha_original'] == $list[$j]['cha_id']) {
                        $original = $list[$j]['cha_code'];
                    }
                }
            }
            if ($original == 'goods') {
                $table = 'goods';
            } else {
                $table = 'article';
            }
            $one['title'] = get_data($table, $one['com_page_id'], substr($table, 0, 3) . '_title');
        }
    }
    $smarty->assign('comment', $one);
}
開發者ID:jechiy,項目名稱:xiu-cms,代碼行數:31,代碼來源:comment_edit.php

示例3: 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

示例4: comment

<?php

require 'components/get_listview_referrer.php';
require 'subclasses/comment.php';
$dbh_comment = new comment();
$dbh_comment->set_where("id='" . quote_smart($id) . "'");
if ($result = $dbh_comment->make_query()->result) {
    $data = $result->fetch_assoc();
    extract($data);
    $data = explode('-', $date);
    if (count($data) == 3) {
        $date_year = $data[0];
        $date_month = $data[1];
        $date_day = $data[2];
    }
}
開發者ID:seans888,項目名稱:APC-CPO,代碼行數:16,代碼來源:form_data_comment.php


注:本文中的comment::set_where方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。