echo $category_base . '/' . $cdata->slug; ?> "><?php echo $cdata->name; ?> </a></li> <?php } } else { } ?> </ul> </div> <?php } $child = getChildCategory($currentTermID); if (isset($child) && is_array($child) && count($child) > 0) { ?> <div class="floatbox"> <ul> <?php foreach ($child as $cat) { ?> <li><a href="<?php echo $category_base . '/' . $cat->slug; ?> "><?php echo $cat->name; ?> </a></li> <?php
function admin_html() { $this->_check_cms(); $dir = WEBPATH . '/' . $this->app; if (!is_dir($dir)) { mkdir($dir, 0777, true); } if (!empty($_GET['id'])) { $this->updateDetail((int) $_GET['id']); } if (!empty($_GET['pagename'])) { $this->updatePage($_GET['pagename']); } elseif (!empty($_GET['all']) and !empty($_POST['detail'])) { $_model = createModel($this->app); $gets['select'] = 'id,pagename'; $all = $_model->gets($gets); foreach ($all as $a) { if ($a['pagename']) { $this->updatePage($a['pagename']); } else { $this->updateDetail($a['id']); } } } elseif (!empty($_GET['all']) and !empty($_POST['catelog'])) { $fcates = getChildCategory($this->app); foreach ($fcates as $fc) { $this->updateCatelog($fc['id']); $cl = getChildCategory($this->app, $fc['id']); foreach ($cl as $cc) { $this->updateCatelog($cc['id']); } } } elseif (!empty($_GET['cate_id'])) { $cate_id = (int) $_GET['cate_id']; $this->updateCatelog($cate_id); } Swoole_js::js_back('更新成功!'); }
function cms_cate(&$params, &$smarty) { if (empty($params['app'])) { exit('App名称不能为空'); } if (empty($params['name'])) { $params['name'] = 'cate'; } if (empty($params['fid'])) { $params['fid'] = 0; } $smarty->_tpl_vars[$params['name']] = getChildCategory($params['app'], (int) $params['fid']); }