-
Code's Tags
-
Your Codes
-
Reffers
-
Linked Codes
|
Code:
Short link for Twitter:
HTML:
HTML view:
Copy Source | Copy HTML- function ajaxitemdata()
- {
- if ($this->input->post('id'))
- {
- $id = $this->input->post('id');
- $this->MPTtree->set_table('menu_tree');
- $node = $this->MPTtree->get_ORM($id);
- $parent = $node->parent();
- $arr = array(
- 'title' => $node->get('title'),
- 'alias' => $node->get('alias'),
- 'parent' => $this->MPTtree->display_as_select(1,$parent->get('lft'),'parent'),
- 'visible' => form_checkbox('visible', 'visible',$node->get('visible')),
- 'picture' => img($this->Menu_model->get_pic_by_id($node->get('id')))
- );
- echo json_encode($arr);
- }
- else
- {
- $arr = array('title' => 'Error');
- echo json_encode($arr);
- }
- }
|