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


PHP users::getAll方法代码示例

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


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

示例1: run

 /**
  * run - display template and edit data
  *
  * @access public
  *
  */
 public function run()
 {
     $tpl = new template();
     $msgKey = '';
     $values = array('name' => '', 'details' => '', 'clientId' => '', 'hourBudget' => '', 'assignedUsers' => array(), 'dollarBudget' => '');
     if (isset($_POST['save']) === true) {
         if (!isset($_POST['hourBudget']) || $_POST['hourBudget'] == '' || $_POST['hourBudget'] == NULL) {
             $hourBudget = '0';
         } else {
             $hourBudget = $_POST['hourBudget'];
         }
         if (isset($_POST['editorId']) && count($_POST['editorId'])) {
             $assignedUsers = $_POST['editorId'];
         } else {
             $assignedUsers = array();
         }
         $values = array('name' => $_POST['name'], 'details' => $_POST['details'], 'clientId' => $_POST['clientId'], 'hourBudget' => $hourBudget, 'assignedUsers' => $assignedUsers, 'dollarBudget' => $_POST['dollarBudget']);
         if ($values['name'] === '') {
             $msgKey = 'NO_PROJECTNAME';
         } elseif ($values['clientId'] === '') {
             $msgKey = 'ERROR_NO_CLIENT';
         } else {
             $this->addProject($values);
             //Take the old value to avoid nl character
             $values['details'] = $_POST['details'];
             $msgKey = 'PROJECT_ADDED';
         }
         $tpl->assign('values', $values);
     }
     $tpl->assign('values', $values);
     $user = new users();
     $tpl->assign('availableUsers', $user->getAll());
     $clients = new clients();
     $tpl->assign('info', $msgKey);
     $tpl->assign('clients', $clients->getAll());
     $tpl->display('projects.newProject');
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:43,代码来源:class.newProject.php

示例2: deposit

<?php

// +----------------------------------------------------------------------
// | 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['withdraws']);
$cms = new deposit();
$data = $cms->getWithdraws(START, LIMIT);
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=withdraws&p=", "", PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
开发者ID:yunsite,项目名称:demila,代码行数:25,代码来源:withdraws.php

示例3: users

    $_GET['sort_by'] = '';
}
switch ($_GET['sort_by']) {
    case 'name':
        $order = '`name`';
        break;
    case 'average_rating':
        $order = '`rating`';
        break;
    default:
        $order = '`datetime`';
        break;
}
if (!isset($_GET['order']) || $_GET['order'] == '' || $_GET['order'] == 'desc') {
    $_GET['order'] = 'desc';
    $order .= ' DESC';
} else {
    $_GET['order'] = 'asc';
    $order .= ' ASC';
}
$collections = $collectionsClass->getAll(START, LIMIT, " `public` = 'true' ", false, $order);
if (is_array($collections)) {
    require_once ROOT_PATH . '/apps/users/models/users.class.php';
    $usersClass = new users();
    $users = $usersClass->getAll(0, 0, $collectionsClass->usersWhere);
    abr('users', $users);
}
abr('collections', $collections);
abr('paging', paging('/' . $languageURL . 'collections/?p=', '&sort_by=' . $_GET['sort_by'] . '&order=' . $_GET['order'], PAGE, $limit, $collectionsClass->foundRows));
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'collections/" title="">' . $langArray['public_collections'] . '</a>');
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:index.php

示例4: users

// | 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__);
$text = '';
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
$limit = 9;
$start = (PAGE - 1) * $limit;
//$text .= '<ul class="thumb_list w276 left">';
$topAuthors = $usersClass->getAll($start, $limit, " `status` = 'activate' ", "`sales` DESC");
if (is_array($topAuthors)) {
    foreach ($topAuthors as $a) {
        $text .= '<a href="/' . $languageURL . 'users/' . $a['username'] . '" class="user" title="' . htmlspecialchars($a['username']) . '">';
        if ($a['avatar'] != '') {
            $text .= '<img src="' . DATA_SERVER . '/uploads/users/' . $a['user_id'] . '/A_' . $a['avatar'] . '" width="80"  height="80" border="0" alt="" title="" />';
        } else {
            $text .= '<img src="' . DATA_SERVER . '/images/common/default-user.jpg" width="80"  height="80" border="0" alt="" title="" />';
        }
        $text .= '</a>';
    }
    $emptyThumb = 9 - $usersClass->foundRows;
    for ($i = 0; $i < $emptyThumb; $i++) {
        //	$text .= '<li></li>';
    }
    //$text .= '</ul>';
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:topauthors.php

示例5: users

<?php

// +----------------------------------------------------------------------
// | 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__);
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
$users = $usersClass->getAll(0, 0, $itemsClass->usersWhere);
abr('users', $users);
$itemsClass = new items();
$limit = 4;
$start = (PAGE - 1) * $limit;
$text = '';
$items = $itemsClass->getAll($start, $limit, " `status` = 'active' AND `weekly_to` >= '" . date('Y-m-d') . "' ", "`datetime` DESC");
$categories = $categoriesClass->getAll();
if (PAGE > 1) {
    $text .= '<a href="javascript: void(0);" onclick="$.ajax({complete: function(request) { screenshotPreview(); hideLoading(); }, beforeSend: function() { showLoading(); }, dataType: &quot;script&quot;, type: &quot;post&quot;, url: &quot;/' . $languageURL . 'items/weekly/?p=' . (PAGE - 1) . '&quot;}); return false;" title="" class="slider-control slider-prev"></a>';
} else {
    $text .= '<span class="slider-control slider-prev-disabled"></span>';
}
$backslash = chr();
if (is_array($items)) {
    $text .= '<ul id="weekly-featured-items">';
    foreach ($items as $i) {
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:weekly.php

示例6: run

 /**
  * run - display template and edit data
  *
  * @access public
  *
  */
 public function run()
 {
     $tpl = new template();
     //Only admins
     if ($_SESSION['userdata']['role'] == 'admin') {
         if (isset($_GET['id']) === true) {
             $id = (int) $_GET['id'];
             $row = $this->getProject($id);
             $msgKey = '';
             $values = array('name' => $row['name'], 'details' => $row['details'], 'clientId' => $row['clientId'], 'state' => $row['state'], 'hourBudget' => $row['hourBudget'], 'assignedUsers' => $this->getProjectUserRelation($id), 'dollarBudget' => $row['dollarBudget']);
             //Edit project
             if (isset($_POST['save']) === true) {
                 if (isset($_POST['editorId']) && count($_POST['editorId'])) {
                     $assignedUsers = $_POST['editorId'];
                 } else {
                     $assignedUsers = array();
                 }
                 $values = array('name' => $_POST['name'], 'details' => $_POST['details'], 'clientId' => $_POST['clientId'], 'state' => $_POST['projectState'], 'hourBudget' => $_POST['hourBudget'], 'assignedUsers' => $assignedUsers, 'dollarBudget' => $_POST['dollarBudget']);
                 if ($values['name'] !== '') {
                     if ($this->hasTickets($id) && $values['state'] == 1) {
                         $tpl->setNotification('PROJECT_HAS_TICKETS', 'error');
                     } else {
                         $this->editProject($values, $id);
                         //Take the old value to avoid nl character
                         $values['details'] = $_POST['details'];
                         $tpl->setNotification('PROJECT_EDITED', 'success');
                     }
                 } else {
                     $tpl->setNotification('NO_PROJECTTNAME', 'error');
                 }
             }
             //Add Account
             if (isset($_POST['accountSubmit']) === true) {
                 $accountValues = array('name' => $_POST['accountName'], 'kind' => $_POST['kind'], 'username' => $_POST['username'], 'password' => $_POST['password'], 'host' => $_POST['host'], 'projectId' => $id);
                 if ($accountValues['name'] !== '') {
                     $this->addProjectAccount($accountValues);
                     $tpl->setNotification('ACCOUNT_ADDED', 'sucess');
                 } else {
                     $tpl->setNotification('NO_ACCOUNT_NAME', 'error');
                 }
                 $tpl->assign('accountValues', $accountValues);
             }
             //Upload file
             if (isset($_POST['upload']) === true) {
                 if ($_FILES['file']['name'] !== '') {
                     $upload = new fileupload();
                     $upload->initFile($_FILES['file']);
                     if ($upload->error == '') {
                         //Name on Server is encoded
                         $newname = md5($id . time());
                         $upload->renameFile($newname);
                         if ($upload->upload() === true) {
                             $fileValues = array('encName' => $upload->file_name, 'realName' => $upload->real_name, 'date' => date("Y-m-d H:i:s"), 'ticketId' => $id, 'userId' => $_SESSION['userdata']['id']);
                             $this->addFile($fileValues);
                             $tpl->setNotification('FILE_UPLOADED', 'success');
                         } else {
                             $tpl->setNotification('ERROR_FILEUPLOAD', 'error');
                         }
                     } else {
                         $tpl->setNotification('ERROR_FILEUPLOAD', 'error');
                     }
                 } else {
                     $tpl->setNotification('NO_FILE', 'error');
                 }
             }
             $helper = new helper();
             $clients = new clients();
             $user = new users();
             $tpl->assign('availableUsers', $user->getAll());
             //Assign vars
             $tpl->assign('info', $msgKey);
             $tpl->assign('clients', $clients->getAll());
             $tpl->assign('values', $values);
             $tpl->assign('files', $this->getFiles($id));
             $tpl->assign('helper', $helper);
             $tpl->assign('accounts', $this->getProjectAccounts($id));
             $tpl->display('projects.editProject');
         } else {
             $tpl->display('general.error');
         }
     } else {
         $tpl->display('general.error');
     }
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:90,代码来源:class.editProject.php

示例7: abr

    default:
        $orderQuery = "`datetime`";
}
switch ($_GET['dir']) {
    case 'desc':
        $orderQuery .= " DESC";
        abr('orderDir', 'asc');
        break;
    default:
        $orderQuery .= " ASC";
        abr('orderDir', 'desc');
}
if (isset($_POST['user'])) {
    $_GET['user'] = $_POST['user'];
}
if (!isset($_GET['user'])) {
    $_GET['user'] = '';
}
if (is_numeric($_GET['user'])) {
    $whereQuery .= " AND `user_id` = '" . intval($_GET['user']) . "' ";
}
$data = $cms->getAll(START, LIMIT, " `status` = 'active' " . $whereQuery, $orderQuery);
abr('data', $data);
$p = paging("?m=" . $_GET['m'] . "&c=list&p=", "&q=" . $_GET['q'] . "&order=" . $_GET['order'] . "&dir=" . $_GET['dir'] . "&user=" . $_GET['user'], PAGE, LIMIT, $cms->foundRows);
abr('paging', $p);
#加载用户
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
$users = $usersClass->getAll(0, 0, '', '`username` ASC');
abr('users', $users);
require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:list.php

示例8: users

// +----------------------------------------------------------------------
// | 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['featured_files']);
abr('checkItemsType', 'yes');
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
#推荐作品
$sixMonthsAgo = date('Y-m-d', mktime(0, 0, 0, date('m') - 6, date('d'), date('Y')));
$items = $itemsClass->getAll(0, 0, " `status` = 'active' AND `weekly_to` >= '" . date('Y-m-d') . "' AND `weekly_to` >= '" . $sixMonthsAgo . "' ", "`datetime` DESC");
if (is_array($items)) {
    abr('topItem', array_shift($items));
    $users = $usersClass->getAll(0, 0, $itemsClass->usersWhere);
    abr('users', $users);
}
abr('items', $items);
#加载分类
require_once ROOT_PATH . '/apps/categories/models/categories.class.php';
$categoriesClass = new categories();
$categories = $categoriesClass->getAll();
abr('categories', $categories);
#推荐作者
$featuredAuthors = $usersClass->getAll(0, 0, " `status` = 'activate' AND `featured_author` = 'true' ");
abr('featuredAuthors', $featuredAuthors);
#面包屑
abr('breadcrumb', '<a href="/' . $languageURL . '" title="">' . $langArray['home'] . '</a> \\ <a href="/' . $languageURL . 'items/feature/" title="">' . $langArray['featured_files'] . '</a>');
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:feature.php

示例9: abr

    case 'referal_money':
        $orderQuery = "`referal_money`";
        break;
    default:
        $orderQuery = "`username`";
}
switch ($_GET['dir']) {
    case 'desc':
        $orderQuery .= " DESC";
        abr('orderDir', 'asc');
        break;
    default:
        $orderQuery .= " ASC";
        abr('orderDir', 'desc');
}
$data = $cms->getAll(START, LIMIT, $whereQuery, $orderQuery);
if (is_array($data)) {
    #加载佣金分成
    require_once ROOT_PATH . '/apps/percents/models/percents.class.php';
    $percentsClass = new percents();
    #加载余额
    require_once ROOT_PATH . '/apps/users/models/balance.class.php';
    $balanceClass = new balance();
    $percents = $percentsClass->getAll();
    foreach ($data as $k => $d) {
        $comision = $percentsClass->getPercentRow($d);
        $data[$k]['commission'] = $comision['percent'];
        //			if($data[$k]['commission_percent'] < 1) {
        //				foreach($percents as $p) {
        //					if($d['sold'] >= $p['from'] && ($d['sold'] < $p['to'] || $p['to'] == '0')) {
        //						$data[$k]['commission'] = $p['percent'];
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:list.php

示例10: count

$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';
$users = new users();
$usersCount = $users->getAll(0, 0, " `exclusive_author` = 'true' ");
$qyuserCount = 0;
if ($usersCount) {
    $qyuserCount = count($usersCount);
}
abr('qyuserCount', $qyuserCount);
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:leftlist_admin.php

示例11: refresh

    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();
        foreach ($sales as $s) {
            $day = explode(' ', $s['paid_datetime']);
            $day = explode('-', $day[0]);
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:dashboard.php

示例12: switch

     }
     switch ($_GET['sort_by']) {
         case 'name':
             $order = '`username`';
             break;
         case 'average_rating':
             $order = '`rating`';
             break;
         case 'sales_count':
             $order = '`sales`';
             break;
         default:
             $order = '`register_datetime`';
             break;
     }
     $users = $usersClass->getAll($start, $limit, " `status` = 'activate' AND (`username` = '" . sql_quote($s) . "' OR `profile_desc` LIKE '%" . sql_quote($s) . "%') ", "{$order} ASC");
     abr('results', $users);
     abr('paging', paging('/' . $languageURL . 'search/?type=users&term=' . $s . '&p=', '&sort_by=' . $_GET['sort_by'], PAGE, $limit, $usersClass->foundRows));
     break;
     #在用户中结束搜索
 #在用户中结束搜索
 case 'collections':
     abr('type', 'collections');
     require_once ROOT_PATH . '/apps/collections/models/collections.class.php';
     $collectionsClass = new collections();
     if (!isset($_GET['sort_by'])) {
         $_GET['sort_by'] = '';
     } else {
         $_GET['sort_by'] = htmlspecialchars($_GET['sort_by']);
     }
     switch ($_GET['sort_by']) {
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:index.php

示例13: categories

require_once ROOT_PATH . '/apps/categories/models/categories.class.php';
$categoriesClass = new categories();
$categories = $categoriesClass->getAll();
abr('categories', $categories);
#近期作品
$recentItems = $itemsClass->getAll(0, 40, " `status` = 'active' ", '`datetime` DESC');
kshuffle($recentItems);
abr('recentItems', $recentItems);
//免费作品
$freeItem = $itemsClass->getAll(0, 0, " `status` = 'active' AND `free_file` = 'true' ");
abr('freeItem', $freeItem);
#推荐作者
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
//获取用户信息及粉丝
$featuredAuthor = $usersClass->getAll(0, 0, " `status` = 'activate' AND `featured_author` = 'true' ", 'RAND()');
// if(is_array($featuredAuthor)) {
// 	//作者的一些作品
// 	$featuredItems = array();
//      foreach($featuredAuthor as $itear){
// 	    $featuredItems[$itear['user_id']] = $itemsClass->getAll(0, 2, " `status` = 'active' AND `user_id` = '".intval($itear['user_id'])."' ");
// 	}
// 	abr('featuredItems', $featuredItems);
// 	abr('featuredAuthorInfo', langMessageReplace($langArray['featured_author_info'], array(
// 															'USERNAME' => $featuredAuthor['username'],
// 															'MONTH' => $langArray['monthArr'][date('n', strtotime($featuredAuthor['register_datetime']))],
// 															'YEAR' => date('Y', strtotime($featuredAuthor['register_datetime'])),
// 															'ITEMS' => $featuredAuthor['items'],
// 															'SALES' => $featuredAuthor['sales']
// 														)));
// }
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:index.php

示例14: date

abr('total', $total);
$ref = $ordersClass->getSalesStatus(" AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ", 'referal');
$sales = $ordersClass->getSalesStatus(" AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ");
if (is_array($sales)) {
    $sales['referal'] = $ref['receive'];
    $sales['win'] = floatval($sales['total']) - floatval($sales['receive']) - floatval($sales['referal']);
    abr('sales', $sales);
}
unset($ref);
#LOAD USERS COUNT
require_once ROOT_PATH . '/apps/users/models/users.class.php';
$usersClass = new users();
//	$users['month'] = $usersClass->getUsersCount(" `register_datetime` > '".date('Y-m')."-01 00:00:00' AND `status` = 'activate' ");
//	$users['total'] = $usersClass->getUsersCount(" `status` = 'activate' ");
abr('users', $users);
$topAuthors = $usersClass->getAll(0, 5, " `status` = 'activate' ", "`sales` DESC");
abr('topAuthors', $topAuthors);
#LOAD WITHDRAW
require_once ROOT_PATH . '/apps/users/models/deposit.class.php';
$depositClass = new deposit();
$withdraw['no'] = $depositClass->getWithdrawCount(" `paid` = 'false' AND `datetime` > '" . date('Y-m') . "-01 00:00:00' ");
$withdraw['paid'] = $depositClass->getWithdrawCount(" `paid` = 'true' AND `paid_datetime` > '" . date('Y-m') . "-01 00:00:00' ");
abr('withdraw', $withdraw);
#LOAD THEMES
require_once ROOT_PATH . '/apps/items/models/items.class.php';
$itemsClass = new items();
$items = $itemsClass->getAll(0, 10, " `status` = 'queue' ");
abr('items', $items);
$updated_items = $itemsClass->getAllForUpdate(0, 10);
abr('updated_items', $updated_items);
#LOAD LAST REQUEST
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:console.php

示例15: addErrorMessage

        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'])));
}
#加载其它作品
$otherItems = $itemsClass->getAll(0, 7, " `status` = 'active' AND `id` <> '" . intval($itemID) . "' ", "RAND()");
开发者ID:yunsite,项目名称:demila,代码行数:31,代码来源:comments.php


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