noalyss Version-9
ajax_test.php
Go to the documentation of this file.
1<?php
2
3/*
4 * This file is part of NOALYSS.
5 *
6 * NOALYSS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * NOALYSS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with NOALYSS; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21/*!\file
22 * \brief this file let you debug and test the different functionnalities, there are 2 important things to do
23 * It is only a quick and dirty testing. You should use a tool as PHPUNIT for the unit testing
24 *
25 * - first do not forget to create the authorized_debug file in the html folder
26 * - secund the test must adapted to this page : if you do a post (or get) from a test, you won't get any result
27 * if the $_REQUEST[test_select] is not set, so set it .
28 */
29
30
31
32include_once "../include/constant.php";
33include_once NOALYSS_INCLUDE."/lib/ac_common.php";
34require_once NOALYSS_INCLUDE."/class/database.class.php";
35require_once NOALYSS_INCLUDE."/class/dossier.class.php";
36require_once NOALYSS_INCLUDE."/lib/html_input.class.php";
37require_once NOALYSS_INCLUDE."/lib/http_input.class.php";
38require_once NOALYSS_INCLUDE."/lib/function_javascript.php";
39require_once NOALYSS_INCLUDE . "/class/noalyss_user.class.php";
41$gDossier=$http->request('gDossier', "number",-1);
42if ($gDossier==-1)
43{
44 echo " Vous devez donner le dossier avec paramètre gDossier dans l'url, exemple http://localhost/noalyss/html/test.php?gDossier=25";
45 exit();
46}
50
52$g_user=new Noalyss_user($cn);
53
54if (!file_exists('authorized_debug'))
55{
56 echo "Pour pouvoir utiliser ce fichier vous devez creer un fichier nomme authorized_debug
57 dans le repertoire html du server";
58 exit();
59}
60define('ALLOWED', 1);
61define('AJAX_TEST', 1);
62
63$w=$http->request("TestAjaxFile");
64
65require_once $w;
global $g_failed
Definition: ajax_test.php:48
$gDossier
Definition: ajax_test.php:41
global $cn
Definition: ajax_test.php:48
if($gDossier==-1) $gDossierLogInput
Definition: ajax_test.php:47
$http
Definition: ajax_test.php:40
global $g_user
Definition: ajax_test.php:48
$g_parameter
Definition: ajax_test.php:51
global $g_succeed
Definition: ajax_test.php:48
$w
Definition: ajax_test.php:63
static connect()
manage the http input (get , post, request) and extract from an array
Class to manage the company parameter (address, name...)
for($e=0; $e< count($afiche); $e++) exit