noalyss Version-9
extension.raw.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
20// Copyright Author Dany De Bontridder danydb@aevalys.eu
21
22/*!\file
23 * \brief this file includes the called plugin. It check first
24 * the security. Load several javascript files
25 */
26require_once '../include/constant.php';
27require_once NOALYSS_INCLUDE.'/class/database.class.php';
28require_once NOALYSS_INCLUDE.'/class/dossier.class.php';
29require_once NOALYSS_INCLUDE.'/lib/ac_common.php';
30require_once NOALYSS_INCLUDE.'/lib/function_javascript.php';
31require_once NOALYSS_INCLUDE.'/class/extension.class.php';
32require_once NOALYSS_INCLUDE.'/lib/html_input.class.php';
33require_once NOALYSS_INCLUDE.'/lib/iselect.class.php';
34require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
35
36MaintenanceMode("block.html");
37
41
44$g_user=new Noalyss_user($cn);
45$g_user->check();
47
48
51
52if ( $ext->search($http->request("plugin_code")) != -1 )
53 {
54 /* security */
55 if ( !isset ($_SESSION[SESSION_KEY.'g_user']) || $ext->can_request($_SESSION[SESSION_KEY.'g_user']) == 0 )
56 {
57 exit();
58 }
59 /* call the ajax script */
60 require_once(NOALYSS_PLUGIN.DIRECTORY_SEPARATOR.dirname(trim($ext->getp('me_file'))).DIRECTORY_SEPARATOR.'raw.php');
61 }
62else
63 {
64 alert(j(_("Cette extension n'existe pas ")));
65 exit();
66 }
67?>
MaintenanceMode($p_file)
When you want to prevent users to connect, create a file in noalyss/ (NOALYSS_BASE) with the message ...
Definition: ac_common.php:1663
set_language()
set the lang thanks the _SESSION['g_lang'] var.
Definition: ac_common.php:754
j($p_string)
escape correctly php string to javascript
Definition: ac_common.php:96
alert($p_msg, $buffer=false)
alert in javascript
Definition: ac_common.php:738
$input_from id
Definition: balance.inc.php:63
static connect()
manage the extension, it involves the table extension
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
global $cn
$only_plugin
$http
global $g_user
global $g_parameter
$ext