本文整理汇总了PHP中common_node::getAuthorStats方法的典型用法代码示例。如果您正苦于以下问题:PHP common_node::getAuthorStats方法的具体用法?PHP common_node::getAuthorStats怎么用?PHP common_node::getAuthorStats使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common_node
的用法示例。
在下文中一共展示了common_node::getAuthorStats方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: mainAction
/**
* main action
*/
public function mainAction()
{
/**
* input
*/
if (is_numeric($_POST['customer_id'])) {
$customer_id = $_POST['customer_id'];
} else {
$customer_id = 0;
}
/**
* bo users list
*/
require_once 'models/client/client_customer.php';
$Customer = new client_customer();
$bo_users_list = $Customer->getCustomersWithRole();
foreach ($bo_users_list as $customer) {
$this->tpl->assign('CUSTOMER', $customer);
if ($customer['id'] == $customer_id) {
$this->tpl->assign('SELECTED', 'selected="selected"');
} else {
$this->tpl->assign('SELECTED', '');
}
$this->tpl->parse('content.item');
}
/**
* stats
*/
$author_stats = array();
/**
* common_node
*/
require_once 'models/common/common_node.php';
$Node = new common_node();
$author_stats['common_node'] = $Node->getAuthorStats($customer_id);
/**
* common_image
*/
require_once 'models/common/common_image.php';
$Image = new common_image();
$author_stats['common_image'] = $Image->getAuthorStats($customer_id);
/**
* common_revision
*/
require_once 'models/common/common_revision.php';
$Revision = new common_revision();
$author_stats['common_revision'] = $Revision->getAuthorStats($customer_id);
/**
* assign
*/
$this->tpl->assign('AUTHOR_STATS', $author_stats);
return true;
}