Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. function ajaxitemdata()
  2. {
  3.     if ($this->input->post('id'))
  4.     {
  5.         $id = $this->input->post('id');
  6.         $this->MPTtree->set_table('menu_tree');
  7.         $node = $this->MPTtree->get_ORM($id);
  8.         $parent = $node->parent();
  9.         $arr = array(
  10.             'title' => $node->get('title'),
  11.             'alias' => $node->get('alias'),
  12.             'parent' => $this->MPTtree->display_as_select(1,$parent->get('lft'),'parent'),
  13.             'visible' => form_checkbox('visible', 'visible',$node->get('visible')),
  14.             'picture' => img($this->Menu_model->get_pic_by_id($node->get('id')))
  15.         );
  16.         echo json_encode($arr);
  17.     }
  18.     else
  19.     {
  20.         $arr = array('title' => 'Error');
  21.         echo json_encode($arr);
  22.     }
  23. }




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2012