文件
mashangyoujiu/Application/Admin/Controller/PlugController.class.php

33 行
761 B
PHP
可执行文件

<?php
namespace Admin\Controller;
use Think\Controller;
//[1.5.22]
/**
* 插件
* Class PlugController
* @package Admin\Controller
*/
class PlugController extends BaseController
{
public function index()
{
$list = array();
$class = M('plug_class')->select();
foreach ($class as $val) {
$plug = M('plug')->where(array('class_id' => $val['id']))->field('*')->select();
$temp = array();
$temp['class_id'] = $val['id'];
$temp['class_name'] = $val['class_name'];
$temp['list'] = $plug ? $plug : array();
$list[] = $temp;
unset($temp);
unset($plug);
}
$this->assign('list', $list);
$this->display();
}
}