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


PHP comments::reported方法代码示例

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


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

示例1: comments

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['report_comments']);
require_once ROOT_PATH . '/apps/items/models/comments.class.php';
$commentsClass = new comments();
#检查评论
if (isset($_GET['check']) && is_numeric($_GET['check'])) {
    $commentsClass->reported($_GET['check']);
    refresh('?m=' . $_GET['m'] . '&c=comments');
}
if (isset($_GET['item']) && is_numeric($_GET['item'])) {
    $url = 'http://' . $_SERVER["SERVER_NAME"] . '' . '/items/comments/' . $_GET['item'];
    header("Location: {$url}");
}
$data = $commentsClass->getAll(START, LIMIT, " `report_by` <> '0' ");
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=comments&p=", "", PAGE, LIMIT, $commentsClass->foundRows);
abr('paging', $p);
if (is_array($data)) {
    $usersClass = new users();
    $usersWhere = '';
    foreach ($data as $d) {
        $usersWhere[$d['report_by']] = $d['report_by'];
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:comments.php

示例2: refresh

// +----------------------------------------------------------------------
// | Demila [ Beautiful Digital Content Trading System ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
    refresh('?m=' . $_GET['m'] . '&c=list', 'WRONG ID', 'error');
}
$cms = new comments();
if (isset($_GET['report']) && is_numeric($_GET['report'])) {
    $cms->reported($_GET['report']);
}
$data = $cms->getAll(START, LIMIT, " `item_id` = '" . $_GET['id'] . "' ");
if (is_array($data)) {
    require_once ROOT_PATH . '/apps/users/models/users.class.php';
    $usersClass = new users();
    $users = $usersClass->getAll(0, 0, $cms->usersWhere);
    abr('users', $users);
}
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=comments&id=" . $_GET['id'] . "&p=", "", PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
$itemsClass = new items();
$item = $itemsClass->get($_GET['id']);
_setTitle($item['name'] . ' &rsaquo; ' . $langArray['comments']);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:comments.php


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