noalyss Version-9
ajax_forecast_item.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19// Copyright Author Dany De Bontridder danydb@noalyss.eu
20/**
21 *@file
22 *@brief Manage the forecast item
23 */
24
25if (!defined('ALLOWED')) die('Appel direct ne sont pas permis');
26
27global $g_user;
28
29if ($g_user->check_module("FORECAST")==0) die();
30
32try {
33 $table=$http->request('table');
34 $action=$http->request('action');
35 $p_id=$http->request('p_id', "number");
36 $ctl_id=$http->request('ctl');
37
38} catch(Exception $e) {
39 echo $e->getMessage();
40 return;
41}
43$forecast_item->set_object_name($ctl_id);
44if ($action=="input")
45{
46 $forecast_item->send_header();
47 $forecast_item->set_forecast_id($http->request("forecast_id"));
48 echo $forecast_item->ajax_input()->saveXML();
49 return;
50}elseif ($action == "save") {
51 $forecast_item->send_header();
52 echo $forecast_item->ajax_save()->saveXML();
53 return;
54} elseif ($action == "delete") {
55 $forecast_item->send_header();
56 echo $forecast_item->ajax_delete()->saveXML();
57 return;
58}
global $g_user
catch(Exception $e) $forecast_item
manage the http input (get , post, request) and extract from an array
if( $delta< 0) elseif( $delta==0)
$table
Definition: menu.inc.php:103