Example #1
0
                    $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />';
                }
            }
            $output['aaData'][] = $row;
        }
        break;
    case 'save_object':
        //
        $object_id = $_REQUEST['id'];
        $name = $_REQUEST['na'];
        $type = $_REQUEST['t'];
        $parent = $_REQUEST['p'];
        $address = $_REQUEST['a'];
        $warehouse = $_REQUEST['w'];
        if ($object_id == '') {
            AddObject($user_id, $name, $type, $parent, $address, $warehouse);
        } else {
            SaveObject($user_id, $object_id, $name, $type, $parent, $address, $warehouse);
        }
        break;
    case 'disable':
        $object_id = $_REQUEST['id'];
        Disable($object_id);
        break;
    default:
        $error = 'Action is Null';
}
$output['error'] = $error;
echo json_encode($output);
function GetObb($object_id)
{
            for ($i = 0; $i < $count; $i++) {
                /* General output */
                $row[] = $aRow[$i];
                if ($i == $count - 1) {
                    $row[] = '<input type="checkbox" name="check_' . $aRow[$hidden] . '" class="check" value="' . $aRow[$hidden] . '" />';
                }
            }
            $output['aaData'][] = $row;
        }
        break;
    case 'save_object':
        $object_id = $_REQUEST['id'];
        $name = $_REQUEST['name'];
        $object = $_REQUEST['object'];
        if ($object_id == '') {
            AddObject($user_id, $name, $object);
        } else {
            SaveObject($user_id, $object_id, $name, $object);
        }
        break;
    case 'disable':
        $object_id = $_REQUEST['id'];
        Disable($object_id);
        break;
    default:
        $error = 'Action is Null';
}
$output['error'] = $error;
echo json_encode($output);
function GetObb($object_id)
{