<?php namespace Phpcmf\Controllers\Admin;
class Module_content extends \Phpcmf\Common
{
public function index() {
$module = \Phpcmf\Service::L('cache')->get('module-'.SITE_ID.'-content');
if ($module) {
foreach ($module as $dir => $t) {
if ($t['hlist'] == 1) {
unset($module[$dir]);
continue;
}
$module[$dir]['url'] =\Phpcmf\Service::L('Router')->url($dir.'/content/index');
}
}
$tmp['system'] = [
'name' => '内容维护',
'icon' => 'fa fa-database',
'title' => '内容维护',
'url' => \Phpcmf\Service::L('Router')->url('content/index'),
'dirname' => 'system',
];
$module = dr_array22array($module, $tmp);
$one = reset($module);
dr_count($module) == 1 && dr_redirect($one['url']);
$dirname = $one['dirname'];
\Phpcmf\Service::V()->assign([
'url' => $one['url'],
'menu' => \Phpcmf\Service::M('auth')->_iframe_menu($module, $dirname),
'module' => $module,
'dirname' => $dirname,
]);
\Phpcmf\Service::V()->display('iframe_content.html');exit;
}
}