private function posModule() { $module = D('Common/Module')->getAll(1); $advPosModel = D('AdvPos'); foreach ($module as $key => &$v) { $v['count'] = $advPosModel->where(array('status' => 1, 'path' => array('like', ucfirst($v['name']) . '/%')))->count(); $v['count'] = $v['count'] == 0 ? $v['count'] : '<strong class="text-danger" style="font-size:18px">' . $v['count'] . '</strong>'; $v['alias_html'] = '<a href="' . U('pos?module=' . $v['name']) . '">' . $v['alias'] . '</a>'; $v['do'] = '<a href="' . U('pos?module=' . $v['name']) . '"><i class="icon-sitemap"></i>' . '管理内部广告位' . '</a>'; } $adminList = new AdminListBuilder(); $adminList->data($module); $adminList->title('广告位管理 - 按模块选择'); $adminList->keyhtml('alias_html', '模块名')->keyHtml('do', '操作')->keyHtml('count', '模块内广告位数量'); $adminList->display(); }