本文整理汇总了PHP中Category::unlimitedForLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP Category::unlimitedForLevel方法的具体用法?PHP Category::unlimitedForLevel怎么用?PHP Category::unlimitedForLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Category
的用法示例。
在下文中一共展示了Category::unlimitedForLevel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
import('Class.Category', APP_PATH);
$cate = M('cate')->order('sort ASC')->select();
$this->cate = Category::unlimitedForLevel($cate, '  --');
$this->display();
}
示例2: article
public function article()
{
import('Class.Category', APP_PATH);
$cate = M('cate')->order('sort')->select();
$this->cate = Category::unlimitedForLevel($cate);
$this->display();
}
示例3: index
public function index()
{
$cate = M('cate')->order('sort ASC')->select();
//$this->assign('cate', $cate)->display();
import('Class.Category', APP_PATH);
// $cate = Category::unlimitedForLayer($cate);
$this->cate = Category::unlimitedForLevel($cate, ' --');
$this->display();
}
示例4: blog
public function blog()
{
//博文所属分类
import('Class.Category', APP_PATH);
$cate = M('cate')->order('sort')->select();
$this->cate = Category::unlimitedForLevel($cate);
//博文属性
$this->attr = M('attr')->select();
$this->display();
}
示例5: addArt
public function addArt()
{
//文章分类
import('Class.Category', APP_PATH);
$column = M('column')->order('sort ASC')->select();
$this->column = Category::unlimitedForLevel($column);
//文章属性
$this->attr = M('attr')->select();
$this->display();
}
示例6: index
public function index()
{
$cate = M('cate')->order('sort')->select();
import('Class/Category', APP_PATH);
$this->cate = Category::unlimitedForLevel($cate);
// $cate = Category::unlimitedForLayer($cate);
// $cate = Category::getParents($cate,18);
// $cate = Category::getChildsId($cate,3);
// p($cate);die;
$this->display();
}
示例7: index
public function index()
{
// require(APP_PATH.'Common/Category.class.php');
import('Category', APP_PATH . 'Common');
$cate = M('cate')->order('sort ASC')->select();
// $cate=Category::unlimitedForLayer($cate);
$this->cate = $cate = Category::unlimitedForLevel($cate);
// p($cate);
// die;
// $this->cate=$cate;
$this->display();
// $this->assign('cate',$cate)->display();
}
示例8: blog
public function blog()
{
// echo __ROOT__;
//分类列表
import('Category', APP_PATH . '/Common');
$cate = M('cate')->order('sort ASC')->select();
$this->cate = $cate = Category::unlimitedForLevel($cate);
// p($cate);
//属性列表
$this->attr = $attr = M('attr')->select();
// p($attr);
$this->display();
}
示例9: modify
/**
* 修改博客
* @param
* @return
*/
public function modify()
{
$this->status = 1;
//status,0=>新增博客,1=>修改博客.
$id = $_GET['id'];
$field = array('id', 'click', 'title', 'summary', 'content', 'cid');
$where = array('id' => $id);
$this->blog = D('BlogRelation')->field($field)->relation(true)->where($where)->find();
$cate = M('cate')->select();
import('Class.Category', APP_NAME);
$this->attr = M('attr')->select();
$this->cate = Category::unlimitedForLevel($cate);
$this->display('blog');
}
示例10: index
public function index()
{
import('Class.Category', APP_PATH);
$uid = session('uid');
if ($uid == 3) {
$where = array('del' => 0);
} else {
$where = array('del' => 0, 'uid' => $uid);
}
$column = M('columns')->where($where)->order('sort ASC')->select();
//传递1个父ID返回所以子级分类
//$column=Category::getChilds($column,2);
//传递1个父ID返回所以子级分类ID
//$column=Category::getChildsID($column,2);
//传递1个子ID返回所以父级分类
//$column=Category::getParents($column,2);
//下拉菜单递归
//$column=Category::unlimitedForLayer($column,'pk');
//列表递归
$this->column = Category::unlimitedForLevel($column);
$this->display();
}
示例11: addDetails
public function addDetails()
{
import('Class.Category', './');
//引入无限极分类
$sortList = M('discuss_sort')->select();
//先把图文分类读出来
$sortList = deep_htmlspecialchars_decode($sortList);
//查询输出了数据库数据之后记得反转义
$sortList = Category::unlimitedForLevel($sortList, ' ');
//组合子分类与父分类
$this->assign('sortList', $sortList);
//把分类分配过去
$this->display();
}
示例12: cate
public function cate()
{
import('Class.Category', APP_PATH);
$cate = M('video_cate')->order('sort ASC')->select();
$this->cate = Category::unlimitedForLevel($cate, ' --- ');
$this->display();
}
示例13: add
public function add()
{
$m = M('Category');
$clist = $m->order('sort asc')->select();
import('ORG.Util.Category');
$clist = Category::unlimitedForLevel($clist);
$this->assign('clist', $clist);
$this->display();
}
示例14: editDetails
public function editDetails()
{
if ($_POST) {
$id = I('id', 0, 'intval');
$db = M('ad');
parent::checkField('ad_name', deep_htmlspecialchars($_POST['ad_name']), 'require', '广告名称不能为空');
//parent::checkField('content', deep_htmlspecialchars($_POST['content']), 'require', '内容不能为空');
$data = array();
$data['id'] = $id;
$data['ad_name'] = I('ad_name');
$data['sort_id'] = I('parent_id');
$data['status'] = I('status');
$data['ad_pic'] = I('ad_pic');
$data['ad_url'] = I('ad_url');
$data['ad_explain'] = I('ad_explain');
$data['start_time'] = strtotime(I('start_time'));
$data['end_time'] = strtotime(I('end_time'));
if ($db->data($data)->save()) {
$this->success('修改成功', U(GROUP_NAME . '/Ad/detailslist'));
} else {
$this->error('修改失败');
}
} else {
$id = I('id', 0, 'intval');
$this->assign('id', $id);
$data = M('ad')->where(array('id' => $id))->find();
$this->assign('data', $data);
import('Class.Category', './');
//引入无限极分类
$sortList = M('ad_sort')->select();
//先把广告分类读出来
$sortList = Category::unlimitedForLevel($sortList, ' ');
//组合子分类与父分类
$this->assign('sortList', $sortList);
//把分类分配过去
$this->display();
}
}
示例15: changeArticle
public function changeArticle()
{
import('Class.Category', APP_PATH);
$cate = M('cate')->order('sort')->select();
$this->cate = Category::unlimitedForLevel($cate);
//读取文章属性
$this->attr = M('attr')->select();
$id = (int) $_GET['id'];
$this->Article = M('article')->where(array('id' => $id))->find();
$this->display();
}