Ejemplo n.º 1
0
    $depositCount = count($deposit);
}
abr('depositCount', $depositCount);
//联系支持处理
require_once ROOT_PATH . '/apps/contacts/models/contacts.class.php';
$contacts = new contacts();
$contacts = $contacts->getAll(0, 0);
$contactsCount = 0;
if ($contacts) {
    $contactsCount = count($contacts);
}
abr('contactsCount', $contactsCount);
//举报评论处理
require_once ROOT_PATH . '/apps/items/models/comments.class.php';
$commentsClass = new comments();
$comments = $commentsClass->getAll(0, 0, " `report_by` <> '0' ");
$commentCount = 0;
if ($comments) {
    $commentCount = count($comments);
}
abr('commentCount', $commentCount);
//举报评论处理
//已审核作品
$itemCheck = $items->getAll(0, 0, " `status` = 'active' ");
$itemCount = 0;
if ($itemCheck) {
    $itemCount = count($itemCheck);
}
abr('itemCount', $itemCount);
//签约作者数量
require_once ROOT_PATH . '/apps/users/models/users.class.php';
Ejemplo n.º 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'];
    }
    $usersWhere = '`user_id` = ' . implode(' OR `user_id` = ', $usersWhere);
    $users = $usersClass->getAll(0, 0, $usersWhere);
    abr('users', $users);
}
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
Ejemplo n.º 3
0
// +----------------------------------------------------------------------
// | 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';
Ejemplo n.º 4
0
_setTitle($langArray['author_dashboard']);
if (!check_login_bool()) {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'author_dashboard/';
    refresh('/' . $languageURL . 'sign_in/');
}
if ($_SESSION['user']['quiz'] != 'true') {
    refresh('/' . $languageURL . 'make_money/become_an_author/');
}
require_once ROOT_PATH . '/apps/items/models/orders.class.php';
$ordersClass = new orders();
$weekStats = $ordersClass->getWeekStats();
abr('weekStats', $weekStats);
#最新评论
require_once ROOT_PATH . '/apps/items/models/comments.class.php';
$commentsClass = new comments();
$comments = $commentsClass->getAll(0, 100, " `owner_id` = '" . intval($_SESSION['user']['user_id']) . "' AND `reply_to` = '0' ", true, '`datetime` DESC');
if (is_array($comments)) {
    $usersClass = new users();
    $users = $usersClass->getAll(0, 0, $commentsClass->usersWhere);
    abr('users', $users);
}
abr('comments', $comments);
require_once ROOT_PATH . '/apps/items/models/orders.class.php';
$ordersClass = new orders();
if (isset($_POST['ajax'])) {
    $month = get_id(2);
    $year = get_id(3);
    $text = '';
    $sales = $ordersClass->getAll(" `paid_datetime` > '" . date('Y-m-d 23:59:59', mktime(0, 0, 0, $month - 1, date('t', mktime(0, 0, 0, $month - 1, 1, $year)), $year)) . "' AND `paid_datetime` < '" . date('Y-m-d 00:00:00', mktime(0, 0, 0, $month + 1, 1, $year)) . "' AND `paid` = 'true' AND `type` = 'buy' AND `owner_id` = '" . intval($_SESSION['user']['user_id']) . "' ", "`paid_datetime` ASC");
    if (is_array($sales)) {
        $buff = array();
Ejemplo n.º 5
0
        refresh('/' . $languageURL . 'items/comments/' . $itemID, $langArray['complete_add_comment'], 'complete');
    } else {
        addErrorMessage($langArray['error_item_comment'], '', 'error');
    }
} elseif (isset($_POST['add_reply'])) {
    if (!isset($_POST['comment_id'])) {
        $_POST['comment_id'] = 0;
    }
    $s = $commentsClass->add($_POST['comment_id']);
    if ($s === true) {
        refresh('/' . $languageURL . 'items/comments/' . $itemID, $langArray['complete_add_reply'], 'complete');
    } else {
        addErrorMessage($langArray['error_item_comment'], '', 'error');
    }
}
$comments = $commentsClass->getAll(START, LIMIT, " `item_id` = '" . intval($itemID) . "' AND `reply_to` = '0' ", true, '`datetime` ASC');
if (is_array($comments)) {
    $users = $usersClass->getAll(0, 0, $commentsClass->usersQuery);
    abr('users', $users);
    $ordersClass = new orders();
    $buyFromUsers = $ordersClass->isItemBuyed($itemID, $commentsClass->usersQuery);
    abr('buyFromUsers', $buyFromUsers);
}
abr('comments', $comments);
abr('paging', paging('/' . $languageURL . 'items/comments/' . $itemID . '/?p=', '', PAGE, LIMIT, $commentsClass->foundRows));
#标签标记作品
require_once ROOT_PATH . '/apps/items/controllers/bookmark.php';
#是否免费文件
if ($item['free_file'] == 'true') {
    abr('freeFileMessage', langMessageReplace($langArray['free_file_info'], array('URL' => '/' . $languageURL . 'users/downloads/' . $item['id'])));
}