本文整理汇总了PHP中sub_tree_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP sub_tree_menu函数的具体用法?PHP sub_tree_menu怎么用?PHP sub_tree_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sub_tree_menu函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$node = M("Duty");
$menu = array();
$menu = $node->field('id,name')->order('sort asc')->select();
$tree = list_to_tree($menu);
$this->assign('menu', sub_tree_menu($tree));
$this->display();
}
开发者ID:yunsite,项目名称:smeoa,代码行数:9,代码来源:DutyAction.class.php
示例2: popup
function popup()
{
$model = M("SystemTag");
$module = $_GET['module'];
$where['module'] = array('eq', $module);
$list = array();
$list = $model->where($where)->field('id,pid,name')->order('sort asc')->select();
$list = list_to_tree($list);
$this->assign('list_popup', sub_tree_menu($list));
$this->display();
return;
}
开发者ID:uwitec,项目名称:semoa,代码行数:12,代码来源:SystemtagAction.class.php
示例3: index
public function index()
{
$node = M("MaterialClass");
$where['is_del'] = 0;
$menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select();
$tree = list_to_tree($menu);
$this->assign('menu', sub_tree_menu($tree));
$model = M("MaterialClass");
$list = $model->where($where)->getField('id,name');
$this->assign('folder_list', $list);
$this->display();
}
开发者ID:yunsite,项目名称:smeoa,代码行数:12,代码来源:MaterialclassAction.class.php
示例4: _index
protected function _index()
{
$node = M("SystemFolder");
$menu = array();
$where['folder'] = MODULE_NAME;
$menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select();
$tree = list_to_tree($menu);
$this->assign('menu', sub_tree_menu($tree));
$model = M("SystemFolder");
$list = $model->where($where)->getField('id,name');
$this->assign('folder_list', $list);
$this->assign('js_file', "SystemFolder:js/index");
$this->display("SystemFolder:index");
}
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:14,代码来源:SystemFolderAction.class.php
示例5: personal
public function personal()
{
$node = M("Folder");
$menu = array();
$user_id = get_user_id();
$where['folder'] = $this->get_folder();
$where['user_id'] = $user_id;
$menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select();
$tree = list_to_tree($menu);
$model = M("Folder");
$list = $model->where($where)->getField('id,name');
$this->assign('folder_list', $list);
$this->assign('menu', sub_tree_menu($tree));
$this->display("Folder:personal");
}
开发者ID:yunsite,项目名称:smeoa,代码行数:15,代码来源:FolderAction.class.php
示例6: field
function field()
{
if ($_POST) {
$opmode = $_POST["opmode"];
$model = D("ProductField");
if (false === $model->create()) {
$this->error($model->getError());
}
if ($opmode == "add") {
$list = $model->add();
if ($list !== false) {
//保存成功
$this->assign('jumpUrl', get_return_url());
$this->success('新增成功!');
} else {
$this->error('新增失败!');
//失败提示
}
}
if ($opmode == "edit") {
$list = $model->save();
if ($list !== false) {
//保存成功
$this->assign('jumpUrl', get_return_url());
$this->success('保存成功!');
} else {
$this->error('保存失败!');
//失败提示
}
}
if ($opmode == "del") {
$id = $_REQUEST['id'];
$list = $model->where("id={$id}")->delete();
if ($list !== false) {
//保存成功
$this->assign('jumpUrl', get_return_url());
$this->success('删除成功!');
} else {
$this->error('删除失败!');
//失败提示
}
}
}
$widget['date'] = true;
$this->assign("widget", $widget);
$model = D("ProductField");
$type_id = $_REQUEST['type_id'];
$this->assign('type_id', $type_id);
$where['type_id'] = array('eq', $type_id);
$where['is_del'] = 0;
$field_list = $model->where($where)->order('sort asc')->select();
$tree = list_to_tree($field_list);
$this->assign('menu', sub_tree_menu($tree));
$this->assign("field_list", $field_list);
$this->display();
}
开发者ID:2ger,项目名称:trunk,代码行数:56,代码来源:ProductTypeAction.class.php
示例7: sub_tree_menu
function sub_tree_menu($tree, $level = 0)
{
$level++;
$html = "";
if (is_array($tree)) {
$html = "<ul class=\"tree_menu\">\r\n";
foreach ($tree as $val) {
if (isset($val["name"])) {
$title = $val["name"];
$id = $val["id"];
if (empty($val["id"])) {
$id = $val["name"];
}
if (isset($val['_child'])) {
$html = $html . "<li>\r\n<a node=\"{$id}\"><i class=\"icon-angle-right level{$level}\"></i><span>{$title}</span></a>\r\n";
$html = $html . sub_tree_menu($val['_child'], $level);
$html = $html . "</li>\r\n";
} else {
$html = $html . "<li>\r\n<a node=\"{$id}\" ><i class=\"icon-angle-right level{$level}\"></i><span>{$title}</span></a>\r\n</li>\r\n";
}
}
}
$html = $html . "</ul>\r\n";
}
return $html;
}
开发者ID:TipTimesPHP,项目名称:tyj_oa,代码行数:26,代码来源:common.php
示例8: position
function position()
{
$widget['jquery-ui'] = true;
$this->assign("widget", $widget);
$model = M("Position");
$list = array();
$list = $model->field('id,name')->order('sort asc')->select();
$list = list_to_tree($list);
$this->assign('list_position', sub_tree_menu($list));
$this->display();
return;
}
开发者ID:hongweipeng,项目名称:oa,代码行数:12,代码来源:PopupAction.class.php
示例9: popup_position
function popup_position()
{
$model = M("Position");
$list = array();
$list = $model->field('id,name')->order('sort asc')->select();
$list = list_to_tree($list);
$this->assign('list_position', sub_tree_menu($list));
$this->display();
return;
}
开发者ID:yunsite,项目名称:smeoa,代码行数:10,代码来源:ContactAction.class.php
注:本文中的sub_tree_menu函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论