Plugins  LAST
 All Data Structures Files Functions Variables Pages
ajax.php
Go to the documentation of this file.
1 <?php
2 //This file is part of NOALYSS and is under GPL
3 //see licence.txt
4 
5 $act = HtmlInput::default_value_request('act','');
6 extract($_REQUEST);
7 if ( $act=="") {
8  die(_('act invalide'));
9 }
10 global $cn;
11 $a_action=explode(',',
12  'mod_form,add_row_definition,mod_param,add_param_detail,'.
13  'rapav_search_code,save_param_detail,rapav_declaration_display,'.
14  'modify_param_detail,'.
15  ',modify_rapav_description,'.
16  'save_definition');
17 if ( in_array($act,$a_action ) == true )
18 {
19  include 'ajax_'.$act.'.php';
20  exit();
21 }
22 switch ($act)
23 {
24  /////////////////////////////////////////////////////////////////////////
25  // Delete un formulaire_param_detail
26  /////////////////////////////////////////////////////////////////////////
27  case 'delete_param_detail':
28  $cn->exec_sql("delete from rapport_advanced.formulaire_param_detail "
29  . " where fp_id=$1", array($fp_id));
30  break;
31  /////////////////////////////////////////////////////////////////////
32  // Delete a saved declaration (from history)
33  /////////////////////////////////////////////////////////////////////
34  case 'rapav_declaration_delete':
35  $cn->exec_sql("delete from rapport_advanced.declaration where d_id=$1",
36  array($_GET['d_id']));
37  break;
38  /////////////////////////////////////////////////////////////////////
39  // Remove a template
40  /////////////////////////////////////////////////////////////////////
41  case 'rapav_remove_doc_template':
42  require_once 'include/class_rapav_formulaire.php';
43  $rapav = new Rapav_Formulaire($_GET['f_id']);
44  $rapav->remove_doc_template();
45  break;
46  default:
47  if ( DEBUG) var_dump($_GET);
48  die ("Aucune action demandée");
49 }
50 ?>
$a_action
Definition: ajax.php:11
$act
Definition: ajax.php:5
global $cn
Definition: ajax.php:27
$_REQUEST['sb']
Definition: am_print.php:39