function winpop() { $menu = D("Node")->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display(); }
public function winpop() { $node = M("MaterialFolder"); $menu = array(); $menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display(); }
public function winpop() { $node = M("Dept"); $menu = array(); $menu = $node->where('is_del=0')->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->assign('pid', $pid); $this->display(); }
function index() { $this->assign("title", '职员查询'); $node = D("Dept"); $menu = array(); $menu = $node->field('id,pid,name')->where("is_del=0")->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display(); }
function winpop() { $model = M("SystemTag"); $module = $_GET['module']; $where['module'] = array('eq', $module); $menu = $model->where($where)->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display(); }
function index() { $node = D("Dept"); $menu = array(); $menu = $node->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $model = D("UserView"); $where['user_id'] = array('eq', get_user_id()); $list = $model->where($where)->select(); $this->assign('list', $list); $this->display(); return; }
public function winpop2() { $node = M("Dept"); $menu = array(); $menu = $node->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('pid', $pid); $model = M("Dept"); $list = $model->order('sort asc')->getField('id,name'); $this->assign('dept_list', $list); $this->assign('menu', popup_tree_menu($tree)); $model = M("DeptGrade"); $list = $model->order('sort asc')->getField('id,name'); $this->assign('dept_grade_list', $list); $this->display(); }
function index() { $node = D("Dept"); $menu = array(); $menu = $node->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $model = D("UserView"); $where['user_id'] = array('eq', get_user_id()); $list = $model->where($where)->select(); $this->assign('list', $list); $tag_data = D("Tag")->get_data_list(); $new = array(); foreach ($tag_data as $val) { $new[$val['row_id']] = $new[$val['row_id']] . $val['class_id'] . ","; } $this->assign('group_data', $new); $this->tag_list(); $this->display(); return; }
public function winpop() { $node = M("Folder"); $menu = array(); $public = $this->get_public(); $where['folder'] = $this->get_folder(); if ($public == 2) { $user_id = get_user_id(); $where['user_id'] = $user_id; } $menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display("folder:winpop"); }
function popup_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 (!empty($val["is_del"])) { $del_class = "is_del"; } else { $del_class = ""; } if (isset($val['_child'])) { $html = $html . "<li>\r\n<a class=\"{$del_class}\" node=\"{$id}\" ><i class=\"icon-angle-right level{$level}\"></i><span>{$title}</span></a>\r\n"; $html = $html . popup_tree_menu($val['_child'], $level); $html = $html . "</li>\r\n"; } else { $html = $html . "<li>\r\n<a class=\"{$del_class}\" 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; }
function message() { $widget['jquery-ui'] = true; $this->assign("widget", $widget); $model = M("Dept"); $list = array(); $list = $model->where('is_del=0')->field('id,pid,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_company', popup_tree_menu($list)); $model = M("Rank"); $list = array(); $list = $model->field('id,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_rank', popup_tree_menu($list)); $model = M("Position"); $list = array(); $list = $model->field('id,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_position', popup_tree_menu($list)); $this->assign('type', 'rank'); $this->display(); return; }
function winpop() { $node = M("UserFolder"); $menu = array(); $where['folder'] = MODULE_NAME; $where['user_id'] = get_user_id(); $menu = $node->where($where)->field('id,pid,name')->order('sort asc')->select(); $tree = list_to_tree($menu); $this->assign('menu', popup_tree_menu($tree)); $this->display("UserFolder:winpop"); }
function popup_confirm() { $model = M("Dept"); $list = array(); $list = $model->field('id,pid,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_company', popup_tree_menu($list)); $model = M("Rank"); $list = array(); $list = $model->field('id,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_rank', popup_tree_menu($list)); $model = M("Position"); $list = array(); $list = $model->field('id,name')->order('sort asc')->select(); $list = list_to_tree($list); $this->assign('list_position', popup_tree_menu($list)); $this->assign('type', 'rank'); $this->display(); return; }
public function winpop() { $node = M("Supplier"); $menu = array(); $menu = $node->where($where)->field('id,name')->select(); $tree = list_to_tree($menu); //dump($node); $this->assign('menu', popup_tree_menu($tree)); $this->display(); }